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.




  width: 200px
  display: inline-block
  border: 1px solid #000
  margin: 0 5px 0 0
  padding: 5px
  border: 1px solid #000
  padding: 4px
  width: 420px
  background: #008A45
  color: #FFF


                ###* @jsx React.DOM###

simpleData = [
	name: 'abcd'
	age: 18
	name: 'defg'
	age: 23
  name: "aijkl"
  age: 20
  name: "mnop"
  age: 16
  name: "rstu"
  age: 21
  name: "vwxy"
  age: 35

List = React.createClass
	render: ->
    list = @props.list || {}
    ListElement = `(<h1>No data</h1>)`
    if Object.keys(list).length > 0
      ListElement = (value, key) ->
          	<span className="name">{}</span>
          	<span className="age">{value.age}</span>

    			<span className="header">Name</span>
    			<span className="header">Age</span>
Search = React.createClass
	getInitialState: ->
    list: simpleData
  instantSearch: ->
    kw =
    resultList = []
    if kw isnt "" (value, key) ->
        if isnt -1 or value.age.toString().indexOf(kw) isnt -1
          resultList.push value
      resultList = simpleData
    	list: resultList
  render: ->
      <div className="search">
      	<input type="text" ref="kw" placeholder="Enter name or age" onChange={this.instantSearch} />
      	<List list={this.state.list} />

React.renderComponent `<Search />`, document.body