cssAudio - Activefile-genericCSS - ActiveGeneric - ActiveHTML - ActiveImage - ActiveJS - ActiveSVG - ActiveText - Activefile-genericVideo - ActiveLovehtmlicon-new-collectionicon-personicon-teamlog-outoctocatpop-outspinnerstartv

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.

Quick-add: + add another resource

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.

Quick-add: + add another resource

Code Indentation

     

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.

            
              @import url('https://fonts.googleapis.com/css?family=Montserrat:400,700');

#app {
	display: flex;
	font-family: 'Montserrat', sans-serif;
	background: #121212;
	align-items: center;
	justify-content: center;
	height: 100vh;
	width: 100vw;
	overflow: hidden;
}

.App {
	background: #121212;
	display: flex;
	flex-direction: column;
	max-height: 640px;
	max-width: 380px;
	width: 380px;
	height: 640px;
	overflow: hidden;
	position: relative;
	
	.Background {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 600%;
		opacity: .9;
		pointer-events: none;
		background: linear-gradient(to bottom, rgba(10,27,53,1) 0%,rgba(214,40,92,1) 11%,rgba(214,40,92,1) 11%,rgba(224,153,11,1) 28%,rgba(206,226,234,1) 38%,rgba(118,205,242,1) 53%,rgba(255,181,91,1) 66%,rgba(128,74,137,1) 76%,rgba(128,74,137,1) 76%,rgba(21,25,43,1) 100%); 
		transition: top 3s ease .125s;
		
		&[data-step="1"] {
			top: 0%;
		}
		
		&[data-step="2"] {
			top: -300%;
		}
		
		&[data-step="3"] {
			top: -500%;
		}
		
	}

	.Slides {
		height: 90%;
		width: 100%;
		overflow: hidden;
		position: relative;
		
		&[data-step="1"] {
			.Wrapper {
				left: 0%;
			}
			
		}
		
		&[data-step="2"] {
			.Wrapper {
				left: -100%;
			}
			
		}
		
		&[data-step="3"] {
			.Wrapper {
				left: -200%;
			}
		}
		
		.Wrapper {
			display: flex;
			position: relative;
			left: 0%;
			width: 300%;
			height: 100%;
			transition: left .25s ease-in-out .125s;
		}
		
		.Slide {
			align-items: center;
			color: white;
			display: flex;
			flex-direction: column;
			height: 100%;
			justify-content: center;
			width: 33.33%;
			
			.fa {
				font-size: 128px;
				margin-bottom: 30px;
			}
			
			.Text {
				font-size: 18px;
				padding: 0 20%;
				line-height: 1.4;
				text-align: center;
			}
		}
	}
	
	.Footer {
		display: flex;
		justify-content: space-between;
		flex: 1 0 auto;
		position: relative;
		
		&[data-step="1"] {
			.Button--prev {
				pointer-events: none;
				opacity: .5;
			}
		}
		
		&[data-step="3"] {
			.Button--next {
				pointer-events: none;
				opacity: .5;
			}
		}
		
		.Button {
			align-items: center;
			color: white;
			display: flex;
			justify-content: center;
			padding: 10px;
			transition: opacity .125s ease-in-out;
			width: 15%;
		}
		
		.Dots {
			align-items: center;
			flex: 1 0 auto;
			display: flex;
			justify-content: center;
			
			@for $i from 1 through 3 {
				&[data-step="#{$i}"] {
					.Dot:nth-child(#{$i}) {
						opacity: 1;
					}
				}
			}
			
			.Dot {
				background: white;
				opacity: .5;
				margin: 5px;
				width: 8px;
				height: 8px;
				border-radius: 8px;
				transition: opacity .125s ease-in-out;
			}
		}
	}
}
            
          
!
            
              var App = React.createClass({
	getInitialState: function() {
		return {
			step: 1
		}	
	},
	
	increaseStep: function() {
		var step = this.state.step;
		step++;
		
		this.setState({ step: step });
	},
	
	decreaseStep: function() {
		var step = this.state.step;
		step--;
		
		this.setState({ step: step });
	},
	
	render: function() {
		return (
			<div className="App">
				<div className="Background" data-step={this.state.step}></div>
				<Slides step={this.state.step} />
				<Footer increaseStep={this.increaseStep} decreaseStep={this.decreaseStep} step={this.state.step} />
			</div>
		)
	}
});

var Slides = React.createClass({
	render: function() {
		return (
			<div className="Slides" data-step={this.props.step}>
				<div className="Wrapper">
					<Slide text="The first step of onboarding, that is a thing." icon="comments-o" />
					<Slide icon="calendar-plus-o" text="Second step of onboarding, showing the things." />
					<Slide icon="gears" text="Final step of onboarding. Weeee, carousels!" />
				</div>
			</div>
		);
	}
});

var Slide = React.createClass({
	render: function() {
		return (
			<div className="Slide">
				<i className={'fa fa-fw fa-' + this.props.icon} />
				<div className="Text">{this.props.text}</div>
			</div>
		)
	}
});

var Footer = React.createClass({
	render: function() {
		return (
			<div className="Footer" data-step={this.props.step}>
				<div className="Button Button--prev" onClick={this.props.decreaseStep}><i className="fa fa-fw fa-chevron-left" /></div>
				<div className="Dots" data-step={this.props.step}>
					<div className="Dot" />
					<div className="Dot" />
					<div className="Dot" />
				</div>
				<div className="Button Button--next" onClick={this.props.increaseStep}><i className="fa fa-fw fa-chevron-right" /></div>
			</div>
		);
	}
});

ReactDOM.render(
	<App />,
	document.getElementById('app')
);
            
          
!
999px
Loading ..................

Console