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 class="warning">🚨 Your browser does not support :focus-visible. Try in Chrome 86. 🚨</p>

<p>Click on the button using a mouse. Then try tabbing to the button.</p>
<button>Custom Button</button>


                button {
  background-color: #c2185b;
  color: white;
  font-size: 1.5rem;
  border: none;
  border-radius: 1em;
  padding: .5em 1em;

/* Keyboard will use a large outline. */
button:focus-visible {
  outline: 4px dashed black;

/* Mouse/Touch will use a subtle drop shadow. */
button:focus:not(:focus-visible) {
  outline: none;
  box-shadow: 1px 1px 5px rgba(1, 1, 0, .7);

/* Just used for feature detection. */
.warning {
  display: none;
  font-size: 24px;
  font-weight: bold;


                // A little script to detect :focus-visible support.
// h/t to Noal Lawson for the original snippet!

function supports(selector) {
  const style = document.createElement('style');
  try {
    style.sheet.insertRule(selector + '{}', 0)
  } catch (e) {
    return false
  } finally {
  return true

if (!supports(':focus-visible')) {
  document.querySelector('.warning').style.display = 'block';