Getting started
Install the stylesheet, understand its boundaries, and find the public styling hooks.
Install and import
Install the package in your application:
pnpm add @barbajoe/css-libImport the stylesheet once from your application entry point:
import "@barbajoe/css-lib";The explicit @barbajoe/css-lib/dist/barbajoe.css import remains supported. Both imports use the same global stylesheet.
The new category dropdown navigation is introduced in CSS library 0.5.0. This preview is available before npm publication.
What the library owns
Start with semantic HTML. The library supplies typography, colors, form controls, and documented visual patterns. Applications own state, events, validation, focus transitions, announcements, and persistence. Working examples on this site use synthetic, local data; their scripts and specimen layout styles do not ship in the package.
Customize public --barba- tokens and application selectors. Applications choose table overflow, image sizing, and content-specific layout. Read the source versus installed-package theme guidance before copying a theme example.
API quick reference
The package supplies CSS only. Applications supply state, events, validation, focus, live announcements, and persistence. Full markup, state, and customization reference.
- Shell and navigation
.app-shellhas a direct main and optional header/footer..site-header,.site-header-brand,.site-header-linksarrange native links and buttons; usearia-current="page"for the current destination..skip-linktargets main.- Buttons and X actions
data-barba-variant: primary, secondary, tertiary, text, and icon.data-barba-intent="danger"supplies destructive appearance. Icon actions also usedata-barba-shape="icon";data-barba-size="compact"reduces the face. Removable chips use the expanded target described in the Chips section; standalone compact icons retain their 44px minimum target. Native type, name, and disabled state remain required.- Fields
.inline-fieldhas a direct visible label..input-rowwraps a field/group and action..input-actionrequires a direct-child text/search input and icon button; nested component inputs and textareas need application layout. Hide clear when empty; restore focus before hiding it.- Chips
.chip-listwraps. Informational.chipstays noninteractive. A selectable button needsaria-pressedand a.chip-facechild..chip-removablecontains a label span and separate compact X button; applications restore focus after removal.- Disclosures
details.disclosurehas a direct summary with.disclosure-label,.disclosure-title, optional.disclosure-description, then.disclosure-content. Add.disclosure--filledfor a filled header, shared inward/downward chevron, and an accent body border. Nativeopenowns expansion; both variants share markup.- Dialogs
- A named native dialog contains a direct
.dialog-content-containerwith.dialog-header,.dialog-body,.dialog-footer. Add.dialog-header-actionsfor a close row. Optionaldata-barba-dialog-*: spacing=compact, height=content, room=extra, dividers=full. Applications own cancellation and initial/restored focus. - Visibility and customization
.visually-hiddenretains supplemental text for assistive technology. Ordinaryhiddensuppresses rendering and tab stops; remove the attribute to reveal (the string “false” still hides).hidden="until-found"remains browser-managed. Customize public--barba-tokens; private--_barba-and compiler properties are not API. Decorative.text-gradientand.scaleup-on-hoverare optional. Recheck contrast, focus, and target sizes after overrides.
For adoption notes, browser support, development, testing, and releases, see the maintained package README.