# Barua UI — complete reference ## Rules 1. Compose from documented components. If a pattern is not in the docs, use a documented alternative or promote a new component into the docs first — never invent markup or CSS in product code. 2. Copy the anatomy from the docs demo: same wrapper elements, same slots, same class combinations. A component's parts (__header, __body, __footer) only exist inside their block. 3. Never hardcode colour, spacing, radius or shadow. Use --b-* tokens. A raw hex in product code is a bug. 4. Inline styles are only for documented knobs (--v, --b-progress, --b-thumb-size, --b-heatmap-cols, --b-circular-size) and artwork backgrounds. 5. Icons come from the icon library (docs/icons.html): inline 20x20 SVG, 1.5px stroke, currentColor, sized with .b-icon/--sm/--lg. Never emoji, never letters as icons. A directional mark inside a sentence is text, not an icon: the arrow in a .b-stat__delta stays. The rule governs icon slots, where a glyph stands on its own. 6. Never use a native ``` ### Check what your colour now collides with (https://ui.barua.tz/docs/theming.html#collisions) This is the part that bites. Two system colours are defined in terms of the accent or sit close to it, and a brand colour can quietly erase a distinction the interface relies on. Classes: b-btn b-btn--danger b-btn--primary b-code b-code__header b-gap-2 b-hstack b-stack--wrap b-table b-table-wrap ```html
``` ### What not to override (https://ui.barua.tz/docs/theming.html#leave-alone) Accent tokens are yours. The greyscale is not: --b-text , --b-text-secondary , --b-surface , --b-separator and the fills carry the contrast contract that every component is built against, in both themes at once. Change those and you are not theming the system, you are replacing its foundation — and the accessible contrast that came free stops being guaranteed. ### Scope it when the colour means something (https://ui.barua.tz/docs/theming.html#scoping) Overriding on :root themes the product. Putting the same tokens on a class themes a region — useful for a tenant, an environment banner, or one board among many. The tokens cascade, so anything inside picks them up. Classes: b-code b-code__header ## Wallpapers — pictures shipped finished: sized, blurred, with the accent and scheme already worked out ### What was worked out beforehand (https://ui.barua.tz/docs/wallpapers.html#what-is-baked) Four things, each with exactly one answer per picture, so computing them per visitor is repeating a settled question: ### City (https://ui.barua.tz/docs/wallpapers.html#wall-city) Classes: b-caption b-code b-code__copy b-code__header b-gap-4 b-has-wallpaper b-hstack b-stack--wrap b-text-secondary b-wall ```html
Baked glass over this picture

Blurred once, at build time.

``` ### Desk (https://ui.barua.tz/docs/wallpapers.html#wall-desk) Classes: b-caption b-code b-code__copy b-code__header b-gap-4 b-has-wallpaper b-hstack b-stack--wrap b-text-secondary b-wall ```html
Baked glass over this picture

Blurred once, at build time.

``` ### Team (https://ui.barua.tz/docs/wallpapers.html#wall-team) Classes: b-caption b-code b-code__copy b-code__header b-gap-4 b-has-wallpaper b-hstack b-stack--wrap b-text-secondary b-wall ```html
Baked glass over this picture

Blurred once, at build time.

``` ### Dune Light (https://ui.barua.tz/docs/wallpapers.html#wall-dune-light) Classes: b-caption b-code b-code__copy b-code__header b-gap-4 b-has-wallpaper b-hstack b-stack--wrap b-text-secondary b-wall ```html
Baked glass over this picture

Blurred once, at build time.

``` ### Dusk Ridge (https://ui.barua.tz/docs/wallpapers.html#wall-dusk-ridge) Classes: b-caption b-code b-code__copy b-code__header b-gap-4 b-has-wallpaper b-hstack b-stack--wrap b-text-secondary b-wall ```html
Baked glass over this picture

Blurred once, at build time.

``` ### Forest Fog (https://ui.barua.tz/docs/wallpapers.html#wall-forest-fog) Classes: b-caption b-code b-code__copy b-code__header b-gap-4 b-has-wallpaper b-hstack b-stack--wrap b-text-secondary b-text-tertiary b-wall ```html
Baked glass over this picture

Blurred once, at build time.

``` ### Night Coast (https://ui.barua.tz/docs/wallpapers.html#wall-night-coast) Classes: b-caption b-code b-code__copy b-code__header b-gap-4 b-has-wallpaper b-hstack b-stack--wrap b-text-secondary b-wall ```html
Baked glass over this picture

Blurred once, at build time.

``` ### Salt Flat (https://ui.barua.tz/docs/wallpapers.html#wall-salt-flat) Classes: b-caption b-code b-code__copy b-code__header b-gap-4 b-has-wallpaper b-hstack b-stack--wrap b-text-secondary b-wall ```html
Baked glass over this picture

Blurred once, at build time.

``` ### Still Water (https://ui.barua.tz/docs/wallpapers.html#wall-still-water) Classes: b-caption b-code b-code__copy b-code__header b-gap-4 b-has-wallpaper b-hstack b-stack--wrap b-text-secondary b-wall ```html
Baked glass over this picture

Blurred once, at build time.

``` ## React — the typed bindings: install, Server Components, and the component index ### Install (https://ui.barua.tz/docs/react.html#install) One package, one stylesheet. The CSS is the system; the components only spare you from typing class names. Classes: b-code b-code__header ### The first component (https://ui.barua.tz/docs/react.html#first) Props are the modifiers you already know. b-btn--primary is variant="primary" ; there is nothing else to learn. Classes: b-btn b-btn--ghost b-btn--primary b-gap-2 b-hstack ```html
``` ### Server Components (https://ui.barua.tz/docs/react.html#server-components) The bundle carries its own "use client" , so importing from a Server Component works. Components that hold state — the provider, toasts, the command palette — still need a client boundary of their own, which is ordinary React, not a quirk of this library. ### Theme (https://ui.barua.tz/docs/react.html#theme) Light and dark come from light-dark() in the CSS, so the system already follows the operating system with no JavaScript at all. Reach for the provider only to override that choice, and add ThemeScript to stop the first paint flashing the wrong way. Classes: b-code b-code__header ### Icons (https://ui.barua.tz/docs/react.html#icons) The glyph library ships as a component, generated from the icons page — the same 59 glyphs, by name, with the sizes on the .b-icon scale. Classes: b-code b-code__header b-gap-3 b-hstack b-icon ```html
``` ### When a component is in the way (https://ui.barua.tz/docs/react.html#escape-hatch) Nothing here is compulsory. Every component forwards className and its ref, so a class the props do not cover can always be added by hand — and any element can carry a system class directly. The React layer is a convenience, never a gate. Classes: b-code b-code__header ### What is exported (https://ui.barua.tz/docs/react.html#components) 278 components and hooks, covering every block in the system. The list is generated from the package, so it never claims more than it ships. Classes: b-table b-table-wrap ## Foundations — tokens, colour, type, materials, motion ### Color System (https://ui.barua.tz/docs/foundations.html#color-system) Every color token is a light-dark() pair, so a single name is always correct in either scheme. The accent family drives buttons, links, focus and selection; re-tint the whole system with data-accent="indigo|purple|pink|teal|green" on . Variants: System colors, Grays, Backgrounds & surfaces, Text hierarchy, Wallpaper, Adaptive accent & scheme Classes: b-badge b-badge--accent b-btn b-btn--ghost b-btn--glass b-btn--primary b-btn--sm b-card b-card--glass b-card--neutral b-card__body b-card__header b-card__title b-footnote b-gap-2 b-gap-3 b-hstack b-link b-stack b-stack--wrap b-text-secondary b-wall b-wallpaper-scope ```html
Glass needs a backdrop
Live

Change the wall and watch the material, the ink and the accent all answer to the picture.

and .b-headline are typographically identical. Classes: b-table b-table-wrap ### Font Scale (https://ui.barua.tz/docs/foundations.html#font-scale) The Apple HIG scale, exposed as one class per role. Elements h1 – h6 map onto it automatically; use the classes when semantics and size need to differ — a card title that is an h3 but should read as a headline, for instance. Classes: b-body b-callout b-caption b-footnote b-headline b-large-title b-overline b-subheadline b-tabular-nums b-text-tertiary b-text-uppercase b-title1 b-title2 b-title3 b-truncate ### Spacing (https://ui.barua.tz/docs/foundations.html#spacing) A 4px base scale. Use 1–3 for padding inside controls, 4–6 between related elements, 8–12 between groups, and 16–24 between page sections. If a gap isn't on the scale, it isn't in the system. ### Grid (https://ui.barua.tz/docs/foundations.html#grid) .b-grid is 12 columns by default; set --b-cols or use .b-grid--2/3/4/6 for equal tracks, and span with .b-col-span-* . .b-grid--auto auto-fills against --b-col-min , and .b-card-grid / .b-masonry handle card walls without media queries. Gaps come from the spacing scale via .b-gap-* . Classes: b-col-span-4 b-col-span-6 b-col-span-full b-footnote b-grid b-grid--3 b-panel b-text-center ```html

1 / 3
1 / 3
1 / 3
span 6
span 6
span 4
span 4
span 4
span full
``` ### Layout (https://ui.barua.tz/docs/foundations.html#layout) SwiftUI-style primitives: .b-vstack and .b-hstack flow content with a token gap, and .b-spacer absorbs the leftover space — that trio builds most toolbars and headers. .b-container centers a page column, .b-section spaces bands of content, and .b-split + .b-panel make resizable multi-pane layouts. Classes: b-btn b-btn--primary b-btn--sm b-footnote b-gap-1 b-headline b-hstack b-panel b-spacer b-table b-table-wrap b-text-secondary b-vstack ```html
Inbox
VStack Children flow vertically; the gap comes from --b-gap.
``` ### Breakpoints (https://ui.barua.tz/docs/foundations.html#breakpoints) Custom properties can't drive @media , so breakpoints are a convention: six shared stops, written by value, always mobile-first with @media (min-width: …) . Base styles serve the phone; each stop only adds. Classes: b-table b-table-wrap ### Border Radius (https://ui.barua.tz/docs/foundations.html#border-radius) Corners grow with the surface, Apple-style: xs for inline code and checkboxes, sm for chips and kbd, md for buttons, inputs and menus, lg for panels and toolbars, xl for cards and modals, 2xl for sheets, and full for pills and avatars. Never give a small control a bigger radius than the surface it sits on. Classes: b-caption2 b-gap-1 b-stack b-stack--center b-text-tertiary ```html
--b-radius-xs 4px
--b-radius-sm 6px
--b-radius-md 10px
--b-radius-lg 14px
--b-shadow-xs
--b-shadow-sm
--b-shadow-md
--b-shadow-lg
--b-shadow-xl
--b-shadow-accent
``` ### Elevation (https://ui.barua.tz/docs/foundations.html#elevation) The elevation ladder pairs each shadow with a 1px hairline ring ( --b-ring ) so edges stay crisp on any background. Use the utilities: 1 for resting cards, 2 for raised cards and glass toolbars, 3 for menus and popovers, 4 for modals and drawers, 5 for the command palette. Level 0 removes elevation for flush surfaces. Classes: b-elevation-1 b-elevation-2 b-elevation-3 b-elevation-4 b-elevation-5 b-gap-2 b-radius-lg b-stack b-stack--center ```html
.b-elevation-1
.b-elevation-2
.b-elevation-3
.b-elevation-4
.b-elevation-5
``` ### Opacity (https://ui.barua.tz/docs/foundations.html#opacity) Three stops, three meanings. hover (0.85) dims media and imagery under the pointer, muted (0.6) de-emphasizes without disabling, and disabled (0.4) is applied automatically by :disabled and .is-disabled — never hand-roll a disabled look. Classes: b-caption2 b-gap-1 b-stack b-stack--center b-text-tertiary ```html
base 1
--b-opacity-hover 0.85
--b-opacity-muted 0.6
--b-opacity-disabled 0.4
``` ### Blur (https://ui.barua.tz/docs/foundations.html#blur) The blur scale feeds the glass materials. Rather than using raw blur values, reach for the composite filters: --b-glass-light (blur-sm + saturate 1.6), --b-glass (blur-lg + saturate 1.8) and --b-glass-heavy (blur-xl + saturate 2) — the saturation boost is what makes color glow through the pane. Classes: b-caption2 b-gap-1 b-stack b-stack--center b-text-tertiary ```html
--b-blur-xs 4px
--b-blur-sm 8px
--b-blur-md 16px
--b-blur-lg 24px
Aa
.b-material-ultrathin
Aa
.b-material-thin
Aa
.b-material-regular
Aa
.b-material-thick
Aa
.b-material-chrome
``` ### Borders & Dividers (https://ui.barua.tz/docs/foundations.html#borders-dividers) Four weights of edge, all translucent so they sit naturally on any surface: --b-hairline for glass edges and elevation rings, --b-separator for list rows and card borders, --b-border for inputs and controls, and --b-border-strong for their hover state. .b-divider draws separator rules — vertical inside an hstack, labeled for timeline breaks, and inset to align with list content. Classes: b-divider b-divider--label b-divider--vertical b-hstack ```html
Reply
Forward
Archive

Yesterday
``` ### Motion (https://ui.barua.tz/docs/foundations.html#motion) Motion is quick, physical and quiet: five durations, five curves, and nothing animates that doesn't communicate. Small state changes use instant and fast ; surfaces that move use slow with the spring curve. Everything collapses to near zero under prefers-reduced-motion — see Accessibility. Variants: Transitions, Animation Classes: b-btn b-btn--primary b-card b-card--interactive b-card__body b-chip b-footnote b-progress b-progress--indeterminate b-progress__fill b-spinner b-spinner--lg b-table b-table-wrap ```html instant · 100ms fast · 150ms normal · 250ms slow · 350ms slower · 500ms standard · default out · entrances in · exits spring · sheets bounce · overshoot ``` ### Iconography (https://ui.barua.tz/docs/foundations.html#iconography) Icons are inline SVG — no font, no sprite request. Draw on a 20×20 viewBox with a 1.5 stroke, stroke="currentColor" and round caps and joins, so every icon inherits text color and matches the SF Symbols weight. .b-icon sizes the box ( --sm 16, default 20, --lg 24, --xl 32) and .b-icon-tile seats an icon on an accent-soft tile for list leaders and feature rows. Decorative icons take aria-hidden="true" . Classes: b-icon b-icon--lg b-icon--sm b-icon--xl b-icon-tile ```html ``` ### Accessibility (https://ui.barua.tz/docs/foundations.html#accessibility) Accessibility is baked into the tokens, not bolted on. The focus ring ( --b-focus-ring , a 3.5px accent halo) appears on :focus-visible only — keyboards get it, mouse clicks don't. Tab through this demo to see it. Classes: b-btn b-btn--primary b-input ```html ``` ### Dark Mode & Light Mode (https://ui.barua.tz/docs/foundations.html#dark-light) The root declares color-scheme: light dark and every color token is a light-dark() pair, so the whole system follows the OS by default. Set data-theme="light|dark" on to force a scheme — the topbar's data-b-theme-toggle button does exactly that and persists the choice, which the inline script restores before first paint to avoid a flash. Classes: b-card b-card__body b-card__subtitle b-card__title ```html
Light
color-scheme: light
Dark
color-scheme: dark
``` ### Responsive Rules (https://ui.barua.tz/docs/foundations.html#responsive-rules) Mobile first, always: base styles serve the smallest screen, and each of the six breakpoints only adds. Most layouts shouldn't need media queries at all — .b-grid--auto , .b-card-grid and the stack primitives reflow on their own. When you do write one, use min-width at a shared stop. ### View Transitions (https://ui.barua.tz/docs/foundations.html#view-transitions) Two things, on the platform's View Transitions API. Opt in with data-vt on and same-origin navigations cross-fade on the system's motion tokens (180ms out, 220ms in). Off by default, disabled automatically under reduced motion, and inert in browsers without the API. Variants: Shared elements Classes: b-btn b-btn--ghost b-btn--glass b-btn--sm b-card b-card__body b-card__subtitle b-card__title b-code b-code__header b-footnote b-gap-3 b-hstack b-stack b-text-secondary b-thumb ```html
Page transitions
<html data-vt>   <!-- pages now cross-fade on navigation -->
``` ## Icons — the 20×20 glyph set ### Usage (https://ui.barua.tz/docs/icons.html#icon-usage) Size icons with .b-icon (1.25rem), .b-icon--sm (1rem) or .b-icon--lg (1.75rem) instead of width/height attributes. Icons inherit currentColor , so they recolor with the component state — a tinted button tints its glyph for free. Decorative icons take aria-hidden="true" ; icon-only buttons carry the label via aria-label . Classes: b-btn b-btn--ghost b-btn--glass b-btn--primary b-icon b-icon--sm b-icon-btn b-tooltip-host ```html ``` ### Symbol effects (https://ui.barua.tz/docs/icons.html#symbol-effects) A glyph that answers an action is the cheapest feedback an interface has. Add one class to the icon rather than to the control, so a button keeps its own states. The division that matters is whether an effect plays once or repeats : one acknowledges something that just happened, the other describes something still happening. A repeating effect used as an acknowledgement is just noise. Classes: b-btn b-btn--primary b-btn--sm b-btn--tinted b-caption b-caption2 b-code b-code__header b-gap-2 b-gap-4 b-hstack b-icon b-icon--bounce b-icon--breathe b-icon--pulse b-icon--replace b-icon--rotate b-icon--scale b-icon--sm b-icon--wiggle b-stack--wrap b-table b-table-wrap b-text-secondary b-vstack ```html
the one-shot effects have already run — press to see them
--bounce --scale
--sm · 40rem
--md · 48rem
default · 64rem
--xl · 80rem
--fluid · no cap
``` ### Stack (VStack) (https://ui.barua.tz/docs/layout.html#stack) .b-stack (alias .b-vstack ) is a vertical flex column with a token gap — the default building block for any view. Tune spacing with the gap scale — .b-gap-0 , .b-gap-1 , .b-gap-2 , .b-gap-3 , .b-gap-4 , .b-gap-6 , .b-gap-8 — instead of margins on children. Variants: Alignment Classes: b-card__body b-gap-2 b-grid b-grid--3 b-stack b-stack--center b-stack--end b-stack--start ```html
1
2
3
``` ### HStack (https://ui.barua.tz/docs/layout.html#hstack) .b-hstack lays children out in a row, vertically centered. The alignment modifiers are shared with Stack — add .b-stack--between to spread children across the row. Variants: Title + Spacer + action Classes: b-badge b-badge--accent b-btn b-btn--sm b-btn--tinted b-card__body b-gap-2 b-headline b-hstack b-spacer b-stack--between ```html
1
2
3
1
2
3
``` ### Grid (https://ui.barua.tz/docs/layout.html#grid) .b-grid is a 12-column grid by default: set --b-cols (or a .b-grid--2/3/4/6 preset) and place children with .b-col-span-* classes. Variants: Auto-fit Classes: b-card__body b-col-span-4 b-col-span-6 b-col-span-full b-grid b-grid--auto ```html
span 4
span 4
span 4
span 6
span 6
span full
``` ### Flex (https://ui.barua.tz/docs/layout.html#flex) A thin display: flex shorthand for when a stack is too opinionated. --center and --between handle both axes; .b-grow and .b-shrink-0 tune individual children. Classes: b-card__body b-flex b-flex--between b-grow b-shrink-0 ```html
--between
--between
--between
fixed
b-grow
fixed
``` ### Split View (https://ui.barua.tz/docs/layout.html#split-view) Master–detail in one line of markup: .b-split stretches .b-panel children to equal height with a .b-resize-handle between them. Make the sidebar .b-resizable and dragging is native CSS resize — no JavaScript. Classes: b-card__body b-grow b-panel b-resizable b-resize-handle b-split ```html
Sidebar
Detail
``` ### Resizable Panel (https://ui.barua.tz/docs/layout.html#resizable-panel) .b-resizable adds the browser's native resize grip to any panel — horizontal by default, --vertical for height. Look for the grip in the bottom-trailing corner; min and max bounds are built in. Classes: b-card__body b-panel b-resizable b-resizable--vertical ```html
Drag my corner →
Drag me taller ↓
``` ### Panel (https://ui.barua.tz/docs/layout.html#panel) .b-panel is the plain workhorse surface: surface background, hairline border, large radius. --plain strips the chrome for panels that only exist to scroll or resize. Classes: b-card__body b-grid b-grid--2 b-panel b-panel--plain ```html
b-panel
b-panel--plain
``` ### Section (https://ui.barua.tz/docs/layout.html#section) .b-section adds generous block padding between page regions — the vertical rhythm of a landing or settings page. --tight is the compact cut. Dividers shown here only to make the padding visible. Classes: b-card__body b-divider b-section b-section--tight ```html

b-section--tight

b-section

``` ### Card Grid (https://ui.barua.tz/docs/layout.html#card-grid) A responsive shelf of cards: auto-fill columns at least 17rem wide, token gap, no breakpoints. The default answer for dashboards and galleries. Classes: b-card b-card-grid b-card__body b-card__subtitle b-card__title ```html
Reports
Weekly digest
Automations
4 running
Contacts
1,208 people
Billing
Paid until March
``` ### Masonry (https://ui.barua.tz/docs/layout.html#masonry) CSS-columns masonry for content of uneven height — pins, notes, image cards. Items flow down each column in source order; cap the column count with --b-masonry-cols . Classes: b-card b-card__body b-masonry ```html
1
2
3
4
5
6
``` ### Scroll Area (https://ui.barua.tz/docs/layout.html#scroll-area) Give it a height and .b-scroll-area contains the scrolling: overscroll never leaks to the page and the scrollbar gutter stays stable. --fade masks both edges so clipped content looks intentional. Classes: b-card__body b-gap-2 b-grid b-grid--2 b-scroll-area b-scroll-area--fade b-stack ```html
Row 1
Row 2
Row 3
Row 4
Row 5
Row 6
Content
Pinned footer
``` ### Divider (https://ui.barua.tz/docs/layout.html#divider) Hairline separators drawn with --b-separator . Horizontal by default; use them sparingly — a stack gap is often separation enough. Variants: Vertical, Inset, Label Classes: b-avatar b-avatar--sm b-body b-btn b-btn--primary b-divider b-divider--inset b-divider--label b-divider--vertical b-gap-3 b-hstack b-link b-link--danger b-list b-list-item b-list-item__content b-list-item__subtitle b-list-item__title b-stack ```html

Above the fold


Below the fold

``` ### Responsive (https://ui.barua.tz/docs/layout.html#responsive) Barua is mobile-first and the components own their own shrinking — pages should not need bespoke media queries. .b-dashboard spans collapse to full width below md (768px) and the column grid engages above it. Floating surfaces clamp themselves to the viewport: toasts, notifications, menus and the command palette cap their width, and the dock tray scrolls when crowded. The breakpoint scale lives in Foundations ; when a component should respond to its box rather than the viewport, use container queries below. Variants: Wrapping toolbars, Visibility utilities Classes: b-badge b-badge--accent b-btn b-btn--glass b-btn--primary b-btn--sm b-gap-2 b-hide-desktop b-hide-mobile b-hstack b-spacer b-stack--wrap ```html
Inbox Sent Archive
``` ### Stage (https://ui.barua.tz/docs/layout.html#stage) .b-stage turns a page into a fixed screen: full viewport height, no scrolling — the layout for ambient walls, kiosks and TV-style surfaces where everything must be visible at once. Its .b-container child stretches, a .b-dashboard inside shares the remaining height between rows, and cards clip internally instead of growing the page. Below md it steps aside and the page scrolls like any phone screen. The ambient example is built on it. Classes: b-card b-card--compact b-card__body b-card__header b-card__title b-container b-dashboard b-gap-3 b-span-6 b-stack b-stage ```html
Fits
Rows share the stage height.
Clips
Overflowing content clips inside the card — the page never scrolls.
``` ### Container Queries (https://ui.barua.tz/docs/layout.html#container-queries) SwiftUI's ViewThatFits , the CSS way: mark a wrapper .b-cq and children respond to the container's width — .b-cq-show-sm/md/lg appear at ≥24/40/56rem, .b-cq-hide-* retire. The same component adapts in a sidebar and in a full-width main without media queries. Classes: b-card b-card__body b-cq b-cq-hide-sm b-cq-show-sm b-footnote b-text-secondary ```html
Narrow container → compact Wide container content
Narrow container → compact Wide container content — this card is past the 24rem detent, so the fuller layout renders.
``` ### Text that fits (https://ui.barua.tz/docs/layout.html#fit-text) SwiftUI has minimumScaleFactor ; CSS has no direct equivalent, but a container query unit does the same job honestly. .b-fit-text sizes its child as a fraction of the container's width, clamped so it can never become unreadable at one end or absurd at the other. Classes: b-fit-text b-gap-3 b-stack b-stat__value ```html
TZS 4,208,500
TZS 4,208,500
TZS 4,208,500
``` ## Actions — buttons, icon buttons, toolbars, links ### Button (https://ui.barua.tz/docs/actions.html#button) The workhorse. Default is a neutral filled button; add .b-btn--primary for the main action of a view — aim for one primary per view, like Apple does. Variants: Sizes, States Classes: b-btn b-btn--block b-btn--danger b-btn--danger-tinted b-btn--ghost b-btn--glass b-btn--lg b-btn--liquid b-btn--outline b-btn--pill b-btn--primary b-btn--sm b-btn--tinted b-btn--xl b-btn--xs ```html ``` ### Icon Button (https://ui.barua.tz/docs/actions.html#icon-button) Square variant for icon-only actions. Always provide aria-label ; add .b-tooltip-host with data-tooltip for a hover hint. Classes: b-btn b-btn--danger-tinted b-btn--ghost b-btn--primary b-btn--sm b-icon-btn b-tooltip-host ```html ``` ### Floating Action Button (https://ui.barua.tz/docs/actions.html#fab) .b-fab pins to the bottom-trailing corner with safe-area padding and an accent glow. Shown here inline with position: static for the demo. Classes: b-btn b-fab b-fab--extended b-icon-btn ```html ``` ### Button Group (https://ui.barua.tz/docs/actions.html#button-group) Related actions fused into one control. Use .b-btn-group--attached for a hairline between segments. Classes: b-btn b-btn--outline b-btn-group b-btn-group--attached ```html
``` ### Split Button (https://ui.barua.tz/docs/actions.html#split-button) Primary action plus a chevron that opens related choices. Classes: b-btn b-btn--primary b-dropdown b-menu b-menu__item b-split-btn ```html
Merge branch
``` ### Toggle Button (https://ui.barua.tz/docs/actions.html#toggle-button) A button with on/off state. Reflect state with aria-pressed ; the accent tint appears automatically. Classes: b-btn b-icon-btn b-toggle-btn ```html ``` ### Link (https://ui.barua.tz/docs/actions.html#link) Inline navigation. Plain elements are accent colored by default; .b-link adds icon alignment and muted/danger variants. Classes: b-link b-link--danger b-link--muted ```html View documentation Secondary link Remove account ``` ### Link Group (https://ui.barua.tz/docs/actions.html#link-group) A wrapping row of related links, optionally dot-separated. Classes: b-link b-link--muted b-link-group ```html ``` ### Toolbar (https://ui.barua.tz/docs/actions.html#toolbar) Compact strip of small controls with hairline dividers. Add .b-toolbar--glass when it floats above content. Classes: b-btn b-btn--ghost b-btn--sm b-btn--tinted b-divider b-divider--vertical b-icon-btn b-toolbar b-toolbar--glass ```html ``` ### Action Menu (https://ui.barua.tz/docs/actions.html#action-menu) An icon button opening a .b-menu . Uses
for a zero-JS dropdown — see Navigation for the full menu family. Classes: b-btn b-dropdown b-icon-btn b-menu b-menu__item b-menu__item--danger b-menu__separator b-menu__shortcut ```html

``` ### Share (https://ui.barua.tz/docs/actions.html#share) SwiftUI's ShareLink : any button with data-b-share opens the system share sheet ( navigator.share ), falling back to copying the link with a confirming toast. Pass a URL in the attribute or leave it empty to share the current page. Classes: b-btn b-share ```html ``` ## Navigation — bars, sidebars, tabs, menus, command palette ### Top Navigation (https://ui.barua.tz/docs/navigation.html#top-navigation) .b-topnav is the sticky glass chrome bar you are looking at right now — brand, inline links, and trailing actions separated by a .b-spacer . Reach for it on marketing pages and docs with a handful of destinations; move to a sidebar or rail once the map outgrows one row. Demoed with position: static so it stays in the box. Classes: b-btn b-btn--ghost b-btn--primary b-btn--sm b-spacer b-topnav b-topnav__brand b-topnav__link b-topnav__links ```html
Acme
``` ### Sidebar (https://ui.barua.tz/docs/navigation.html#sidebar) .b-sidebar stacks grouped items with uppercase headings — the pattern for apps with many destinations (this docs site uses one). Items take an optional icon and a trailing .b-badge for counts; add .b-sidebar--surface when it needs its own background and end hairline. Boxed here at a fixed height to show the built-in scroll. Classes: b-badge b-badge--accent b-sidebar b-sidebar__group b-sidebar__heading b-sidebar__item ```html