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



                @import url('');

* {
	box-sizing: border-box;

body {
	font-family: 'Montserrat', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  margin 0;

.progress {
  background-color: #d8d8d8;
  border-radius: 20px;
	position: relative;
	margin: 15px 0;
	height: 30px;
	width: 300px;

.progress-done {
  background: linear-gradient(to left, #F2909C,#FF9472);
  box-shadow: 0 3px 3px -5px #F2909C, 0 2px 5px #F2909C;
  border-radius: 20px;
	color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0; /* dynamic - controlled by js */
  width: 0; /* dynamic - controlled by js */
	transition: 2s ease; 
	/* animation: takes (1 second), type=ease, delay=0.3s */



                // progress component
const Progress = ({done}) => {
	// create an empty object to use later see in style
	const [style, setStyle] = React.useState({});
	setTimeout(() => {
		const newStyle = {
				opacity: 1,
				width: `${done}%`
	}, 1000);
	return (
		<div class="progress">
  		<div class="progress-done" style={style}>

// app component
// think of this as the html housing - like the body or page
const App = () => (
		<h1>React Progress Bar</h1>
		<Progress done="30"/>
		<Progress done="50"/>
		<Progress done="70"/>
		<Progress done="100"/>
// now add the component to the DOM
// and we target the div we ut int the html i.e with name "app"
ReactDOM.render(<App />, document.getElementById('app'));