navius

Styling

Navius primitives ship with zero styles. You bring the CSS (Tailwind, plain CSS, CSS modules, anything) and key it off the discrete data-* state contract.

Unstyled by default

Every part renders a sensible host element with the correct ARIA, and nothing else: no class, no inline style. There is no stylesheet to import and no specificity to fight.

Adding classes

Each part forwards unmatched attributes via @attributes, so a class (or style, id, data-*) you pass lands directly on the underlying element.

Styling state

Primitives reproduce a stable set of discrete, boolean-presence state attributes you can target: data-open / data-closed, data-checked / data-unchecked, data-pressed, data-popup-open, data-highlighted, data-disabled, data-side, data-align. With Tailwind, use the data-[…] variant; with plain CSS, an attribute selector.

Positioning variables

Anchored parts (Popover, Tooltip, Menu, Select, Preview Card, Context Menu, Menubar) are placed by the engine, which writes the resolved geometry onto the positioner element so you can drive transform-origins and arrow placement. Available custom properties: --transform-origin, --available-width/-height, --anchor-width/-height, plus data-side and data-align.

Size variables

Collapsible and Accordion publish their panel's natural size as a CSS variable so you can transition height from 0 to that value (it can't be animated to auto in CSS). Use --accordion-panel-height / --collapsible-panel-height (and the matching -width).