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

              
                <header>
	<a href="#" class="button" data-variant="link">

		<svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" class="sc-5ec660b0-6 Hwnej">
			<path d="M6.235 19.305c.19-.457.364-.921.523-1.394m7.666 3.09a29.67 29.67 0 0 0 1.222-4.58m4.043.832c.376-2.026.573-4.115.573-6.25A8.253 8.253 0 0 0 8.398 3.58M3.262 15.155c.323-1.332.494-2.722.494-4.152 0-1.795.573-3.457 1.547-4.811m6.706 4.81a25.765 25.765 0 0 1-2.048 10.09M7.677 14c.135-.98.205-1.98.205-2.997a4.126 4.126 0 0 1 8.253 0c0 .502-.012 1.001-.037 1.497" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" stroke="#000"></path>
			<path d="M6.235 19.305c.19-.457.364-.921.523-1.394m7.666 3.09a29.67 29.67 0 0 0 1.222-4.58m4.043.832c.376-2.026.573-4.115.573-6.25A8.253 8.253 0 0 0 8.398 3.58M3.262 15.155c.323-1.332.494-2.722.494-4.152 0-1.795.573-3.457 1.547-4.811m6.706 4.81a25.765 25.765 0 0 1-2.048 10.09M7.677 14c.135-.98.205-1.98.205-2.997a4.126 4.126 0 0 1 8.253 0c0 .502-.012 1.001-.037 1.497" class="touch"></path>
		</svg>

		<span>Login</span>
	</a>

	<a href="#" class="button" data-variant="glass">
		<svg width="18" height="18" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
			<path stroke="#000" stroke-width="1.5" d="M13.5 12.8053C14.2525 12.3146 14.75 11.4654 14.75 10.5C14.75 8.98122 13.5188 7.75 12 7.75C10.4812 7.75 9.25 8.98122 9.25 10.5C9.25 11.4654 9.74745 12.3146 10.5 12.8053L10.5 14.75C10.5 15.5784 11.1716 16.25 12 16.25C12.8284 16.25 13.5 15.5784 13.5 14.75L13.5 12.8053Z"></path>
			<circle cx="12" cy="12" r="9.25" stroke="#000" stroke-width="1.5"></circle>
		</svg>

		<span>Start your trial</span>
	</a>
</header>

<svg style={{ display: "none" }}>
	<filter id="noiseFilter">
		<feTurbulence type="fractalNoise" baseFrequency="6.29" numOctaves="2" stitchTiles="stitch" />
		<feColorMatrix type="saturate" values="0" />
	</filter>
</svg>
              
            
!

CSS

              
                body {
	background: #e7e7e7;
	position: relative;

	// Bit of noise
	&::before {
		content: "";
		pointer-events: none;
		position: absolute;
		inset: 0;
		filter: url(#noiseFilter);
		opacity: 0.2;
	}
}

header {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 100dvh;
}

.button {
	user-select: none;
	cursor: pointer;

	display: inline-flex;
	align-items: center;
	gap: 8px;

	height: 32px;
	min-width: 136px;
	border-radius: 9999px;
	padding: 0 17px 0 12px;

	font-weight: 600;
	font-size: 14px;
	line-height: 32px;
	letter-spacing: -0.01em;
	text-align: center;
	color: #000;

	transition: 200ms ease;
	transition-property: box-shadow, background, transform;

	&[data-variant="link"] {
	}

	&[data-variant="glass"] {
		position: relative;
		background: rgba(105, 105, 105, 0.04);
		backdrop-filter: blur(1px);
		box-shadow: 0 78px 51px 0 rgba(0, 0, 0, 0.1),
			0 50px 30px 0 rgba(0, 0, 0, 0.07), 0 30px 16px 0 rgba(0, 0, 0, 0.06),
			0 16px 8px rgba(0, 0, 0, 0.04), 0 6px 4px rgba(0, 0, 0, 0.04),
			0 2px 2px rgba(0, 0, 0, 0.02);

		--gradientBorder-size: 1px;
		--gradientBorder-gradient: linear-gradient(
			to bottom,
			rgba(255, 255, 255, 0.94),
			#797979 26%,
			#a4a4a4 63%,
			#fff 100%
		);

		&::before {
			content: "";
			pointer-events: none;
			user-select: none;
			position: absolute;
			top: 0;
			right: 0;
			bottom: 0;
			left: 0;
			border-radius: inherit;
			padding: var(--gradientBorder-size, 1px);
			background: var(--gradientBorder-gradient);

			mask: linear-gradient(black, black) content-box,
				linear-gradient(black, black);
			-webkit-mask-composite: xor;
			mask-composite: exclude;
		}
	}

	&:active {
		box-shadow: none;
		transform: scale(0.95);
	}
}

@layer reset {
	*,
	*::before,
	*::after {
		box-sizing: border-box;
	}

	:root {
		color-scheme: light;
	}

	html,
	body {
		margin: 0;
		height: 100%;
		font-family: system-ui, sans-serif;
		-moz-osx-font-smoothing: grayscale;
		-webkit-font-smoothing: antialiased;
	}

	a {
		text-decoration: none;
	}
}

              
            
!

JS

              
                
              
            
!
999px

Console