Snippets A repository of little code goodies

Name Description Categories Last Updated

Animated details + summary

Cross browser animation of details and summary elements.

CSS, JavaScript, Animation

Create a Hex Color

Create a hexidecimal color.

JavaScript

Debounce

Debounce a function using requestAnimationFrame.

JavaScript, Performance

Emit Event

Emit a custom event.

JavaScript

Fade Scroll Container Edges

Use CSS to mask edges of a scrollable area when there is more content.

CSS

Filter Unique Items in Array

Filter array of objects to unique ones based on a key.

JavaScript

Finding Common Values in Two Arrays

Find common values between two arrays.

JavaScript

FLIP

Custom First Last Invert Play function handler.

JavaScript, Animation, Performance

Focus Utilities

A module set of scripts to help find focusable and tabbable elements.

JavaScript

Get Country Flag Emoji

Automatically get the country flag emoji from the country code.

JavaScript

Load Images Asynchronously

Use Promise to load an image from a source asynchronously.

JavaScript

Previous Sibling Selector

Use :has to get the previous sibling.

CSS

Range Selectors

Create various range selectors in CSS using :has.

CSS

Remap Values

Maps a number from one range to another range.

JavaScript

Slugify a String with Multi-lingual Support

Slugify a string with multi-lingual support.

JavaScript