A before/after image slider in 2 lines of JavaScript
The plugin you were about to install is just input[type=range]. Stack two images, clip one, done. Works with the keyboard too.
The plugin you were about to install is just input[type=range]. Stack two images, clip one, done. Works with the keyboard too.
The CSS property field-sizing: content replaces your auto-resize textarea script. One line, no input listener, no scrollHeight. Plus the limits to set.
Linear and GitHub both have it. Build the same command palette with the dialog element, one keydown listener, and a filter. No libraries.
You don't need a carousel library. Six lines of CSS scroll snap will do it.
Make any HTML table sortable in 20 lines of vanilla JS.
One line of CSS fixes every anchor link that jumps behind your fixed header
One CSS property stops scroll from leaking out of a modal or sidebar into the page behind it. No JavaScript scroll locking needed.
URLSearchParams reads, sets, and removes query string values with a clean API. No string splitting, no manual parsing.
A debounce function waits until the user stops typing before firing the request. Ten lines of code, zero libraries, fixes one of the most common performance bugs.
One line of CSS creates a grid that fits as many columns as possible at any screen size. No breakpoints, no JavaScript, no framework needed.