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>


                @import url('');

* {
  padding: 0;
  margin: 0;
  border: 0;
  box-sizing: border-box;

body {
  background-color: rgb(24, 26, 30);
  font-family: 'Open Sans';

.tabs {

.tab {
  padding: 15px;
  background-color: rgb(24, 26, 30);
  border: 1px rgba(255,255,255,.15) solid;
  box-shadow: 0px 3px 10px rgba(255,255,255,.1);
  /* border-bottom: 5px rgba(255,255,255,.1) solid; */
  color: rgba(255,255,255,0.5);
  width: max-content;
  float: left;
  margin-left: 15px;
  position: relative;
  transition: box-shadow .5s ease 0s, top .5s ease 0s, border .5s ease 0s, color .5s ease 0s;
  top: 0;

.tab:first-child {
  margin-left: 0;

.tab:hover {
  cursor: pointer;
  box-shadow: 0px 6px 15px rgba(255,255,255,.5);
  top: -3px;
  border: 1px rgba(255,255,255,.3) solid;
  color: rgba(255,255,255,0.8);
  /* border-bottom: 5px rgba(255,255,255,.3) solid; */ 

.tabs .active {
  /* border-bottom: 5px rgba(255, 33, 33, 1) solid; */
  box-shadow: 0px 6px 15px rgba(255, 30, 30, .5);
  border: 1px rgba(255,30,30,.4) solid;
  top: -3px;
  color: rgba(255,50,50,1);

section {
  margin: 15px auto;
  width: 700px;

.tabs menu ul {
  list-style: none;

.tabs menu + div {
  clear: both;
  margin-top: 15px;
  padding: 15px 0;
  color: white;
  line-height: 1.5;
  color: rgba(255,255,255,.6);



                const Component = React.Component;

const TAB_DATA = [
  ["about", "lorem ipsum dolor sit amet"],
  ["contact", "Curabitur in augue erat. Vestibulum in fermentum ante, sit amet consectetur neque. Maecenas tempor nisl sollicitudin, blandit sapien ut, fermentum metus."],
  ["portfolio", "Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aliquam aliquam, nisi vitae maximus tincidunt, justo leo auctor neque, et fermentum ante libero ac libero."],
  ["cool stuff", ""]

class Tabs extends Component {
  constructor(props) {
    this.state = {
      active: 0
  clickHandler = (e) => {
      active: parseInt(e.currentTarget.attributes.num.value)
  render() {
    let content = "";
    const tabs =[label, text], i) => {
      content = === i ? text : content;  
      return <li 
               className={ === i ? "tab active" : "tab" } 
    return ( 
      <section className="tabs">

const App = () => {
  return (
        <Tabs />

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