Pen Settings

HTML

CSS

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. You can use the CSS from another Pen by using it's URL and the proper URL extention.

+ add another resource

JavaScript

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

Packages

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.

Behavior

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.

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.

HTML

              
                <div id="root"></div>

              
            
!

CSS

              
                $light: #fff;
$dark: #222;
$blue: #2196f3;
$red: #fb3838;

body {
	box-sizing: border-box;
	height: 100%;
}

/* Form
----------------------------*/
form {
	overflow: hidden;
	width: 300px;
	margin: 1em auto;
	select,
	input {
		font-weight: 500;
		font-size: 1em;
		line-height: 1em;
		width: calc(100% / 3 - 0.4em);
		height: 2.5em;
		float: left;
		padding: 0.5em;
		margin: 0 0.2em;
		border: 1px solid lighten($dark, 80%);
		border-width: 0 0 2px 0;
		background: transparent;
		color: $dark;
		outline: none;
		transition: all 500ms ease-in-out;
		&:hover,
		&:focus {
			cursor: pointer;
			outline: none;
			transition: all 500ms ease-in-out;
		}
	}
	input[type="submit"] {
		border: 1px solid $blue;
		background: $blue;
		color: $light;
		&:hover,
		&:focus {
			border-color: lighten($blue, 20%);
			background: lighten($blue, 20%);
		}
	}
	option {
		color: $dark;
	}
	option:disabled {
		color: lighten($dark, 60%);
	}
}

/* Grid
----------------------------*/
%equal-heights {
	display: flex;
	flex-wrap: wrap;
}
.boxes {
	@extend %equal-heights;
}
.box {
	margin:1em 0.5em;
	width: calc(100% / 4 - 1em);
	@media (max-width: 960px) {
		width: calc(100% / 3 - 1em);
	}
	@media (max-width: 767px) {
		width: calc(100% / 2 - 1em);
	}
	@media (max-width: 600px) {
		width: calc(100% - 1em);
	}
}

/* Thumbs
----------------------------*/
.thumb {
	padding: 1em;
	text-align: center;
	position: relative;
	width: calc(100% - 2em);
	max-width: 12em;
	margin: auto;
	border: 1px solid darken($light, 10%);
	background: $light;
	box-shadow: 0px 4px 4px -4px $dark;
	border-radius: 4px;
	transition: background 800ms ease;
	opacity: 1;
	transform: scale(1);
	animation: show 500ms 1 ease-in-out;
	@keyframes show {
		from {
			transform:scale(0.5);
			opacity: 0;
		}
	}
	img {
		max-width: 100%;
		padding: 1em;
		width: calc(100% - 2em);
	}
	.img-loading {
    width: 100%;
    margin: auto;
    text-align:center;
    position:relative;
    color: $blue;
    div{
      display: block;
      width: 100%;
      min-height: 190px;
      margin: auto;
      background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PCEtLSBHZW5lcmF0b3I6IEdyYXZpdC5pbyAtLT48c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHN0eWxlPSJpc29sYXRpb246aXNvbGF0ZSIgdmlld0JveD0iMCAwIDg0IDE1MCIgd2lkdGg9Ijg0cHQiIGhlaWdodD0iMTUwcHQiPjxtYXNrIGlkPSJfbWFza194dWZtVmJjR1hRUTY3cTIweEpvZlNPZnVDajdNclZ3YiIgeD0iLTIwMCUiIHk9Ii0yMDAlIiB3aWR0aD0iNDAwJSIgaGVpZ2h0PSI0MDAlIj48cmVjdCB4PSItMjAwJSIgeT0iLTIwMCUiIHdpZHRoPSI0MDAlIiBoZWlnaHQ9IjQwMCUiIHN0eWxlPSJmaWxsOndoaXRlOy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NjYzIDc1Ljk1MSAxMzkuMjc5IEwgNzUuOTUxIDEzOS4yNzkgTCA3NS45NTEgMTM5LjI3OSBRIDc1Ljk1MSAxMzcuODk1IDc1LjYyMyAxMzcuMjUxIEwgNzUuNjIzIDEzNy4yNTEgTCA3NS42MjMgMTM3LjI1MSBRIDc1LjI5NiAxMzYuNjA3IDc0LjU2NiAxMzYuNjA3IEwgNzQuNTY2IDEzNi42MDcgTCA3NC41NjYgMTM2LjYwNyBRIDczLjg0NiAxMzYuNjA3IDczLjUxNiAxMzcuMjQyIEwgNzMuNTE2IDEzNy4yNDIgTCA3My41MTYgMTM3LjI0MiBRIDczLjE4NyAxMzcuODc3IDczLjE4NyAxMzkuMjc5IFogIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGZpbGw9InJnYigwLDAsMCkiLz48L3N2Zz4=)
        no-repeat center center transparent;
      animation: flash 800ms infinite ease-in-out;
      @keyframes flash {
        from {
          opacity: 0;
        }
      }
    }
  }
	figcaption {
		margin-top: 0.2em;
		font-size: 12px;
		font-weight: 700;
		color: darken($light, 30%);
	}
	&.hide {
		opacity: 0;
		transform: scale(0.2);
		animation: hideElement 200ms 1 ease-in-out;
		@keyframes hideElement {
			from {
				transform:scale(1);
				opacity: 1;
			}
		}
	}
	.img-close {
		position: absolute;
		top: -8px;
		right: -8px;
		width: 30px;
		height: 30px;
		line-height: 1.2;
		font-size: 25px;
		font-weight: bold;
		border-radius: 100%;
		cursor: pointer;
		background: $red;
		border: 1px solid darken($red, 20%);
		color: $light;
	}
}
.exists{
	border:1px solid $red;
	background:lighten($red,20%);
	transition: background 800ms ease;
	figcaption{
		color:$light;
	}
}
/* layout
----------------------------*/
.header {
	text-align: center;
	h3 {
		margin: 0;
		font-size: 2em;
		color: darken($light, 50%);
	}
}


              
            
!

JS

              
                const {useState, useEffect, Fragment } = React;

const assetsUrl = "http://ukulala.surge.sh/chords";
/**
 * Storage theme settings
 *
 * set Storage.val = {color: 'blue'}
 * get Storage.val
 */
const Storage = {
	get val() {
		this.data = window.localStorage.getItem("demo_data");
		return JSON.parse(this.data);
	},
	set val(value) {
		this.data = JSON.stringify(value);
		window.localStorage.setItem("demo_data", this.data);
	}
};

// check array duplicates
const hasDuplicates = array => {
	return (new Set(array)).size !== array.length;
}


/* Notes
-----------------------------*/
const Notes = {
	C: "Do",
	Db: "Reb/Do#",
	D: "Re",
	Eb: "Mib/Re#",
	E: "Mi",
	F: "Fa",
	Gb: "Solb/Fa#",
	G: "Sol",
	Ab: "Lab/Sol#",
	A: "La",
	Bb: "Sib/La#",
	B: "Si"
};
/* Tonalityes
-----------------------------*/
const Tonalityes = {
	"": "",
	m: "m",
	_: "+",
	"5": "5",
	"6": "6",
	maj7: "maj7",
	m7: "m7",
	m6: "m6",
	m7_b5_: "m7(b5)",
	dim7: "dim7",
	"7": "7",
	"9": "9",
	"7_b9_": "7(b9)",
	"7__5_": "7(#5)"
};
/* Simple forms component
-----------------------------*/
const Form = (props) => <form onSubmit={props.fn}>{props.children}</form>;
const Select = (props) => {
	let data = props.data;
	let notes = {};
	if (props.sort) notes = Object.entries(data).sort();
	else notes = Object.entries(data);
	return (
		<select onChange={props.fn}>
			{notes.map(([key, value]) => (
				<option key={key} value={key}>
					{value}
				</option>
			))}
		</select>
	);
};
const Submit = (props) => <input type="submit" value={props.val || "Get"} />;

/* Columns
-----------------------------*/
const Boxes = (props) => <div className="boxes">{props.children}</div>;
const Box = (props) => <div className="box">{props.children}</div>;
const ImgLoader = () => <div className="img-loading"><div></div></div>

/* Image
-----------------------------*/
const Image = (props) => {
	const [src, setSrc] = useState("");
	// use timeout and show image
	useEffect(() => {
		let timerid = false;
		if (timerid) {
			clearTimeout(timerid);
		}
		timerid = setTimeout(() => {
			setSrc(`${assetsUrl}/${props.data}.svg`);
		}, 100);
	}, [props.data]);

	return (
		<figure className={`thumb ${props.data}`}>
			<span className="img-close" onClick={props.fn}>&times;</span>
			{/* check if exists src */}
			{src ? <img src={src} /> : <ImgLoader/>}
			<figcaption>
        {props.data.substring(0, 2).charAt(1) === "b"
          ? Notes[props.data.substring(0, 2)] +
            " " +
            Tonalityes[props.data.substring(2, props.data.length)]
          : Notes[props.data.substring(0, 1)] +
            " " +
            Tonalityes[props.data.substring(1, props.data.length)]}
			</figcaption>
		</figure>
	);
};

const Header = (props) => (
	<header className="header">
		<h3>{props.children}</h3>
	</header>
);

const App = () => {
	// last array
	let lastSaved = Storage.val ? Storage.val : ["C"];
	// data of chords
	const [data, setData] = useState(["C"]);

	// note & tonality
	const [note, setNote] = useState("C");
	const [tonality, setTonality] = useState("");

	// on init get last data saved
	useEffect(() => setData(lastSaved), []);
	
	// Add submit
	const handleSubmit = (e) => {
    e.preventDefault();
    let arr = note + tonality;
    let newArr = [...data, arr];
    if (hasDuplicates(newArr)) {
      // if chord exists show red color
      let img = document.querySelector(`.${arr}`);
      img.classList.add("exists");
      let w = setTimeout(() => {
        img.classList.remove("exists");
        clearTimeout(w);
      }, 800);
    }
    // update array of unique elements
    setData([...new Set(newArr)]);
    Storage.val = [...new Set(newArr)];
		return false;
	};

	// delete data
	const removeData = (evt, index) => {
		let element = evt.target.parentNode;
		element.classList.add("hide");

		let w = setTimeout(() => {
			// remove array by index
			let arr = [...data];
			arr.splice(index, 1);
			// remove duplicates
			let savedArr = [...new Set(arr)];
			// update
			setData(savedArr);
			// storage saved
			Storage.val = savedArr;
			clearTimeout(w);
		}, 500);

	};

	return (
		<Fragment>
			<Header>Ukelele Componser</Header>
			<Form fn={handleSubmit}>
				<Select 
					sort={false} 
					fn={(e) => setNote(e.target.value)} 
					data={Notes} />
				<Select
					sort={true}
					fn={(e) => setTonality(e.target.value)}
					data={Tonalityes}
				/>
				<Submit val="+" />
			</Form>
			<Boxes>
				{data.map((item, index) => (
					<Box key={index}>
						<Image 
							fn={(evt) => removeData(evt, index)} 
							data={item} />
					</Box>
				))}
			</Boxes>
		</Fragment>
	);
};

ReactDOM.render(<App />, window.root);

              
            
!
999px

Console