cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv


A Pen By Captain Anonymous

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation


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.

              body {
  font-family: 'Montserrat', sans-serif;
  font-size: 3em;
  text-align: center;
h1 { margin: 2em auto 5px }
button {
  display: block;
  font-size: .8em;
  border-radius: 1.5em;
  background-color: #00AED8;
  border: 2px solid #076085;
  color: white;
  padding: .5em .8em;
  margin: 1em auto;
button.hide {
  background-color: #E95D91;
#modal {
  background-color: white;
  height: 20px;
  border: 1px solid black;
  border-radius: .2em;
  position: absolute;
  top: 10%;
  left: 50%;
  margin-left: -160px;
  padding: 2em;
  text-align: center;
  font-size: .8em;
  transform: translateY(10vh);
  transition: 0.3s ease-in-out;
#modal.hide {
  transform: translateY(-50vh);

              const Hello = React.createClass({
  getInitialState: function() {
    const { store } = this.context

    return store.getState();
  toggleModal: function() {
    const { store } = this.context
    const state = store.getState()

    store.dispatch({ type: state.showModal ? 'HIDE' : 'SHOW' })
  render: function() {
    const { store } = this.context
    const state = store.getState()

    return (
        <button onClick={this.toggleModal} className={state.label}>{state.label}</button>
        <div id="modal" className={state.showModal ? '' : 'hide'} onClick={this.toggleModal}>
          i'm modal
  contextTypes: {
    store: React.PropTypes.object

const reducer = function(state, action) {
  let initialState = { showModal: false, name: 'Yes Modal', label: 'show' }
  switch(action.type) {
    case 'SHOW':
      return { ...state, showModal: true, label: 'hide' };
    case 'HIDE':
      return initialState;

const store = Redux.createStore(reducer, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__())

const render = function() {
    <ReactRedux.Provider store={store}>
      <Hello />

Loading ..................