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.

+ add another resource


Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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


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.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.


              <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);