Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ 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.


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.


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


  text-align center
  color #FF8446
  font-size 3em
  margin .3em

  border solid 1px #FF8446
  background lighten(#FF8446, 10%)
  padding .5em 1em
  color white
  font-weight bold
  & + button
    margin-left .3em
body > div

  & > div
    margin 0 1em

  text-align left
  transition opacity 2s linear
  opacity 1

    opacity 0



                // @jsx x
const { x, atto, Context } = xatto

const down = context => ({ count: context.count - 1 })
const up = context => ({ count: context.count + 1 })

const Counter = (props, children, context) => (
    <button onclick={down}>-</button>
    <button onclick={up}>+</button>

let idx = 2

const add = context => ({
  counters: { ...context.counters, ...(Object.fromEntries([[idx++, {count: 0}]])) }

const cut = context => {
  const entry = Object.entries(context.counters).slice(-1)[0]
  if (entry == null) {
  delete context.counters[entry[0]]
  return {
    counters: { ...context.counters }

const Main = (props, children, context) => (
    <button onclick={add}>add</button>
    <button onclick={cut}>cut</button>

      .map(([i, v]) => (<Context slice={'counters.' + i}><Counter /></Context>))}

    <pre>{JSON.stringify(context, null, '  ')}</pre>

atto(Main, document.getElementById("app"))({
  counters: {
    0: { count: 0 },
    1: { count: 10 }