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.


                <div id="root"></div>


                body {
  margin: 20px;}


                import React from '';
import ReactDOM from '';
const Component = () => {
  const [inputValue, setInputValue] = React.useState('');
  return (
        onChange={e => setInputValue(}
        placeholder="상태값을 업데이트해 보세요"
        style={{ width:'200px',marginBottom: '10px' }}

      <div>상태값 : {inputValue}</div>
const App = () => {
  const [state, setState] = React.useState(true);
  return (
<div style={{marginBottom:'10px'}}>* DOM 요소의 타입이 다르면 재조정 과정에서 상태는 파괴됩니다.</div>
<div style={{marginBottom:'10px'}}>* 상태값을 입력하고 DOM트리를 업데이트해 보세요.</div>
        onClick={() => setState(!state)}
        style={{ marginBottom: '10px', cursor: 'pointer' }}
        DOM트리 업데이트 하기
      {state ? (
          <Component />
            DOM 노드 : <code> type : 'article', props: .., ..</code>
      ) : (
          <Component />
            DOM 노드 : <code> type : 'section', props: .., ..</code>

ReactDOM.render(<App />, document.getElementById('root'));