Pen Settings



CSS Base

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <!-- Use preprocessors via the lang attribute! e.g. <template lang="pug"> -->
  <div id="app">
    <table id="movies">
        <tr v-for="movie in movies" :key="" @click="rowClick(">
          <td>{{ }}</td>
          <td>{{ movie.title }}</td>
          <td>{{ movie.director }}</td>
          <td>{{ movie.year }}</td>
          <td>{{ movie.rate }}</td>
          <td @click.stop><button @click="chooseMovie(movie)">Choose Me!</button></td>

export default {
  data() {
    return {
      movies: [{
        "id": 1,
        "title": "Turning",
        "director": "Danica Kiwitz",
        "year": 1995,
        "rate": 1
      }, {
        "id": 2,
        "title": "William Kunstler",
        "director": "Wernher Daens",
        "year": 2002,
        "rate": 2
      }, {
        "id": 3,
        "title": "Alyce Kills",
        "director": "Burk Southan",
        "year": 1998,
        "rate": 4
      }, {
        "id": 4,
        "title": "Port of Flowers",
        "director": "Elfie Croot",
        "year": 2005,
        "rate": 1
      }, {
        "id": 5,
        "title": "Corruption",
        "director": "Flinn Skullet",
        "year": 2011,
        "rate": 2
  methods: {
    rowClick(id) {
      alert(`Row ${id} clicked!`);
    chooseMovie(movie) {
      alert(`${movie.title}'s rate is ${movie.rate}, it's a greate movie!`);

<!-- Use preprocessors via the lang attribute! e.g. <style lang="scss"> -->
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
#movies {
  font-family: Arial, Helvetica, sans-serif;
  border-collapse: collapse;
  width: 100%;

#movies td, #movies th {
  border: 1px solid #ddd;
  padding: 8px;

#movies tr:nth-child(even){background-color: #f2f2f2;}

#movies tr:hover {background-color: #ddd;}

#movies th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  background-color: #04AA6D;
  color: white;