Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ add another resource

JavaScript

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

Packages

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.

Behavior

Auto Save

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.

HTML

              
                <!--
Include Tailwind JIT CDN compiler
More info: https://beyondco.de/blog/tailwind-jit-compiler-via-cdn
-->
<script src="https://unpkg.com/tailwindcss-jit-cdn"></script>

<!-- Specify a custom Tailwind configuration -->
<script type="tailwind-config">
{
  theme: {
    extend: {
      colors: {
        gray: colors.blueGray,
        green: colors.teal,
      }
    }
  }
}
</script>

<!-- Snippet -->
<section class="flex flex-col justify-center antialiased bg-gray-900 text-gray-600 min-h-screen p-4">
    <div class="h-full">
        <!-- Card -->
        <div class="max-w-xs mx-auto">
            <div class="relative flex flex-col h-full bg-indigo-700 shadow-lg rounded-lg shadow-lg p-5">
                <!-- Popular badge -->
                <div class="absolute top-0 right-5">
                    <div class="text-xs inline-flex font-semibold bg-green-100 text-green-600 rounded-full text-center px-3 py-1.5 shadow-sm transform -translate-y-1/2">Most Popular</div>
                </div>
                <!-- Card header -->
                <header class="pb-4 mb-4 border-b border-indigo-200 border-opacity-30">
                    <!-- Logo -->
                    <div class="mb-2">
                        <svg width="42" height="44" xmlns:xlink="http://www.w3.org/1999/xlink">
                            <defs>
                                <linearGradient x1="27.515%" y1="0%" x2="59.658%" y2="100%" id="b">
                                    <stop stop-color="#5EEAD4" offset="0%" />
                                    <stop stop-color="#2DD4BF" offset="100%" />
                                </linearGradient>
                                <linearGradient x1="67.338%" y1="82.466%" x2="4.807%" y2="15.884%" id="c">
                                    <stop stop-color="#F0FDFA" stop-opacity=".12" offset="0%" />
                                    <stop stop-color="#F0FDFA" offset="100%" />
                                </linearGradient>
                                <linearGradient x1="47.38%" y1="24.752%" x2="58.769%" y2="81.336%" id="e">
                                    <stop stop-color="#0F766E" stop-opacity=".24" offset="0%" />
                                    <stop stop-color="#0D9488" stop-opacity="0" offset="100%" />
                                </linearGradient>
                                <path id="a" d="M25.015 44 0 29.437 10.654 0l25.17 4.338L42 26.648z" />
                            </defs>
                            <g fill="none" fill-rule="evenodd">
                                <mask id="d" fill="#fff">
                                    <use xlink:href="#a" />
                                </mask>
                                <use fill="url(#b)" xlink:href="#a" />
                                <path d="m10.281-.584 23.651 20.647 14.84 11.177 7.884-14.748-.927-9.78-11.44-7.296-8.81-3.26L20.02-4.62 10.281-.584Z" fill="url(#c)" style="mix-blend-mode:overlay" mask="url(#d)" />
                                <path d="M43.015 17.16-1.969 29.974l6.647 11.579c6.184 3.808 9.481 5.867 9.894 6.175.412.31 7.729.31 21.95 0l7.884-9.88-1.391-20.688Z" fill="url(#e)" style="mix-blend-mode:multiply" mask="url(#d)" />
                                <path fill-opacity=".32" fill="#F0FDFA" style="mix-blend-mode:overlay" mask="url(#d)" d="m36.18 3.3-2.17 16.714L23.625 48.18l20.15-5.107 5.89-11.297 1.085-18.881z" />
                            </g>
                        </svg>
                    </div>
                    <!-- Product name -->
                    <h3 class="text-xl font-extrabold text-indigo-50 leading-snug mb-2">Small Business</h3>
                    <!-- Price -->
                    <div class="font-extrabold mb-1"><span class="text-2xl text-indigo-200">$</span><span class="text-4xl text-indigo-50">179</span></div>
                    <!-- Description -->
                    <div class="text-indigo-200">Billed Yearly. Perfect for small businesses</div>
                </header>
                <!-- Features list -->
                <ul class="text-indigo-200 text-sm space-y-2 flex-grow mb-6">
                    <li class="flex items-center">
                        <svg class="w-3 h-3 fill-current text-green-500 mr-3 flex-shrink-0" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
                            <path d="M10.28 2.28L3.989 8.575 1.695 6.28A1 1 0 00.28 7.695l3 3a1 1 0 001.414 0l7-7A1 1 0 0010.28 2.28z" />
                        </svg>
                        <span>Lorem ipsum dolor sit amet consecte.</span>
                    </li>
                    <li class="flex items-center">
                        <svg class="w-3 h-3 fill-current text-green-500 mr-3 flex-shrink-0" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
                            <path d="M10.28 2.28L3.989 8.575 1.695 6.28A1 1 0 00.28 7.695l3 3a1 1 0 001.414 0l7-7A1 1 0 0010.28 2.28z" />
                        </svg>
                        <span>Lorem ipsum dolor sit amet consecte.</span>
                    </li>
                    <li class="flex items-center">
                        <svg class="w-3 h-3 fill-current text-green-500 mr-3 flex-shrink-0" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
                            <path d="M10.28 2.28L3.989 8.575 1.695 6.28A1 1 0 00.28 7.695l3 3a1 1 0 001.414 0l7-7A1 1 0 0010.28 2.28z" />
                        </svg>
                        <span>Lorem ipsum dolor sit amet consecte.</span>
                    </li>
                    <li class="flex items-center">
                        <svg class="w-3 h-3 fill-current text-green-500 mr-3 flex-shrink-0" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg">
                            <path d="M10.28 2.28L3.989 8.575 1.695 6.28A1 1 0 00.28 7.695l3 3a1 1 0 001.414 0l7-7A1 1 0 0010.28 2.28z" />
                        </svg>
                        <span>Lorem ipsum dolor sit amet consecte.</span>
                    </li>
                </ul>
                <button class="font-semibold text-sm inline-flex items-center justify-center px-3 py-2 border border-transparent rounded leading-5 shadow transition duration-150 ease-in-out w-full bg-green-400 hover:bg-green-500 text-white focus:outline-none focus-visible:ring-2">Call To Action</button>
            </div>
        </div>
    </div>
</section>

<!-- More components -->
<div x-show="open" class="fixed bottom-0 right-0 w-full md:bottom-8 md:right-12 md:w-auto z-60" x-data="{ open: true }">
    <div class="bg-gray-800 text-gray-50 text-sm p-3 md:rounded shadow-lg flex justify-between">
        <div>👉 <a class="hover:underline ml-1" href="https://cruip.com/?ref=codepen-cruip-snippet-11" target="_blank">More components on Cruip.com</a></div>
        <button class="text-gray-500 hover:text-gray-400 ml-5" @click="open = false">
            <span class="sr-only">Close</span>
            <svg class="w-4 h-4 flex-shrink-0 fill-current" viewBox="0 0 16 16">
                <path d="M12.72 3.293a1 1 0 00-1.415 0L8.012 6.586 4.72 3.293a1 1 0 00-1.414 1.414L6.598 8l-3.293 3.293a1 1 0 101.414 1.414l3.293-3.293 3.293 3.293a1 1 0 001.414-1.414L9.426 8l3.293-3.293a1 1 0 000-1.414z" />
            </svg>
        </button>
    </div>
</div>
              
            
!

CSS

              
                section {
  font-family: 'Inter', sans-serif;
}
              
            
!

JS

              
                
              
            
!
999px

Console