Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

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

Packages

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.

Behavior

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.

HTML

              
                <script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="https://unpkg.com/vue-router/dist/vue-router.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@novicell/vue-breadcrumb/dist/nc-breadcrumb.min.js"></script>


<div id="app">
  <h1>@novicell/vue-breadcrumb demo</h1>
  <nav><nc-breadcrumb :breadcrumbs="links"/></nav>
 
  <router-view></router-view>
  
  <p class="notes">
    * External sites usually block navigation from codepen etc.
    <br>
    ** You would want your breadcrumb links to change dynamically depending on your route.
  </p>

</div>

<script defer>
  const links = [
  {
    url: '/',
    title: 'Internal absolute route is rendered with n-link or router-link',
    text: 'Home'
  },
  {
    url: '/subroute',
    title: 'Internal relative route is rendered with n-link or router-link',
    text: 'Subroute'
  },
  {
    url: 'https://www.npmjs.com/package/@novicell/vue-breadcrumb',
    title: 'External links are rendered with an anchor-tag',
    text: 'NPM Package*'
  },
  {
    url: 'https://codepen.io',
    title: 'The last link is supposed to be the page you are on, and not clickable',
    text: 'This page**'
  },
]
</script>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Comfortaa:[email protected]&display=swap');

body {
  text-align: center;
  font-family: Consolas;
}

h1 {
  font-family: Comfortaa;
}

.notes {
  text-align: left;
  font-size: 10pt;
  max-width: 500px;
  margin-top: 100px;
}
              
            
!

JS

              
                const Home = {
  template: `
    <div>
      <h2>This is <code>/</code></h2>
    </div>`,
}

const Subroute = {
  template: `
    <div>
      <h2>This is <code>/subroute</code></h2>
    </div>`,
}

const routes = [
  { path: '', component: Home },
  { path: '/subroute', component: Subroute }
]

const router = new VueRouter({
  routes
})

const app = new Vue({
  router,
  data() {
    return {
      links
    }
  }
}).$mount('#app')

// Now the app has started!
              
            
!
999px

Console