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.


                <script type="text/x-template" id="vue-file-agent-demo">
  <div id="profile-pic-demo" class="bg-light pt-3">
      :helpText="'Drag an image file here'"
        type: 'Please select an image',
      <template v-slot:before-outer>
      </template >
      <template v-slot:after-inner>
        <span title="after-inner" class="btn btn-link btn-sm btn-block">Select image file</span>
      </template >
      <template v-slot:after-outer>
        <div title="after-outer">
          <p>Please select an image and click the upload button</p>
          <div class="drop-help-text">
            <p class="text-success">Drop the file!</p>
          <button type="button" class="btn btn-primary" :class="{'disabled': uploaded || !profilePic}" @click="upload()">Upload</button>
          <button type="button" class="btn" :class="[uploaded ? 'btn-danger' : 'btn-secondary']" v-if="profilePic" @click="removePic()">Remove</button>
          <div class="clearfix"></div>
      </template >

<!-- ----------------------------- -->

<div class="container py-3">
  <div id="app">
    <h5><a target="_blank" href="">Vue File Agent</a> Playground</h5>
<ul class="nav nav-pills mb-2">
  <li class="nav-item">
    <a target="_blank" class="nav-link" href="">1. Preloading Files Demo</a>
  <li class="nav-item">
<a target="_blank" class="nav-link active" href="">2. Profile Picture Demo</a>
  <li class="nav-item">
    <a target="_blank" class="nav-link" href="">3. Gmail Inspired Demo</a>


                  #profile-pic-demo .drop-help-text {
    display: none;
  #profile-pic-demo .is-drag-over .drop-help-text {
    display: block;
  #profile-pic-demo .profile-pic-upload-block {
    border: 2px dashed transparent;
    padding: 20px;
    padding-top: 0;

  #profile-pic-demo .is-drag-over.profile-pic-upload-block {
    border-color: #AAA;
  #profile-pic-demo .vue-file-agent {
    width: 180px;
    float: left;
    margin: 0 15px 5px 0;
    border: 0;
    box-shadow: none;


                var component = {
  data: function(){
    return {
      name: 'Gapal',
      profilePic: null,
      uploaded: false,
      uploadUrl: '',
      uploadHeaders: {},
  methods: {
    removePic: function(){
      var profilePic = this.profilePic;
      this.$refs.profilePicRef.deleteUpload(this.uploadUrl, this.uploadHeaders, [profilePic]);
      this.profilePic = null;
      this.uploaded = false;
    upload: function(){
      var self = this;
      this.$refs.profilePicRef.upload(this.uploadUrl, this.uploadHeaders, [this.profilePic]).then(function(){
        self.uploaded = true;
          // self.profilePic.progress(0);          
        }, 500);
    onSelect: function(fileRecords){
      console.log('onSelect', fileRecords);
      this.uploaded = false;

component.template = '#vue-file-agent-demo';

Vue.component('vue-file-agent-demo', component);

new Vue({
  el: '#app'