Skip to content
Open source · MIT · net10.0 / net11.0

UI primitives for Blazor,
accessible and unstyled.

Keyboard interaction, focus management, positioning, dismissal and WAI-ARIA semantics as plain Razor components that render semantic HTML and nothing else. The library ships zero CSS: every state is a data-* or ARIA attribute, so plain CSS, Tailwind or your own design system styles it.

dotnet add package Bit.Bheadless
Actions.razor
<BitBhMenu>
    <BitBhMenuButton class="menu-button">Options</BitBhMenuButton>
    <BitBhMenuItems class="menu-items" Anchor="@("bottom start")">
        <BitBhMenuItem OnClick="Edit">Edit</BitBhMenuItem>
        <BitBhMenuItem OnClick="Archive">Archive</BitBhMenuItem>
    </BitBhMenuItems>
</BitBhMenu>

Last action: none yet

Try it with Enter, ↓, a letter and Esc.

Zero CSS shippedyou own every pixel
WAI-ARIA patternsroles, states, keyboard and focus
37 component familiesoverlays, menus, selection, forms and more
Every render modeServer, WebAssembly, Auto and prerendering

Components

The hard parts of interactive UI, done once

Compound components that share their state through cascading contexts, so you decide the markup and the nesting - and every one of them is demonstrated twice on this site, with hand-written CSS and with Tailwind.

Overlays

Dialogs with a focus trap, scroll lock and an inert background, drawers you swipe away, popovers, tooltips and hover cards anchored with flip, shift and arrows - and portals that keep the component tree intact.

Dialog →

Menus

Dropdown menus with submenus, checkbox and radio items, a desktop-style menubar and a context menu at the pointer, a site navigation menu - plus pagination, breadcrumbs and a stepper for multi-step flows.

Menu →

Selection

A listbox, an autocomplete combobox - single or multiple, with sections, creatable values, virtualized - and a cmdk-style command palette with fuzzy ranking and nested pages.

Combobox →

Hierarchies and data

A tree with tri-state checkboxes and lazy loading, a data grid and treegrid with cell navigation, and a sortable list you can reorder with the keyboard.

Tree view →

Disclosure

Tabs with a sliding indicator, accordions, disclosures, collapsibles and a carousel - controlled with @bind-Value, uncontrolled with DefaultValue, or notified through change callbacks.

Tabs →

Form controls

Checkboxes, switches, radio groups, sliders and angle dials, calendars, date and time fields, date pickers, number fields, PIN and tags inputs, ratings, file uploads and a color picker, with BitBhField wiring labels, descriptions and EditForm validation - server errors included - for you.

Field →

Layout and feedback

Custom scroll areas, resizable splitter panes, toolbars, toasts that are queued from anywhere, updated in place, stacked and swiped away, progress bars and meters, avatars, a clipboard button and a polymorphic button.

Toast →

Accessibility utilities

The building blocks the components are made of - focus scopes, roving focus, live regions and an announcer, hotkeys, F6 landmark navigation, visually hidden text, reading direction, localizable built-in text and transitions.

Utilities →

In practice

See it in code

01

Compose the parts

A family is a parent and its parts. The parent owns the state and cascades it, so the parts go wherever your markup needs them - and the ARIA between them is wired for you.

Tabs →
<BitBhTabGroup @bind-Value="_tab">
    <BitBhTabList class="tabs">
        <BitBhTab Value="profile">Profile</BitBhTab>
        <BitBhTab Value="billing">Billing</BitBhTab>
    </BitBhTabList>
    <BitBhTabPanels>…</BitBhTabPanels>
</BitBhTabGroup>
02

Style the state, not the component

Every part says what it is doing in data-* and ARIA attributes. Plain CSS selectors are the whole styling API.

Switch →
.switch[data-state="checked"] { background: royalblue; }
.switch[data-disabled] { opacity: .5; }
.menu-item[data-active] { background: #eef2ff; }
03

Or with Tailwind

The same attributes become Tailwind variants, so the look of every state is written next to the markup that has it.

Styling with Tailwind →
<BitBhSwitch @bind-Checked="_on"
             class="bg-zinc-300 data-state-checked:bg-blue-600">
    <BitBhSwitchThumb class="translate-x-0 data-state-checked:translate-x-5" />
</BitBhSwitch>

Comparison

Why headless?

A styled component library hands you its look and a set of parameters to bend it. A headless one hands you the behaviour and gets out of the way of the look.

ConcernStyled component libraryBheadless
LookThe library's theme, overridden where it allowsYours - no CSS ships
MarkupFixed per componentCompound parts you nest, polymorphic with As
Styling APIParameters and theme variablesdata-* and ARIA attributes, any selector
AccessibilityWhatever the theme kept intactWAI-ARIA patterns, tested with the bundled audit toolkit
Design system fitBends toward the library'sDrops into yours - CSS, Tailwind, Bootstrap, Fluent tokens

Where to start

Choose your path

New to Bheadless?

Install, register, import the namespace - an accessible menu in five minutes.

Getting started →

Styling with Tailwind?

Every demo has a Tailwind twin, with the custom variants its classes are written with.

Tailwind demos →

Building with an AI agent?

This site is an MCP server: point your agent at /mcp and it reads the shipped library instead of guessing.

Try the MCP server →

Questions

Frequently asked

Does it really ship no CSS at all?

None. The components render semantic elements and expose their state as data-* and ARIA attributes; what they look like is entirely your stylesheet. The positioning engine sets the coordinates of a floating panel inline, and that is the only style the library ever writes.

Which render modes does it work in?

Any interactive one - Server, WebAssembly and Auto - on .NET 10 and 11. Pages are prerendered as usual: the components render their initial, accessible markup on the server and respond to input once the page is interactive. Register the services in the client project too for WebAssembly and Auto.

Is there any JavaScript to add?

No script tag. A small runtime (bit-bheadless.js) is loaded automatically through a Razor class library initializer, for what has to happen in the browser: focus, positioning, dismissal and the live regions.

How do I know my styled component is still accessible?

Every component of the library is tested with Bit.Bheadless.Testing, a bUnit toolkit with a WAI-ARIA rule engine, accessible-name and focus-order inspection, keyboard helpers and live-region assertions - and it is published for testing your components too.

Does it work with forms?

Yes. The controls bind with @bind-Value inside an EditForm, and BitBhField wires each one to its label, its description and its validation message.

Bring your own design

One package, one service registration, one using - and the behaviour is done.

dotnet add package Bit.Bheadless
An unhandled error has occurred. Reload 🗙