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.


      legend Vue custom SELECT

      p selectedOption: 
        b {{}}
      pre {{selectedOption}}

      v-select(:options="options", @option="OnSelect")



  padding 1em
  background #f1f1f1
  float right
  user-select none
  display inline-block
  position relative
    background #fff url("data:image/svg+xml;utf8,<svg xmlns='' width='22' height='12'><polygon points='0,0 12,0 6,12' fill='orange'/></svg>") 100% no-repeat;
    cursor pointer
    list-style none
    position absolute
    background #FFF
    width 100%
    box-shadow 0 .2em 1.4em 0 rgba(0, 0, 0, 0.2)
    cursor pointer
    //color #477dca
    border-top 1px solid #EFEFEF
    padding 0 1em
    line-height: 2.4
      color #000
      background #f9f9f9



                Vue.component("v-select", {
  template: `
  <div class="V-select">
      :value="!selectedOption ? 'Please select an item' :" readonly 
      @click="open=true" />
    <ul v-show="open">
      <li v-for="(option,i) in options"
        {{ }}
  props: {
    options: {
      type: [Array, Object]
    selected: {}
  data() {
    return {
      selectedOption: {},
      open: false,
      selectedItem: null
  created() {
    this.selectedOption = this.selected;
    document.body.addEventListener("click", this.close);
  beforeDestroy() {
    document.body.removeEventListener("click", this.close);
  methods: {
    updateOption(option, i) {
      this.selectedItem = i;
      this.selectedOption = option; = false;
      this.$emit("option", option);
    close(e) {
      if (!this.$el.contains( = false;

const options = [
    name: "First Option",
    val: 1
    name: "Second Option",
    val: 2
    name: "Third Option",
    val: 3
    name: "Lorem ipsum",
    val: 4

const vm = new Vue({
  el: "#app",
  data: {
    selectedOption: {},
    options: options
  computed: {},
  methods: {
    OnSelect(option) {
      this.selectedOption = option;
  mounted() {}