Pen Settings



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


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


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.


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.


                <p><strong>Click the buttons with a pointing device and focus them with the keyboard using the tab key.</strong></p>
<p>This is the default behavior in browsers without support for <code>:focus-visible</code>. The focus styles appear also on mouse click:</p>
<button>Without :focus-visible</button>
<p>In browsers with support for <code>:focus-visible</code>, focus styles will only be visible on keyboard focus – without the need for a polyfill! Other browsers still show the default <code>:focus</code> styles. Progressive enhancement at work. ;)</p>
<button class="with-focus-visible">With :focus-visible</button>


                *, *::before, *::after {

body {
  font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  background-color: #e6e8ea;
  margin: 0;
  padding: 1rem;

button {
  display: block;
  margin: 0 0 1rem;
  color: #fff;
  background-color: #303753;
  border: none;
  font-size: 1.25rem;
  padding: 1rem 1.5rem;
  border-radius: 0.25em;
  transition: background-color 0.14s ease;
  cursor: pointer; // …or not? ;)

button:active {
  transform: translateY(1px);

button:focus {
  box-shadow: 0 0 0 3px #dc143f;
  outline: 0;

button:hover {
  background-color: #223b9c;

button.with-focus-visible:focus:not(:focus-visible) {
  box-shadow: none;
  outline: 0;

button.with-focus-visible:focus-visible, button.with-focus-visible:moz-focusring {
  box-shadow: 0 0 0 3px #dc143f;
  outline: 0;