Whether the drawer is open. On phones (and on tablets unless `tablet-mode` is set explicitly) the initial value is ignored and the drawer starts closed.
desktop-mode
DisplayMode
side
How the drawer behaves at 960px and up: `side` pushes the content, `over` slides above it.
tablet-mode
DisplayMode
over
How the drawer behaves between 600px and 959px.
responsive-tablet
boolean
false
Also collapse the drawer on tablets in `side` mode when the viewport shrinks to that size.
position
SideNavPosition
start
Which edge the drawer is on: `start` (left in LTR) or `end`.
Events
Name
Type
Description
opened-change
CustomEvent<OpenedChangeEventDetail>
Fired when the user or a breakpoint change opens or closes the drawer (not when `opened` is set from code). `detail.opened` is the new state.
CSS custom properties
Grouped by the element and state they target. Click a group to collapse it; click a name to copy it.
Name
Type
Default
Description
--c2-side-nav--transition-duration
time
250ms
--c2-side-nav--background-color
color
#fafafa
--c2-side-nav--color
color
—
--c2-side-nav--border-top-left-radius
border-radius
—
--c2-side-nav--border-top-right-radius
border-radius
—
--c2-side-nav--border-bottom-left-radius
border-radius
—
--c2-side-nav--border-bottom-right-radius
border-radius
—
--c2-side-nav--padding-top
padding
16px
--c2-side-nav--padding-right
padding
16px
--c2-side-nav--padding-bottom
padding
16px
--c2-side-nav--padding-left
padding
16px
--c2-side-nav--border-top
border
—
--c2-side-nav--border-right
border
—
--c2-side-nav--border-bottom
border
—
--c2-side-nav--border-left
border
—
--c2-side-nav__open--width
pixel
240px
--c2-side-nav__close--width
pixel
0px
Width of the collapsed drawer; a non-zero value gives a rail.
--c2-side-nav__divider--width
pixel
1px
Line between the drawer and the content, on whichever side the drawer is.
--c2-side-nav__divider--color
color
#e4e4e7
--c2-side-nav__scrollbar--color
color
rgba(0, 0, 0, 0.2)
--c2-side-nav__over--position
position
fixed
`absolute` keeps the overlay inside a positioned parent.
Whether the drawer is open. On phones (and on tablets unless `tablet-mode` is set explicitly) the initial value is ignored and the drawer starts closed.
desktop-mode
DisplayMode
side
How the drawer behaves at 960px and up: `side` pushes the content, `over` slides above it.
tablet-mode
DisplayMode
over
How the drawer behaves between 600px and 959px.
responsive-tablet
boolean
false
Also collapse the drawer on tablets in `side` mode when the viewport shrinks to that size.
position
SideNavPosition
start
Which edge the drawer is on: `start` (left in LTR) or `end`.
Events
Name
Type
Description
opened-change
CustomEvent<OpenedChangeEventDetail>
Fired when the user or a breakpoint change opens or closes the drawer (not when `opened` is set from code). `detail.opened` is the new state.
CSS custom properties
Grouped by the element and state they target. Click a group to collapse it; click a name to copy it.
Name
Type
Default
Description
--c2-side-nav--transition-duration
time
250ms
--c2-side-nav--background-color
color
#fafafa
--c2-side-nav--color
color
—
--c2-side-nav--border-top-left-radius
border-radius
—
--c2-side-nav--border-top-right-radius
border-radius
—
--c2-side-nav--border-bottom-left-radius
border-radius
—
--c2-side-nav--border-bottom-right-radius
border-radius
—
--c2-side-nav--padding-top
padding
16px
--c2-side-nav--padding-right
padding
16px
--c2-side-nav--padding-bottom
padding
16px
--c2-side-nav--padding-left
padding
16px
--c2-side-nav--border-top
border
—
--c2-side-nav--border-right
border
—
--c2-side-nav--border-bottom
border
—
--c2-side-nav--border-left
border
—
--c2-side-nav__open--width
pixel
240px
--c2-side-nav__close--width
pixel
0px
Width of the collapsed drawer; a non-zero value gives a rail.
--c2-side-nav__divider--width
pixel
1px
Line between the drawer and the content, on whichever side the drawer is.
--c2-side-nav__divider--color
color
#e4e4e7
--c2-side-nav__scrollbar--color
color
rgba(0, 0, 0, 0.2)
--c2-side-nav__over--position
position
fixed
`absolute` keeps the overlay inside a positioned parent.
--c2-side-nav__over--top
pixel
0px
--c2-side-nav__over--height
pixel
100dvh
--c2-side-nav__over--width
pixel
—
Defaults to the open width.
--c2-side-nav__over--background-color
color
—
Defaults to the drawer background.
--c2-side-nav__over--box-shadow
box-shadow
0 12px 40px rgba(0, 0, 0, 0.18)
--c2-side-nav__over--border-top-left-radius
border-radius
—
--c2-side-nav__over--border-top-right-radius
border-radius
—
--c2-side-nav__over--border-bottom-left-radius
border-radius
—
--c2-side-nav__over--border-bottom-right-radius
border-radius
—
--c2-side-nav__over--padding-top
padding
—
--c2-side-nav__over--padding-right
padding
—
--c2-side-nav__over--padding-bottom
padding
—
--c2-side-nav__over--padding-left
padding
—
--c2-side-nav__backdrop--background-color
color
rgba(0, 0, 0, 0.32)
--c2-side-nav__backdrop--backdrop-filter
filter
none
--c2-side-nav__backdrop--z-index
number
1000
escAccordionConnected, animated panels with shared borders and single or multiple expansion.LayoutAvatarImage, initials or icon for a person, with status dot and badge.Data displayBadgeTinted pill for status text, counts and dots, optionally pinned to a corner of another element.Data displayBreadcrumbNavigation trail of link buttons with separators, a current page and optional collapsing.NavigationButtonThemeable button with slots for text, prefix, suffix and running icons.ButtonsButton GroupAttached buttons with shared borders, optionally a segmented control with single or multiple selection.ButtonsCardGroups related content and actions on a single bordered surface.LayoutChat InputAuto-growing message box with a send button for chat interfaces.ChatChat MessageOne chat bubble with avatar, title, timestamp and message body.ChatCheckboxNative checkbox behaviour in a quiet, themeable box with an opt-in hover layer.InputsCode ViewerSyntax-highlighted code with line numbers, copy button and dark mode, powered by shiki.Data displayColor AreaTwo-dimensional area for picking saturation and value of a colour.InputsColor SelectColour swatch that opens a full picker built from area and slider.InputsColor SliderHorizontal slider for choosing a hue from 0 to 360.InputsCopy ButtonButton that copies text to the clipboard — the element it sits in, another element by id, or a literal string.ButtonsDetailsCollapsible disclosure built on native details and summary.LayoutIcon ButtonRound, hoverable button wrapping a slotted SVG icon.ButtonsKbdKeyboard key label for shortcuts and command hints, with the semantics of the native kbd element.Data displayLabelCaption that names and activates the control referenced by its for attribute, with a required marker.InputsLink ButtonText-styled control for link and navigation actions, rendered as a real anchor or a button.NavigationListVertical list container with single or multiple selection.Data displayList ItemSelectable row with icon slots, used on its own or as the option of list and select.Data displayMenuCommands, links, checkboxes and submenus in a popover anchored to a trigger.NavigationModalDialog built on the native dialog element: focus trap, backdrop, Escape, title, body and footer.FeedbackNavigation MenuSite navigation bar whose triggers open panels of links below the header.NavigationOverlayAnchored popup built on the browser Popover API, positioned with floating-ui.FeedbackPaginationPage navigation in three layouts: numbered pages, a simple page status, or a table-footer row with rows-per-page.NavigationProgressLinear progress bar, indeterminate or filling to a value, with an optional label and count.FeedbackRadioRadio options built on native inputs, grouped into one value with keyboard navigation.InputsSelectDropdown that pairs a themeable trigger with an anchored list of c2-list-item options.InputsSeperatorHorizontal or vertical rule with an optional label, for dividing content and toolbars.LayoutSheetDialog pinned to an edge of the screen, for content that complements the page rather than interrupting it.FeedbackSide NavResponsive navigation drawer beside the page: pushes the content on large screens, slides over it with a backdrop on small ones.NavigationSkeletonPlaceholder block standing in for content that has not arrived, in three shapes and three animations.FeedbackSliderRange input with a themeable track, thumb, step ticks and value bubble.InputsSpinnerCircular progress indicator, indeterminate or showing a value, with optional text.FeedbackSwitchOn/off toggle on a native switch input, with label, description and thumb icons.InputsTableVirtualized data grid with declarative columns, sorting, selection, pinning and resizing.Data displayTabsTab strip that shows one content panel at a time.NavigationText FieldSingle-line input with icon slots, clear button, helper and error text, and a character counter.InputsTextareaMultiline text input with resizing, helper and error text, and a character counter.InputsToastNotification cards and a manager for stacked, queued notifications with independent lifetimes.FeedbackTooltipContextual hint shown when its target is hovered or focused, rendered in the top layer.FeedbackFeather Icons287 open-source Feather icons, one web component each.IconsMat Icon2,234 Material Icons ligatures rendered through a single element.IconsPhosphor Icons1,512 flexible icons in six weights, one web component each.IconsThemingTheme every c2n component from a handful of design tokens with @c2n/theme, or reach for any component variable directly.GuideUsing c2n in an applicationThe workflow behind every c2n app: load the theme once, use c2-* tags directly, and turn every repeated pattern into a small variant or composed component.Guide