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.



Go PRO Window blinds lowered to protect code. Code Editor with window blinds (raised) and a light blub turned on.

Keep it secret; keep it safe.

Private Pens are hidden everywhere on CodePen, except to you. You can still share them and other people can see them, they just can't find them through searching or browsing.

Upgrade to PRO


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.


Make Template?

Templates are Pens that can be used to start other Pens quickly from the create menu. The new Pen will copy all the code and settings from the template and make a new Pen (that is not a fork). You can view all of your templates, or learn more in the documentation.

Template URL

Any Pen can act as a template (even if you don't flip the toggle above) with a special URL you can use yourself or share with others. Here's this Pen's template URL:


Screenshot or Custom Thumbnail

Screenshots of Pens are shown in mobile browsers, RSS feeds, to users who chose images instead of iframes, and in social media sharing.

This Pen is using the default Screenshot, generated by CodePen. Upgrade to PRO to upload your own thumbnail that will be displayed on previews of this pen throughout the site and when sharing to social media.

Upgrade to PRO


<script src=""></script>
<script src=""></script>
<div class="container">
    <svg version="1.1" xmlns="" x="0px" y="0px"
     width="819.999px" height="356px" viewBox="170.473 138.068 819.999 356">


 <rect id="bg" x="170.473" y="138.068" fill="#BCE2E8" width="819.999" height="356"/>

<g id="phone-booth" class="phone-booth-part">
    <path id="shadow" fill="#ABCCD2" d="M376.689,452.5h-128.25c-1.994,0-3.625-1.631-3.625-3.625l0,0
    <rect id="section" x="252.247" y="211.699" fill="#DD5858" width="120.791" height="29.255"/>
    <rect id="label" x="266.076" y="217.846" fill="#EFEFEF" width="93.132" height="16.961"/>
    <path id="top-outline" fill="#F26762" d="M252.246,211.699c0-15.077,27.041-27.299,60.396-27.299s60.396,12.222,60.396,27.299
    <path id="top" fill="#C94F4F" d="M261.063,212.018c0-11.9,23.093-21.547,51.579-21.547s51.579,9.646,51.579,21.547H261.063z"/>
    <rect id="line" x="277.362" y="224.902" fill="#C94F4F" width="70.56" height="2.846"/>
    <rect id="glass" x="269.881" y="256.805" fill="#D9D9D9" width="85.522" height="165.368"/>

<g id="phone-bottom-door-front" class="phone-booth-part">
    <path class="phone-booth-door" fill="#000" d="M480.253,452.666H365.394c-1.786,0-3.247-1.631-3.247-3.625l0,0c0-1.994,1.46-3.625,3.247-3.625
    <path class="phone-booth-door" fill="#000" d="M467.381,283.717v-3.13h-18.551V256.82h-3.479v23.767h-41.813V256.82h-3.473v23.767h-18.161v3.13h18.161
        h18.551v-3.129h-18.551v-25.061H467.381z M445.356,393.346h-41.817v-25.062h41.817V393.346z M445.356,365.156h-41.817v-25.061
        h41.817V365.156z M445.356,336.966h-41.817v-25.06h41.817V336.966z M445.356,308.777h-41.817v-25.061h41.817V308.777z"/>
    <path class="phone-booth-door" fill="#000" d="M373.75,248.918v198.416h102.527V248.918H373.75z M467.946,422.285h-85.288V256.293h85.288V422.285z"/>
    <path class="phone-booth-door" id="handle" fill="#C6C6C6" d="M471.67,360.051L471.67,360.051c-0.734,0-1.334-0.601-1.334-1.336v-13.08

<g id="phone-booth-front" class="phone-booth-part">
    <path fill="#777777" d="M302.224,320.801c-1.721-12.786-8.935-12.643-10.652-12.412
        C300.716,332.857,303.356,329.214,302.224,320.801z M291.398,315.34c0.666-0.075,1.662-0.168,2.182-0.298
        c-1.05,0.146-0.903-1.132-1.538-1.118c-0.482,0.017-1.33,0.153-1.977,0.262l-2.035-12.062V315.34L291.398,315.34z M297.585,354.346

    <path id="grate" fill="#DD5858" d="M355.403,283.648v-3.123H336.84v-23.721h-3.475v23.721h-41.84v-23.721h-3.475v23.721h-18.17
        v-25.011h18.563v-3.123H336.84v-25.012H355.403z M333.366,393.062h-41.84V368.05h41.84V393.062z M333.366,364.928h-41.84v-25.011
        h41.84V364.928z M333.366,336.794h-41.84v-25.011h41.84V336.794z M333.366,308.66h-41.84v-25.012h41.84V308.66z"/>
    <path fill="#F26762" d="M252.247,240.954v206.314h120.791V240.954H252.247z M358.501,424.168h-92.333
    <path id="phone-booth-frame-inner" fill="#DD5858" d="M261.063,248.879v198.39H364.22v-198.39H261.063z M355.25,421.75h-85.5v-165



                body {
	background-color: #BCE2E8;

  max-width: 100%;
	margin: 0 auto;
	display: block;


                // Create timeline instance
var tl = new TimelineMax({

// Change default ease
TimelineMax.defaultEase = Expo.easeout;
		// Phone booth parts
var phoneBooth = document.getElementsByClassName("phone-booth-part"),
		phoneBoothDoor = document.getElementsByClassName("phone-booth-door"),
		phoneBoothGlass = document.getElementById("glass");

// Start svg elements in certian states
// .set() is same as using .to() transition with a 0 second duration

// Move phone booth in
for (var i = 0; i < phoneBooth.length; i++) {
	tl.set(phoneBooth[i], {
		x: 150

// Close phone booth door by default

	tl.set(".phone-booth-door", {
css: {transform: "rotateY(90deg)"}	});

// Open phone booth door
// Use label so they animate at same time
for (var i = 0; i < phoneBoothDoor.length; i++) {[i], 0.5, {
		rotationY: -10,
	}, "open-door+=0.25");

for (var i = 0; i < phoneBoothDoor.length; i++) {[i], 0.3, {
		rotationY: 0,
		ease: Bounce.easeInOut
	}, "open-door-swing-slightly");
// Close phone booth door
for (var i = 0; i < phoneBoothDoor.length; i++) {[i], 0.3, {
		rotationY: 90
	}, "shut-door");

// Flash yellow, 0.1, {
	fill: "#98ed0c",
	yoyo: true,
	repeat: 2,
	ease: RoughEase.ease.config({
		template: Power0.easeNone,
		strength: 1,
		points: 20,
		taper: "none",
		randomize: true,
		clamp: false
}, "transformation+=0.35");, 0.35, {
	fill: "#D9D9D9"

for (var i = 0; i < phoneBoothDoor.length; i++) {[i], 0.5, {
		rotationY: -10,
	}, "re-open-door+=0.25");

for (var i = 0; i < phoneBoothDoor.length; i++) {[i], 0.3, {
		rotationY: 0,
		ease: Bounce.easeInOut
	}, "re-open-door-swing-slightly");

// Close phone booth door
for (var i = 0; i < phoneBoothDoor.length; i++) {[i], 0.3, {
		rotationY: 90
	}, "re-shut-door");

// Uncomment to start the animation from the stand-up label
// Uncomment to slow down the animation
// tl.timeScale(0.2);

A Pen is worth a thousand docs.