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.




  background orange
  background radial-gradient(ellipse at center, orange 0%, darken(orange, 20%) 100%)
  width 100%
  height 100vh
  font-family 'San Francisco', 'Helvetica Neue', Roboto, Helvetica, Arial, sans-serif
  font-weight 100
  margin 10%
  outline none
  font-size 40px
  border none
  background none
  color mix(white, orange, 80%)
  transition color .3s ease-in-out
    color mix(white, orange, 90%)

 lightBlue = mix(blue, white, 20%)
  position fixed
  top 0
  right 0
  width 250px
  height 100vh
  background mix(blue, black, 20%)
  color lightBlue
  border-left 1px solid alpha(lightBlue, 50%)
  box-shadow 0 2px 20px black
  transform translateX(300px)
  opacity 0
    outline none
    font-size 30px
    border none
    background none
    color mix(red, orange, 50%)
    text-align left
    width 100%
    transition color .3s ease-in-out
    transform translateY(-40px)
    opacity 0
      color mix(red, orange, 70%)
    border-bottom 1px solid alpha(lightBlue, 50%)
    padding 5px 10px
    font-size 120%
    opacity 0
      color orange
      margin-right 20px


                const MenuItem = ({iconName, text}) => (
  <div className='MenuItem'>
    <i className={classNames('fa', 'fa-' + iconName)}/>

const Menu = ({onClick}) => {
 const items = [
   { iconName: 'home', text: 'Welcome' },
   { iconName: 'cog', text: 'Settings' },
   { iconName: 'unlock', text: 'Log out' }
 return (
  <div className='Menu'>
     <button onClick={onClick}>
       <i className='fa fa-times' />
    { => <MenuItem key={i.iconName} iconName={i.iconName} text={i.text} />)

class MainApp extends React.Component {
  constructor(props) {
    this.state = { open: false };
    this.onClick = this.onClick.bind(this);
  onClick() {
    this.setState({open: !});
    const $Menu = $('.Menu');
    const $button = $Menu.find('button');
    const $MenuItems = $Menu.find('.MenuItem');
    const options = {display: false, duration: 150, easing: 'ease-in-out', stagger: 60 };
    const seqIn = [
      {e: $Menu, p: 'transition.slideRightIn', o: options },
      {e: $MenuItems, p: 'transition.slideRightIn', o: options },
      {e: $button, p: 'transition.slideDownIn', o: options}
    const seqOut = [
      {e: $MenuItems, p: 'transition.slideRightOut', o: options },
      {e: $button, p: 'transition.slideUpOut', o: options},
      {e: $Menu, p: 'transition.slideRightOut', o: options }
    $.Velocity.RunSequence( ? seqOut : seqIn);
  render() {
    return (
        <button className='main' onClick={this.onClick} >
          <i className={classNames('fa', {
            'fa-toggle-off': !,
          })} />
        <Menu onClick={this.onClick} />

  <MainApp />,