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="root"></div>



                body {
  background-color: #f2f2f2;

p {
  font-weight: lighter;

.line-divider {
  height: .1em;
  width: 100%;
  background-color: #f2f2f2;
  color: #f2f2f2;
  margin: .8em;

.element-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: 20px;
  background-color: white;
  width: 18em;
  border-radius: .5em;
  padding: 1em;
  margin: auto;
  margin-top: 1em;
  margin-bottom: 1em;


                class App extends React.Component {
  state = {
    bibleVerse: null,
    bibleRef: null,

  getVerse = () => {
    const randomQueryNum = 19001000 + (Math.floor(Math.random()*9) * 10000)
    const randomQuery = `${randomQueryNum}-${randomQueryNum+5}`
`, {
      headers: {
      'Authorization': 'Token b96c215fb2619d00512c3c1766d7be45e0a7f740'
      .then(response => response.json())
      .then(data => this.setState({bibleVerse: data.passages, bibleRef: data.canonical}))

  render() {
    return (
      <div className="element-main">

          <h2>Random Bible Verse <i className="book icon"></i></h2>

          <button className={`ui right labeled icon button large`} onClick={this.getVerse}>
            Generate<i className="angle right icon"></i>

          {!!this.state.bibleVerse && (
            <div className='ui segment'>


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