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="bg-gray-900">
   <div class="w-full max-w-xl mx-auto border-l border-r border-gray-700 min-h-screen h-full main">
     <div class="w-full h-16 border-b border-gray-700 px-5 py-3 flex items-center justify-between text-gray-100 sticky top-0 bg-gray-900 z-30">
       <div class="text-lg font-medium ">
       <div class="hover:bg-gray-800 hover:bg-opacity-70 cursor-pointer w-10 h-10 rounded-full flex items-center justify-center">
         <svg class="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z" />
     <div class="card" v-for="n in 10" :key="n">
       <div class="border-b border-gray-700 p-5 flex items-start space-x-5 cursor-pointer hover:bg-gray-800 hover:bg-opacity-25 transition duration-200">
         <div class="w-12 flex-shrink-0" v-Tooltip>
           <div class="w-12 h-12 rounded-full bg-gray-700 bg-opacity-50">
             <img :src="''+ Math.ceil(Math.random() * 1000)" alt="" class="w-12 h-12 rounded-full">
         <div class="flex-1">
           <div class="flex items-center space-x-2">
             <div class="text-base text-gray-100 font-medium">
               Jason Bourne
             <div class="text-gray-500 font-normal text-sm">
           <div class="mt-3 text-gray-300 text-sm">
             Lorem ipsum, dolor sit amet consectetur adipisicing elit. Error explicabo qui illo dolores rerum ducimus voluptatibus esse culpa sequi ea. Officiis cupiditate deleniti sapiente facere rerum? Exercitationem tempore quos sapiente?
           <div class="mt-3 bg-gray-800 w-full d-16x9 rounded-lg flex items-center justify-center text-gray-600" v-if="Math.random() > 0.55">
             <svg class="h-12 w-12" viewBox="0 0 20 20" fill="currentColor">
  <path fill-rule="evenodd" d="M4 3a2 2 0 00-2 2v10a2 2 0 002 2h12a2 2 0 002-2V5a2 2 0 00-2-2H4zm12 12H4l4-8 3 6 2-4 3 6z" clip-rule="evenodd" /></svg>



<script setup>
  import { computed,ref,onMounted } from 'vue'
  const genuuid = () => {
    return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c =>
      (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)
  const vTooltip = {
    mounted (el,binding,vnode) {
      const uuid = genuuid()
      const showtip = () => {
        const dock = document.createElement('div')
        dock.setAttribute('id',uuid) = 'absolute' = 9999999
        dock.innerHtml = 'DOCKLAND'
      const hidetip = () => {
        const dock2destroy = document.getElementById(uuid)
        if(dock2destroy) {
    updated (el,binding,vnode) {
    beforeUnmount (el) {
    unmounted (el) {
  onMounted(() => {
      opacity: 0.4,
      duration: .4,
      stagger: .15,
      y: '+=500',//THIS IS THE PROBLEM !!!!!! If you remove it all works fine.

<style scoped>
  .d-16x9 {
    aspect-ratio: 16 / 9;