NavigationResponsive Navigation Menu
A site header whose links fold behind a Menu button on phones and sit in a row from 40em, written without a library.
Ready-to-use HTML, CSS and JavaScript with a live preview. Copy the code or open any snippet in the playground.
17 snippets · page 1 of 2
NavigationA site header whose links fold behind a Menu button on phones and sit in a row from 40em, written without a library.
NavigationA tab list with three panels, arrow-key, Home and End support and roving tabindex, built with the XON tabs words.
Data DisplayA real table whose headers sort, with a text filter, five rows a page and a status line. The rows are plain HTML. Written with XON's table part.
UtilitiesA small task list with add, tick, delete, filter and clear-done, with the count announced in a live region and nothing sent anywhere.
FeedbackInformation, success, warning and error banners with an icon, a heading, a dismiss button and the right live-region role for each kind.
LayoutAn accordion of five questions on details and summary, with an animated chevron and one open at a time through the name attribute.
MediaA thumbnail grid whose items open a native dialog with Previous, Next, arrow keys, Escape and a caption; the artwork is six local SVG drawings.
FormsA contact form with per-field rules, messages tied to each field and an error summary that links to the first problem, using XON.
FormsA group of settings-style switches built on real checkboxes with role switch, visible On and Off text and a disabled example.
FormsStyled native checkboxes, radio buttons, option cards and chip toggles that keep their keyboard behaviour, group labels and a strong focus ring.
NavigationTwo side panels, one from each edge, that open over the page as native modal dialogs and give focus back to their button when they close.
FeedbackA stack of short messages in a polite live region: info, success and error toasts that dismiss themselves, pause on hover and clear with Escape.
Try our online code playground to experiment with these snippets and create your own projects.