LayoutApp Shell Layout
A header, a sidebar and a main area on CSS grid with a sticky header and one scrolling region; the sidebar folds behind a button on a narrow shell.
Ready-to-use HTML, CSS and JavaScript with a live preview. Copy the code or open any snippet in the playground.
47 snippets · page 3 of 4
LayoutA header, a sidebar and a main area on CSS grid with a sticky header and one scrolling region; the sidebar folds behind a button on a narrow shell.
PricingA two-option billing switch that changes three example plan prices between monthly and yearly and works the saving out from the prices.
Data DisplayA table with caption, scoped headers and right-aligned numbers that reflows into labelled stacked cards on a phone, in plain CSS.
MediaTwo stacked local SVG pictures with a range input that moves a divider between them, and the split read out as a percentage.
LoadersCard and list skeletons with a shimmer that stops under reduced motion, aria-busy on the container and a button that swaps them for real content.
FeedbackA hint on hover and keyboard focus and a click-to-open popover built on the native popover attribute, with Escape to close either.
ButtonsA segmented radio control, joined buttons, icon-only buttons with accessible names and a split button whose menu is a native popover.
UtilitiesButtons that copy a line of code, say so for three seconds in a live region, and select the text for a keyboard copy when the clipboard is missing.
NavigationA menu button that opens a list of actions, with arrow keys, Home, End, type-ahead, Escape and a click outside, written without a library.
UtilitiesA switch between light and dark that follows the system setting until the visitor chooses, and remembers the choice where storage is allowed.
MediaA row of slides that snaps into place with CSS only and moves by touch, wheel, keyboard or jump links, with no script.
LayoutA site footer with a short brand note, four groups of links that wrap from four columns to two to one, and a bottom bar with a back-to-top link.
Try our online code playground to experiment with these snippets and create your own projects.