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" class="flex justify-center mt-12">
      <div class="w-full relative">
          class="block text-sm font-medium leading-5 text-gray-700 sr-only"
          class="mt-1 relative border border-gray-300 overflow-hidden rounded-md shadow-sm"
            @keyup="showOptions = true"
            class="w-full px-3 py-3"
          v-show="resultQuery().length && showOptions"
          class="absolute w-full z-50 bg-white border border-gray-300 mt-1 max-height-48 overflow-hidden overflow-y-scroll rounded-md shadow-md"
          <ul class="py-1">
              v-for="(value, index) in resultQuery()"
              class="px-3 py-2 cursor-pointer hover:bg-gray-200"
              {{ value.clients_name }}

export default {
  data() {
    return {
      show: false,
      formData: {},
      showOptions: false,
      data: [
        { id: 1, clients_name: "Jane Doe" },
        { id: 2, clients_name: "John Doe" },
        { id: 3, clients_name: "Hello World" },
  methods: {
    setInput(value) {
      this.$set(this.formData, "client", value);
      this.$set(this.formData, "client_id",;
      this.showOptions = false;
    resultQuery() {
      if (this.formData.client) {
        let data = => {
          return this.formData.client
            .split(" ")
            .every((v) => item.clients_name.toLowerCase().includes(v));

        return data;
      } else {
        return [];

<style scoped>
.max-height-48 {
  max-height: 200px;