Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource


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


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.


                <div id="app">
    :error="error" >
    <p align="center">Progress is {{ progress }}%</p>
    <div class="button-container">
      <button type="button" @click="progressTo(30)">Progress to 30</button>
      <button type="button" @click="progressTo(50)">Progress to 50</button>
      <button type="button" @click="progressTo(100)">Progress to 100</button>
      <button type="button" @click="changeDirection">Change Direction</button>
      <button class="error" type="button" @click="setToError(true)">Give An Error</button>
<script src=""></script>
<script src=""></script>
<link rel="stylesheet" href="">


                #app {


                const LoadingBar = window['LoadingBar'];

new Vue({
  el: '#app',
  components: {
    LoadingBar: LoadingBar
  data: {
    progress: 0,
    error: false,
    direction: 'right'
  methods: {
    progressTo: function (val) {
      this.progress = val;
    setToError: function (bol) {
      this.error = bol;
    changeDirection: function (direction) {
      if(this.progress >= 0){
        this.progress = 100;
      this.direction = this.direction === 'right' ? 'left' : 'right';
    // Callback
      this.error = false
    progressDone:function() {
      this.progress = 0
  mounted: function () {
    var me = this;
    me.progress = 10;
    for (var i = 0; i < 30; i++) {
      if(i > 20 && i < 29){
        setTimeout(function () {
          me.progress += 5;
        setTimeout(function () {
          me.progress ++;
    setTimeout(function () {
      me.progress = 100;