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

              
                <div id="app"></div>
              
            
!

CSS

              
                
              
            
!

JS

              
                "use client";
const { useState } = React;
const { createRoot } = ReactDOM;

function App() {
  return (
    <div className="face flex items-center justify-center w-full h-screen min-h-[300px]">
      <div className="relative w-[300px] h-[300px] border-[3px] border-black rounded-full bg-[#fe935d]">
        {/* Eyebrows */}
        <div className="eyebrowsWrapper flex justify-between w-[190px] h-[50px] mt-[50px] mx-auto">
          <div className="eyebrows eyebrows--left w-[70px] h-[50px] rounded-t-[50px] border-t-[3px] border-r-[3px] border-l-[3px] border-black"></div>
          <div className="eyebrows eyebrows--right w-[70px] h-[50px] rounded-t-[50px] border-t-[3px] border-r-[3px] border-l-[3px] border-black"></div>
        </div>
        {/* Eyes */}
        <div className="eyeWrapper relative w-[160px] h-[54px] mt-[-25px] mx-auto">
          <div className="eye eye--left absolute w-[40px] h-[50px] bg-black rounded-full left-0"></div>
          <div className="eye eye--right absolute w-[40px] h-[50px] bg-black rounded-full right-0"></div>
        </div>
        {/* Nose */}
        <div className="noseWrapper flex justify-center">
          <div className="nose nose--left relative w-[80px] h-[80px] rounded-full bg-[#fe523c] mt-[5px] mr-[-5px]">
            <div className="before block w-[60%] h-full ml-auto rounded-r-[70px] border-t-[3px] border-r-[3px] border-b-[3px] border-black"></div>
          </div>
          <div className="nose nose--center relative w-[80px] h-[80px] z-[1] rounded-full bg-[#fc2812] border-[3px] border-black">
            <div className="after absolute top-[calc(50%-6px)] left-[calc(50%-6px)] block w-[12px] h-[12px] bg-white"></div>
          </div>
          <div className="nose nose--right relative w-[80px] h-[80px] rounded-full bg-[#fe523c] mt-[5px] ml-[-5px]">
            <div className="before block w-[60%] h-full rounded-l-[70px] border-t-[3px] border-b-[3px] border-l-[3px] border-black"></div>
          </div>
        </div>
        {/* Mouth */}
        <div className="mouse relative w-[140px] h-[40px] mt-[-5px] mx-auto overflow-hidden">
          <div className="before absolute top-[-30px] left-0 block w-full h-[70px] rounded-b-[70px] border-r-[3px] border-b-[3px] border-l-[3px] border-black"></div>
        </div>
      </div>
    </div>
  );
}

const container = document.getElementById("app");
const root = createRoot(container); // createRoot(container!) if you use TypeScript
root.render(<App />);

              
            
!
999px

Console