Introduction
Navius is an unstyled, accessible
primitive library for Blazor, the headless
"brain" that owns behaviour so a styled layer doesn't have to re-solve it. It implements
the anatomy, ARIA, keyboard, and data-*
contracts of accessible UI, expressed natively in Razor.
The layers
Navius is one half of a two-layer system, a headless brain paired with a styled helm:
Brain: Navius
Headless primitives that own ARIA roles, keyboard interaction, focus management, and a data-* state contract. No styling. Shipped as a versioned dependency.
Helm: your markup (e.g. zits/ui)
Styled components on top of the brain: Tailwind, plain CSS, anything. Copy them in and own every class. The brain keeps the accessibility.
Why a separate engine?
Blazor can't synchronously touch the DOM: WebAssembly has no DOM and Server marshals
interop asynchronously over SignalR. So a correct focus trap, scroll lock, anchored
positioning, or roving tabindex cannot be pure C#; the behaviour lives in a small
JavaScript engine (navius-interop.js)
driven from C# over JS interop. Every other Blazor component kit either skips this (so it
isn't really accessible) or hides it. Navius builds it in the open. See
Server & WebAssembly.
The data contract
Every primitive forwards unmatched attributes via
@attributes and
reproduces a stable set of discrete, boolean-presence state attributes (data-open / data-closed,
data-side, data-checked,
data-disabled, data-highlighted)
so your styles key off them (e.g. data-[open]:animate-in).
That contract is the seam between behaviour and looks.