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.


                <p id="text" contenteditable>yes!</p>
<canvas id="confetti"></canvas>

<small>Click to start</small>


                html {
	height: 100%;

body {
	height: 100%;
  	background: linear-gradient(to left, #12c2e9, #c471ed, #f64f59);

p {
	--yest: 0;
	font-family: "Chee";
	font-variation-settings: 'yest' var(--yest);
	font-size: 18vw;
	color: #5c1181;
	// Positioning
	position: absolute;
	top: 50%;
	transform: translate(0, -50%);
	margin: 0;
	width: 100%;
	text-align: center;

#confetti {
	position: absolute;
	top: 0%;
	left: 0%;
	width: 100%;
	height: 100%;
	z-index: -1;

small {
	text-align: center;
	position: absolute;
	bottom: 0;
	width: 100%;
	color: white;
	font-weight: bold;
	margin-bottom: 20px;
	font-size: 20px;
	text-transform: uppercase;


                // Audio code from Ruth's Demo!! -
// create audio context and make sure it gets activated
const audioCtx = new AudioContext();
let data = new Uint8Array(2);

// create analyser 
const analyserNode = new AnalyserNode(audioCtx, {
	fftSize: 64,
	maxDecibels: -25,
	minDecibels: -60,
	smoothingTimeConstant: 0.5,

function getAnalyserData() {
	const minAxisValue = 1000;
	const maxAxisValue = 0;

	const minEventValue = 0;
	const maxEventValue = 255;
	// Get the current event value
	const element = document.querySelector("p");"--yest", 0);
    if (data[0] === 255) {"--yest", 1000);
	} else {
		fluidAxisVariation(minAxisValue, maxAxisValue, minEventValue, maxEventValue, data[0],"--yest", element);

// set draw after stream has started
function getStreamData() {
	// pipe in analysing to getUserMedia
	return navigator.mediaDevices.getUserMedia({ audio: true, video: false })
		.then(stream => audioCtx.createMediaStreamSource(stream))
		.then(source => {

// resume
window.addEventListener("click", event => {

// Fluid Axis Variation
function fluidAxisVariation(minimumAxisValue, maximumAxisValue, minimumEventValue, maximumEventValue, eventValue, axisCustomPropertyName, element) {

	const minAxisValue = minimumAxisValue;
	const maxAxisValue = maximumAxisValue;
    const minEventValue = minimumEventValue;
	const maxEventValue = maximumEventValue;
	const currentEventValue = eventValue;

	const eventPercent = (currentEventValue - minEventValue) / (maxEventValue - minEventValue);
	const fontAxisScale = eventPercent * (minAxisValue - maxAxisValue) + maxAxisValue;

	const newAxisValue = currentEventValue > maxEventValue
	   ? minAxisValue
       : currentEventValue < minEventValue
   			? maxAxisValue
   			: fontAxisScale;, newAxisValue);