Components
43 components, each published as its own npm package under the @c2n scope. Every component is themed through CSS custom properties and documented with live, editable examples.
Inputs
Checkbox Native checkbox behaviour in a quiet, themeable box with an opt-in hover layer. @c2n/checkboxColor Area Two-dimensional area for picking saturation and value of a colour. @c2n/color-areaColor Select Colour swatch that opens a full picker built from area and slider. @c2n/color-selectColor Slider Horizontal slider for choosing a hue from 0 to 360. @c2n/color-sliderLabel Caption that names and activates the control referenced by its for attribute, with a required marker. @c2n/labelRadio Radio options built on native inputs, grouped into one value with keyboard navigation. @c2n/radioSelect Dropdown that pairs a themeable trigger with an anchored list of c2-list-item options. @c2n/selectSlider Range input with a themeable track, thumb, step ticks and value bubble. @c2n/sliderSwitch On/off toggle on a native switch input, with label, description and thumb icons. @c2n/switchText Field Single-line input with icon slots, clear button, helper and error text, and a character counter. @c2n/text-fieldTextarea Multiline text input with resizing, helper and error text, and a character counter. @c2n/textarea
Buttons
Button Themeable button with slots for text, prefix, suffix and running icons. @c2n/buttonButton Group Attached buttons with shared borders, optionally a segmented control with single or multiple selection. @c2n/button-groupCopy Button Button that copies text to the clipboard — the element it sits in, another element by id, or a literal string. @c2n/copy-buttonIcon Button Round, hoverable button wrapping a slotted SVG icon. @c2n/icon-button
Navigation
Breadcrumb Navigation trail of link buttons with separators, a current page and optional collapsing. @c2n/breadcrumbLink Button Text-styled control for link and navigation actions, rendered as a real anchor or a button. @c2n/link-buttonMenu Commands, links, checkboxes and submenus in a popover anchored to a trigger. @c2n/menuNavigation Menu Site navigation bar whose triggers open panels of links below the header. @c2n/navigation-menuPagination Page navigation in three layouts: numbered pages, a simple page status, or a table-footer row with rows-per-page. @c2n/paginationSide Nav Responsive navigation drawer beside the page: pushes the content on large screens, slides over it with a backdrop on small ones. @c2n/side-navTabs Tab strip that shows one content panel at a time. @c2n/tabs
Layout
Accordion Connected, animated panels with shared borders and single or multiple expansion. @c2n/accordionCard Groups related content and actions on a single bordered surface. @c2n/cardDetails Collapsible disclosure built on native details and summary. @c2n/detailsSeperator Horizontal or vertical rule with an optional label, for dividing content and toolbars. @c2n/seperator
Data display
Avatar Image, initials or icon for a person, with status dot and badge. @c2n/avatarBadge Tinted pill for status text, counts and dots, optionally pinned to a corner of another element. @c2n/badgeCode Viewer Syntax-highlighted code with line numbers, copy button and dark mode, powered by shiki. @c2n/code-viewerKbd Keyboard key label for shortcuts and command hints, with the semantics of the native kbd element. @c2n/kbdList Vertical list container with single or multiple selection. @c2n/listList Item Selectable row with icon slots, used on its own or as the option of list and select. @c2n/list-itemTable Virtualized data grid with declarative columns, sorting, selection, pinning and resizing. @c2n/table
Feedback
Modal Dialog built on the native dialog element: focus trap, backdrop, Escape, title, body and footer. @c2n/modalOverlay Anchored popup built on the browser Popover API, positioned with floating-ui. @c2n/overlayProgress Linear progress bar, indeterminate or filling to a value, with an optional label and count. @c2n/progressSheet Dialog pinned to an edge of the screen, for content that complements the page rather than interrupting it. @c2n/sheetSkeleton Placeholder block standing in for content that has not arrived, in three shapes and three animations. @c2n/skeletonSpinner Circular progress indicator, indeterminate or showing a value, with optional text. @c2n/spinnerToast Notification cards and a manager for stacked, queued notifications with independent lifetimes. @c2n/toastTooltip Contextual hint shown when its target is hovered or focused, rendered in the top layer. @c2n/tooltip
Chat
Chat Input Auto-growing message box with a send button for chat interfaces. @c2n/chat-inputChat Message One chat bubble with avatar, title, timestamp and message body. @c2n/chat-message