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

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.

HTML

              
                <div class="container">
        <div class="wrapper">
            <div class="button-group">
                <div class="group">
                    <p class="title">Normal Button</p>
                    <button class="button">Button</button>
                </div>
                <div class="group">
                    <p class="title">Rounded Button</p>
                    <button class="button rounded">Button</button>
                </div>
            </div>
            <div class="button-group">
                <div class="group">
                    <p class="title">Ghost Button</p>
                    <button class="button ghost">Button</button>
                </div>
                <div class="group">
                    <p class="title">Ghost Rounded Button</p>
                    <button class="button ghost rounded">Button</button>
                </div>
            </div>
            <div class="button-group">
                <div class="group">
                    <p class="title">Outline Button</p>
                    <button class="button outline">Button</button>
                </div>
                <div class="group">
                    <p class="title">Outline Rounded Button</p>
                    <button class="button outline rounded">Button</button>
                </div>
            </div>
            <div class="button-group">
                <div class="group">
                    <p class="title">Disabled Ghost Button</p>
                    <button class="button disabled ghost">Button</button>
                </div>
                <div class="group">
                    <p class="title">Disabled Normal Button</p>
                    <button class="button disabled">Button</button>
                </div>
                <div class="group">
                    <p class="title">Disabled Rounded Button</p>
                    <button class="button rounded disabled">Button</button>
                </div>
            </div>
        </div>
    </div>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;600;700&display=swap');

$brand: rgb(51,88,255);
$active: rgb(19,48,175);
$disabled: rgb(212, 212,212);

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container{
    width: 100vw;
    height: 100vh;
    background-color: rgb(239, 243, 247);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.wrapper{
    width: 100%;
    max-width: fit-content;
    display: grid;
    grid-template-columns: 1fr;
    gap:3rem;
    margin: 0 auto;
  padding:3rem 0;
}

.button-group{
    display: flex;
    gap:3rem;
}
.group{
    display: flex;
    flex-direction: column;
    gap:1rem;
    .title{
        font-size:small;
        color: rgb(156,167,189)
    }
}

.button{
    font-family: 'Nunito Sans', sans-serif;
    display: block;
    width: fit-content;
    outline:0;
    border:0;
    text-align: center;
    background-color: white;
    padding :12px 24px;
    user-select: none;
    cursor: pointer;
    filter: drop-shadow(0 2px 3px rgba(156,167,189, 0.5));
    font-weight: bold;
    text-transform: uppercase;
    color: $brand;
    transition: all 0.1s ease-in-out;
    &.rounded{
        border-radius:0.5rem;
    }
    &.ghost{
        background-color: transparent;
        filter:none;
        &:hover{
            background-color: transparent;
            color:$brand;
        }
    }
    &.outline{
        background-color: transparent;
        border: 1px solid $brand;
        filter:none;
    }
    &.disabled{
        background-color: white;
        cursor: not-allowed;
        color: $disabled;
        &:active{
            transform: inherit;
            filter:drop-shadow(0 2px 3px rgba(156,167,189,0.5));
        }
        &:hover{
            background-color: white;
            color: $disabled;
        }
        &:focus{
            box-shadow: inherit;
        }
        &.ghost{
            background-color: transparent;
            &:active{
                filter:none;
            }
        }
    }

    &:hover{
        background-color: $brand;
        color:white;
    }
    &:active{
        transform: scale(0.95);
        filter:drop-shadow(0 0 0 transparent);
    }
    &:focus{
        box-shadow: 0 0 0 2px $active;
    }
}

              
            
!

JS

              
                
              
            
!
999px

Console