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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ 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="wrapper">




                @import url(',500');
* {
  margin: 0;
  padding: 0;
  list-style: none;
  vertical-align: baseline;

div {
  position: relative;
  z-index: 2;

body {
  background-color: cyan;
  color: red;
  font-family: 'Raleway', sans-serif;
  font-weight: 400;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
.footer {
  width: 450px;
  text-align: center;
  display: block;
  margin: 15px auto 30px auto;
  font-size: 0.8em;
  color: #fff;
  a {
    font-weight: 500;
    text-decoration: none;
    color: #fff;
#quote-box {
  border-radius: 10px;   
  position: relative;
  margin:8% auto auto auto;
  box-shadow: 2px;
  width: 450px;
  height: 100px;
  padding: 40px 50px;
  display: table;
  background-color: #fff;
  .quote-text {
    i {
      font-size: 1em;
      margin-right: 0.4em;
    text-align: center;
    width: 450px;
    height: auto;
    clear: both;
    font-weight: 500;
    font-size: 1.75em;
  .quote-author {
    width: 450px;
    height: auto;
    clear: both;
    padding-top: 20px;
    font-size: 1em;
    text-align: right;
  .buttons {
    width: 450px;
    margin: auto;
    display: block;
    .button {
      height: 58px;
      border: none;
      border-radius: 1px;
      color: #fff;
      background-color: #333;
      outline: none;
      font-size: 0.85em;
      padding: 8px 18px 6px 18px;
      margin-top: 80px;
      opacity: 0;
      &:hover {
        opacity: 0.9;
      &#tweet-quote {
        float: left;
        padding: 10px;
        padding-top: 8px;
        text-align: center;
        font-size: 1.2em;
        margin-right: 5px;
        height: 30px;
        width: 40px;
      &#new-quote {
        float: right;



                class QuotesComponent extends React.Component {
     this.state ={
       input: ''   
   this.handleClick = this.handleClick.bind(this);
  let selec = quoteObj[Math.floor(Math.random()* quoteObj.length)];
  var singlequote = selec.quote;
  var singleauth =;
  let color = colors[Math.floor(Math.random()* colors.length)];
      <div id ="wrapper" style ={{background: color}}>
       <div id ="quote-box" style ={{background: color}}>
          <p id ="rep" style ={{color: 'white'}}>""{selec.quote}""</p><br /><br/>
      <div className ="quote-author" style ={{float: "right", color: 'white'}}><span id ="author">--{}</span></div><br /><br /><br/>
          <button className ="tweet-button">   
        className='btn btn-primary'
        title="Tweet this quote!"
        <i className="fa fa-twitter"></i>
              type = "button"
              value = {singlequote}
              secvalue = {singleauth}
              onClick = {this.handleClick}
              style ={{float: 'right', background: color, color: 'white'}}
              className='btn btn-primary'
            >New quote</button>

var colors = [
var quoteObj = [{author: "Felix", quote: "Winners never quit and quiters never win, so never give up"}, {author: "M. Luther Jr", quote: "Freedom is not willingly given by the oppressor, but is demanded by the oppressed"}, {author: "2Pac", quote: "All eyes on me, and never take them off"}, {author: "Lucky Dube", quote: "We've gat the wind that blows everyday, Let Jah be praise"}, {author: "Lucky Dube", quote: "We've gat the moon and the stars that gives us light in the dark, Let Jah be praise"}, {author: "Lucky Dube", quote: "But in the coners of our hearts We've gat a question, and the question is, where do all this come from, Let Jah be praise"}, {author: "Lucky Dube", quote: "The world is turning around but we don't know how, they say the world is turning around but we don't know how, Let Jah be praise"}, {author: "Lucky Dube", quote: "Only God knows...ows... ehhehe...heeheee, Let Jah be praise"}];

ReactDOM.render(<QuotesComponent quoteObj ={quoteObj} colors ={colors} />, document.getElementById("wrapper"));