Skip to content

Theming ​

@zairakai/vue-components ships no style. The components give the semantic markup, the accessibility (WAI-ARIA, keyboard) and the behaviour; the look is yours, usually written with @zairakai/mithril-scss. This document is the contract between the markup and your styles.

Class hooks ​

Every component has a stable class on its root element and on its main parts. Add your own with the class prop, it is kept.

ComponentClasses
DisplayCardcard, card-header, card-body, card-footer
DisplayBadgebadge
DisplayAvataravatar
DisplayAccordionaccordion, accordion-item, accordion-header, accordion-trigger, accordion-panel
DisplayDividerdivider
FeedbackAlertalert, alert-close
FeedbackToastContainertoast-container, toast, toast-close
FeedbackProgressprogress, progress-bar
FeedbackSkeletonskeleton
NavigationTabstabs, tab-list, tab, tab-panel
NavigationPaginationpagination, pagination-item, pagination-gap
NavigationBreadcrumbbreadcrumb, breadcrumb-item
NavigationStepperstepper, step
OverlayModal, OverlayDialog, OverlayDrawermodal, dialog, drawer, modal-header, modal-body, modal-footer
OverlayTooltip, OverlayPopover, OverlayDropdowntooltip, popover, dropdown, dropdown-menu, dropdown-item
DataTabledata-table, data-table-sort, data-table-empty, data-table-loading
FormCombobox, FormMultiSelectcombobox, combobox-list, combobox-option, multi-select-chip
FormDatePickerdate-picker, date-picker-day

State attributes ​

State is exposed with data-* attributes and ARIA attributes, never with a class that you would have to guess. Style them directly:

scss
.accordion-trigger[aria-expanded="true"] { /* open */ }
.badge[data-variant="success"] { /* variants */ }
.tab[aria-selected="true"] { /* active tab */ }
.alert[data-variant="error"] { /* ... */ }
.modal[open] { /* open dialog */ }
.dropdown-item[data-active] { /* keyboard highlight */ }

Variants (info, success, warning, error, and default) are always in data-variant; sizes in data-size (small, medium, large); the placement of a floating element in data-placement (top, bottom-start...).

Functional CSS only ​

The only inline styles are the ones the behaviour needs, and they can be overridden with custom properties:

Custom propertyUsed byDefault
--zk-z-overlaymodal, dialog, drawer1000
--zk-z-floatingtooltip, popover, dropdown, combobox1100
--zk-z-toasttoast container1200
--zk-drawer-sizedrawer24rem

Dark mode and tokens ​

Colors, spacings and typography are the tokens of @zairakai/mithril-scss (CSS custom properties). A dark theme is a second set of values for those properties: the components do not need to know about it.

Documentation of 1.4.4 , built from 8e9b054 on 1.4.4 by pipeline #2989941079 on 2026-10-26.