# Kikita UI -- Full Context Every public docs page for the installed @kikita-labs/ui package, concatenated for large-context agent ingestion. Prefer llms.txt for a curated index; use this file when you need everything. --- # Kikita UI > Angular component library documentation and external consumer verification. - Status: available - Route: / - Package: @kikita-labs/ui@2.0.0 ## Foundations - [Accessibility](https://kikita-labs.github.io/kikita-ui-docs/llms/foundations/accessibility.md): Keyboard, semantics, focus, and WCAG expectations. - [Auto Focus](https://kikita-labs.github.io/kikita-ui-docs/llms/foundations/auto-focus.md): kuiAutoFocus moves focus to its host, or to the first focusable element inside it, after the browser has rendered. - [Defaults](https://kikita-labs.github.io/kikita-ui-docs/llms/foundations/defaults.md): Set shared preferences such as size, shape, clearable or toast placement once for the application or for a subtree, instead of repeating them in every template. - [Density](https://kikita-labs.github.io/kikita-ui-docs/llms/foundations/density.md): Spacing and control density expectations for product UIs. - [Forms](https://kikita-labs.github.io/kikita-ui-docs/llms/foundations/forms.md): Kikita UI is Signal Forms first: put the control directive and [formField] on the same element and wrap it in kui-field for the label, hint, error and required marker. - [Installation](https://kikita-labs.github.io/kikita-ui-docs/llms/foundations/installation.md): Package installation and global stylesheet setup. - [Internationalization](https://kikita-labs.github.io/kikita-ui-docs/llms/foundations/internationalization.md): Locale and messages are two independent settings: the locale formats dates, numbers and plurals, the messages translate the text the library owns. - [Migrating to 2.0](https://kikita-labs.github.io/kikita-ui-docs/llms/foundations/migration.md): Every breaking change of @kikita-labs/ui 2.0: renamed exports, provider defaults, locale and messages, icons, tokens, component behaviour and the charts. - [Structural icons](https://kikita-labs.github.io/kikita-ui-docs/llms/foundations/structural-icons.md): The small glyphs a component draws for itself, such as the cross on a dialog or the chevron on a select, as replaceable icon data. - [Theming](https://kikita-labs.github.io/kikita-ui-docs/llms/foundations/theming.md): Theme provider setup and theme customization basics. - [Tokens](https://kikita-labs.github.io/kikita-ui-docs/llms/foundations/tokens.md): Design token categories exposed through Kikita CSS variables. - [Typography](https://kikita-labs.github.io/kikita-ui-docs/llms/foundations/typography.md): Semantic type-role classes, text tones, and the kuiText directive. ## Components - [Accordion](https://kikita-labs.github.io/kikita-ui-docs/llms/components/accordion.md): Disclosure component for grouped expandable content. - [Alert](https://kikita-labs.github.io/kikita-ui-docs/llms/components/alert.md): Inline notification embedded in the page content flow. - [Avatar](https://kikita-labs.github.io/kikita-ui-docs/llms/components/avatar.md): User or entity identity with image, initials, and status. - [Badge](https://kikita-labs.github.io/kikita-ui-docs/llms/components/badge.md): Compact status or metadata marker. - [Bar Chart](https://kikita-labs.github.io/kikita-ui-docs/llms/components/bar-chart.md): Vertical or horizontal, grouped or stacked bar chart. - [Breadcrumbs](https://kikita-labs.github.io/kikita-ui-docs/llms/components/breadcrumbs.md): Hierarchy trail. - [Button](https://kikita-labs.github.io/kikita-ui-docs/llms/components/button.md): Primary command primitive for buttons and links. - [Calendar](https://kikita-labs.github.io/kikita-ui-docs/llms/components/calendar.md): Date grid. - [Calendar Range](https://kikita-labs.github.io/kikita-ui-docs/llms/components/calendar-range.md): Inline month grid for selecting a start and end date. - [Card](https://kikita-labs.github.io/kikita-ui-docs/llms/components/card.md): Surface, elevated, and sunken content container. - [Carousel](https://kikita-labs.github.io/kikita-ui-docs/llms/components/carousel.md): Horizontal strip of slides with arrows, a dot picker and optional autoplay. - [Checkbox](https://kikita-labs.github.io/kikita-ui-docs/llms/components/checkbox.md): Native checkbox styling with field state integration. - [Chip](https://kikita-labs.github.io/kikita-ui-docs/llms/components/chip.md): Compact token for selected values, filters, and entity references. - [Color Input](https://kikita-labs.github.io/kikita-ui-docs/llms/components/color-input.md): Color value input. - [Combobox](https://kikita-labs.github.io/kikita-ui-docs/llms/components/combobox.md): Searchable input with projected options and async mode. - [Command Palette](https://kikita-labs.github.io/kikita-ui-docs/llms/components/command-palette.md): Searchable command overlay for application actions. - [Date Picker](https://kikita-labs.github.io/kikita-ui-docs/llms/components/date-picker.md): Calendar date input. - [Dialog](https://kikita-labs.github.io/kikita-ui-docs/llms/components/dialog.md): Typed modal overlay service and host contract. - [Donut Chart](https://kikita-labs.github.io/kikita-ui-docs/llms/components/donut-chart.md): Donut chart for shares of a whole. - [Drawer](https://kikita-labs.github.io/kikita-ui-docs/llms/components/drawer.md): Side and edge overlay surface for focused workflows. - [Dropdown](https://kikita-labs.github.io/kikita-ui-docs/llms/components/dropdown.md): Projected option overlay used by select-like controls. - [Empty State](https://kikita-labs.github.io/kikita-ui-docs/llms/components/empty-state.md): Known empty, error, no-access, and success content states. - [Field](https://kikita-labs.github.io/kikita-ui-docs/llms/components/field.md): Label, hint, error, and form-control composition. - [File Upload](https://kikita-labs.github.io/kikita-ui-docs/llms/components/file-upload.md): Controlled file picker. - [Group](https://kikita-labs.github.io/kikita-ui-docs/llms/components/group.md): Grouped control chrome for adjacent actions and fields. - [Icon](https://kikita-labs.github.io/kikita-ui-docs/llms/components/icon.md): SVG icon renderer. - [Icon Button](https://kikita-labs.github.io/kikita-ui-docs/llms/components/icon-button.md): Compact icon-only action control. - [Input](https://kikita-labs.github.io/kikita-ui-docs/llms/components/input.md): Native text input styling with field integration. - [Line Chart](https://kikita-labs.github.io/kikita-ui-docs/llms/components/line-chart.md): Line and area chart for trends over categories. - [Link](https://kikita-labs.github.io/kikita-ui-docs/llms/components/link.md): Inline interactive text for navigation or a JS-driven action. - [Loader](https://kikita-labs.github.io/kikita-ui-docs/llms/components/loader.md): Inline loading indicator for buttons and status areas. - [Media Viewer](https://kikita-labs.github.io/kikita-ui-docs/llms/components/media-viewer.md): Fullscreen photo lightbox with navigation, thumbnails and zoom. - [Menu](https://kikita-labs.github.io/kikita-ui-docs/llms/components/menu.md): Anchored command menu with keyboard focus behavior. - [Number Input](https://kikita-labs.github.io/kikita-ui-docs/llms/components/number-input.md): Number input states with compact variant options. - [OTP Input](https://kikita-labs.github.io/kikita-ui-docs/llms/components/otp-input.md): Row of single-character cells for a one-time code or PIN. - [Pagination](https://kikita-labs.github.io/kikita-ui-docs/llms/components/pagination.md): Page navigation with numbers, steps, a summary and a rows-per-page picker. - [Popover](https://kikita-labs.github.io/kikita-ui-docs/llms/components/popover.md): Anchored content surface for contextual UI. - [Progress](https://kikita-labs.github.io/kikita-ui-docs/llms/components/progress.md): Progress status primitive for determinate and indeterminate work. - [Radio](https://kikita-labs.github.io/kikita-ui-docs/llms/components/radio.md): Native radio control styling for exclusive choices. - [Scatter Chart](https://kikita-labs.github.io/kikita-ui-docs/llms/components/scatter-chart.md): Scatter and bubble chart for two numeric measures. - [Scrollbar](https://kikita-labs.github.io/kikita-ui-docs/llms/components/scrollbar.md): Tokenized native scroll container utility. - [Segmented](https://kikita-labs.github.io/kikita-ui-docs/llms/components/segmented.md): Compact single-choice control rendered as adjacent segment buttons. - [Select](https://kikita-labs.github.io/kikita-ui-docs/llms/components/select.md): Dropdown-backed selection control for single and multiple values. - [Separator](https://kikita-labs.github.io/kikita-ui-docs/llms/components/separator.md): Tokenized horizontal or vertical separator primitive. - [Skeleton](https://kikita-labs.github.io/kikita-ui-docs/llms/components/skeleton.md): Loading placeholder with reduced-motion behavior. - [Slider](https://kikita-labs.github.io/kikita-ui-docs/llms/components/slider.md): Native range input styling with field and Signal Forms support. - [Splitter](https://kikita-labs.github.io/kikita-ui-docs/llms/components/splitter.md): Draggable multi-pane layout with resizable gutters. - [Stepper](https://kikita-labs.github.io/kikita-ui-docs/llms/components/stepper.md): Multi-step progress and navigation indicator. - [Switch](https://kikita-labs.github.io/kikita-ui-docs/llms/components/switch.md): Native switch control styling for binary settings. - [Table](https://kikita-labs.github.io/kikita-ui-docs/llms/components/table.md): Native table styling, sorting context, and selection cells. - [Tabs](https://kikita-labs.github.io/kikita-ui-docs/llms/components/tabs.md): Line and pill tab navigation with optional panel wiring. - [Textarea](https://kikita-labs.github.io/kikita-ui-docs/llms/components/textarea.md): Native multiline input styling with field integration. - [Time Picker](https://kikita-labs.github.io/kikita-ui-docs/llms/components/time-picker.md): Time-of-day input with a scrollable hour, minute and second panel. - [Toast](https://kikita-labs.github.io/kikita-ui-docs/llms/components/toast.md): Global notifications with actions and live-region semantics. - [Tooltip](https://kikita-labs.github.io/kikita-ui-docs/llms/components/tooltip.md): Hover and focus hint. - [Tree](https://kikita-labs.github.io/kikita-ui-docs/llms/components/tree.md): Hierarchical list. ## Resources - [AI Support](https://kikita-labs.github.io/kikita-ui-docs/llms/resources/ai-support.md): Agent-readable docs, llms.txt, and local MCP setup for Kikita UI. - [Package Smoke](https://kikita-labs.github.io/kikita-ui-docs/llms/resources/smoke.md): External consumer verification for package imports, styles, and providers. --- # Accessibility > Keyboard, semantics, focus, and WCAG expectations. - Status: available - Route: /foundations/accessibility - Package: @kikita-labs/ui@2.0.0 ## Content ### Baseline rules These requirements apply to primitives, docs examples, and consumer verification pages. | Name | Type | Default | Description | | --- | --- | --- | --- | | Semantics first | HTML | - | Prefer native elements and browser behavior before adding ARIA. | | Keyboard | WCAG AA | - | Every interactive state must be reachable, operable, and escapable by keyboard. | | Focus | Visible state | - | Focus indicators must remain visible and must not cause layout shift. | | Contrast | WCAG AA | - | Text, icons, focus, disabled, invalid, selected, and loading states must remain distinguishable. | ### Review levels A clean automated scan is only a smoke test. Do not mark a primitive fully audited without keyboard and assistive-technology review. | Name | Type | Default | Description | | --- | --- | --- | --- | | DOM smoke | Automated | - | Catches broken ARIA references, duplicate ids, invalid roles, and unnamed controls. | | Keyboard review | Manual | - | Verifies tab order, activation keys, escape behavior, and focus restoration. | | Assistive technology | Manual | - | Uses a real screen reader or platform accessibility tool for names, roles, and states. | | Visual review | Manual | - | Checks responsive layout, 200% zoom, reduced motion, forced colors, and contrast. | ### Focus, forms and keyboard Focus handling and required or invalid state follow one shared behaviour across the library. ### Motion, contrast and forced colors Nonessential motion, contrast and Windows High Contrast are part of every state-bearing component. ### Docs examples Examples should use Kikita field wiring and native state attributes instead of compensating for broken markup with custom ARIA. #### field-example.html ```html ``` #### navigation.html ```html Tokens ``` ### Coverage notes Record the actual level of review. Be explicit when only DOM smoke has run. #### state-coverage.md ```md - DOM accessibility smoke has run for , but real assistive-technology review is still pending. ``` #### state-coverage.md ```md - Assistive-technology review for was run with . Covered keyboard navigation, names/roles/states, focus return, and primitive-specific behavior. Remaining gap: none known. ``` --- # Auto Focus > kuiAutoFocus moves focus to its host, or to the first focusable element inside it, after the browser has rendered. - Status: available - Route: /foundations/auto-focus - Package: @kikita-labs/ui@2.0.0 ## Content ### Import and usage Use it where the next step is obvious, such as the first field of a dialog or a code field that has just appeared. The directive has no styles. #### auto-focus.ts ```ts import { KuiAutoFocus } from '@kikita-labs/ui'; ``` #### form.html ```html ``` #### form.html ```html ``` #### form.html ```html
``` ### Rules The directive is conservative about when it moves focus. ### API There are no outputs, providers or CSS custom properties. | Name | Type | Default | Description | | --- | --- | --- | --- | | kuiAutoFocus | boolean | - | Enables focus (default false). The attribute without a value is true, and false to true focuses again. | | kuiAutoFocusPreventScroll | boolean | - | Focuses without scrolling the element into view (default false). | ### Accessibility Automatic focus can disorient screen-reader users, so keep it off by default. --- # Defaults > Set shared preferences such as size, shape, clearable or toast placement once for the application or for a subtree, instead of repeating them in every template. - Status: available - Route: /foundations/defaults - Package: @kikita-labs/ui@2.0.0 ## Content ### When to use defaults Defaults cover preferences shared by many instances. Data, instance state and form state are never defaults. | Name | Type | Default | Description | | --- | --- | --- | --- | | Colour, radius, spacing, type | Theme seeds and CSS variables | - | Visual identity of the whole application. | | Variant or behaviour shared across the app | Defaults | - | Size, shape, clearable, toast placement and similar preferences (this page). | | Density | Theme seeds | - | Set seeds.density in the theme. | | Texts and accessible names | Messages | - | See the Internationalization page. | ### Setting defaults defaults is a flat map with one key per primitive plus the global control size. Every key points to a named options interface such as KuiButtonOptions or KuiSelectOptions. #### app.config.ts ```ts provideKikitaUi({ defaults: { size: 'sm', button: { shape: 'ghost', size: 'md' }, select: { clearable: true, maxVisibleChips: 2 }, toast: { position: 'top-end', duration: 4000 }, }, }); ``` #### section.providers.ts ```ts // A component, route or environment injector: applies to that subtree only providers: [provideKuiDefaults({ button: { size: 'lg' } })]; ``` ### Layers and merging The nearest value wins, and each level is merged over the defaults it inherits per component key and per property. ### Reactive values Every property accepts a plain value or a Signal, and the whole defaults value may be a function that runs in an injection context. #### app.config.ts ```ts @Service() class ThemeState { readonly shape = signal('solid'); } provideKikitaUi({ defaults: () => ({ button: { shape: inject(ThemeState).shape } }), }); ``` #### defaults.ts ```ts const defaults = inject(KuiDefaults); defaults.set('button', { shape: 'outline' }); // merges into this level's own layer defaults.update('select', (current) => ({ clearable: !current?.clearable })); defaults.get('button'); // Signal of the effective button options ``` ### Global control size defaults.size applies to every primitive with a size input when neither the local input nor the component key sets one. ### Clearable controls and tooltips A few keys resolve through a chain with a shared field key. ### Overlays Anchored overlays share the placement and offset options and add their own. | Name | Type | Default | Description | | --- | --- | --- | --- | | popover | placement, offset, align, arrow, triggerType, hoverDelay | - | Built-in: bottom, 8, center, false, click, 100. | | menu | placement, offset, menuAlign, minWidth | - | Built-in: bottom, 4, start, none. | | dropdown | maxHeight, offset, closeOnSelect, panelWidth | - | Built-in: 240px, 4, true, anchor. | | tooltip | triggerType, placement | - | Built-in: auto, top. | | dialog | size, appearance, dismissable, closable | - | Per kuiDialog call. Built-in: md, default, true, true. | | drawer | side, size, closeOnBackdropClick, closeOnEscape, closable | - | Built-in: right, md, true, true, true. | ### Calendars, time, carousel and pagination These keys follow local input, then defaults, then the built-in default. | Name | Type | Default | Description | | --- | --- | --- | --- | | calendar, calendarRange | size, flat, showWeekend, showFooter, showPrevNav, showNextNav | - | Built-in: global size, false, true, false, true, true. The two keys are separate and share KuiCalendarViewOptions. | | timePicker | clearable, format, hourStep, minuteStep, secondStep, showSeconds | - | Built-in: true, the hour cycle of the locale, 1, 1, 1, false. The directive pushes them into its panel. | | carousel | itemsPerView, loop, autoplay, autoplayInterval, showArrows, showDots, draggable | - | Built-in: 1, false, false, 4000, true, true, true. | | pagination | variant, siblingCount, boundaryCount, pageSizeOptions | - | Built-in: compact, 1, 1, [10, 25, 50, 100]. | ### Other primitives Every remaining primitive has a key. Each option resolves as local input, then defaults, then the built-in default; size follows the size chain above. | Name | Type | Default | Description | | --- | --- | --- | --- | | badge, breadcrumbs, chip, emptyState, loader, segmented, table | size | - | | | input, textarea, checkbox, radio, switch, colorInput | size | - | | | numberInput | size, variant | - | | | slider, progress | size, color | - | | | accordion | size, mode, appearance | - | | | alert | size, shape, showIcon, closable | - | | | card | size, appearance | - | | | tabs | size, variant, orientation | - | | | stepper | size, orientation, linear, compact | - | | | tree | size, mode | - | | | group | size, orientation, collapsed, rounded | - | | | avatar, avatarGroup | size, shape (avatarGroup also max) | - | | | link | tone, underline | - | | | separator | appearance, orientation, spacing | - | | | skeleton | shape, animation | - | | | fileUpload | size, variant, mode | - | | | otpInput | size, mask, integerOnly | - | | | barChart, lineChart, donutChart, scatterChart | size, legend | - | | ### Structural icons The icons key replaces the glyphs components draw for themselves, one glyph per role or per component slot. #### app.config.ts ```ts provideKikitaUi({ defaults: { icons: { close: MY_CLOSE }, select: { chevronIcon: MY_CHEVRON } } }); ``` ### Migrating from the token API The injection tokens are removed and the provider functions remain as deprecated wrappers until 3.0. | Name | Type | Default | Description | | --- | --- | --- | --- | | kuiProvideButtonOptions({ button, iconButton }) | provideKuiDefaults({ button, iconButton }) | - | Deprecated wrapper, removed in 3.0. | | kuiProvideFieldOptions(options) | provideKuiDefaults({ field: options }) | - | Deprecated wrapper, removed in 3.0. | | kuiProvideSelectOptions(options) | provideKuiDefaults({ select: options }) | - | Deprecated wrapper, removed in 3.0. | | kuiProvideComboboxOptions(options) | provideKuiDefaults({ combobox: options }) | - | Deprecated wrapper, removed in 3.0. | | kuiProvideTooltipOptions(options) | provideKuiDefaults({ tooltip: options }) | - | Deprecated wrapper, removed in 3.0. | | provideKuiToastOptions(options) | provideKuiDefaults({ toast: options }) | - | Deprecated wrapper, removed in 3.0. | | provideKikitaUi({ tooltip }) | provideKikitaUi({ defaults: { tooltip } }) | - | Deprecated. | | KuiButtonOptions { button, iconButton } | KuiButtonProviderOptions | - | Deprecated; KuiButtonOptions now describes one button (shape, appearance, size). | | KuiButtonPrimitiveOptions | KuiButtonBaseOptions | - | Renamed. | | KikitaUiDefaults | KuiComponentDefaults | - | Deprecated alias. | --- # Density > Spacing and control density expectations for product UIs. - Status: available - Route: /foundations/density - Package: @kikita-labs/ui@2.0.0 ## Content ### Density values The published package exposes a typed KuiDensity union for compact, regular, and comfortable experiences. | Name | Type | Default | Description | | --- | --- | --- | --- | | compact | KuiDensity | - | Dense operational surfaces such as toolbars, tables, and high-frequency controls. | | regular | KuiDensity | - | Default application density and the safest choice for documentation examples. | | comfortable | KuiDensity | - | Touch-heavy or spacious contexts where larger hit areas matter more than density. | ### Global defaults Set density through theme seeds. Use provideKikitaUi defaults.size for app-wide control size, not for density. #### app.config.ts ```ts import { DEFAULT_KUI_THEME, provideKikitaUi } from '@kikita-labs/ui'; provideKikitaUi({ theme: { seeds: { ...DEFAULT_KUI_THEME.seeds, density: 'regular', }, }, }); ``` #### app.config.ts ```ts import { provideKikitaUi } from '@kikita-labs/ui'; provideKikitaUi({ defaults: { size: 'sm', }, }); ``` ### Control recommendations Height follows the size cascade. Density rebinds horizontal padding and spacing rhythm only. | Name | Type | Default | Description | | --- | --- | --- | --- | | Control height (xs / sm / md / lg) | 28px / 32px / 40px / 44px | - | Set by local size inputs, component providers, or provideKikitaUi defaults.size. Density does not affect height. | | Button x padding | 8px / 12px / 16px | - | Horizontal control padding across compact, regular, and comfortable density. | ### Component tokens Density rebinds the padding tokens below; height tokens resolve from data-kui-size instead. #### density.css ```css --kui-btn-px-compact --kui-btn-px-regular --kui-btn-px-comfortable ``` #### resolved.css ```css --kui-control-height-xs --kui-control-height-sm --kui-control-height-md --kui-control-height-lg --kui-btn-height --kui-btn-px --kui-input-px --kui-default-size ``` --- # Forms > Kikita UI is Signal Forms first: put the control directive and [formField] on the same element and wrap it in kui-field for the label, hint, error and required marker. - Status: available - Route: /foundations/forms - Package: @kikita-labs/ui@2.0.0 ## Content ### Signal Forms first Place the Kikita control directive and the Angular Signal Forms formField binding on the same native element, then wrap it with kui-field when the UI needs a visible label, hint, error or required marker. #### profile-form.ts ```ts import { signal } from '@angular/core'; import { email, form, minLength, required } from '@angular/forms/signals'; const model = signal({ email: '', project: '', }); const profileForm = form(model, (path) => { required(path.email, { message: 'Email is required' }); email(path.email, { message: 'Enter a valid email' }); required(path.project, { message: 'Project is required' }); minLength(path.project, 3, { message: 'Use at least 3 characters' }); }); ``` #### profile-form.html ```html
``` ### Field-first pattern kui-field owns the label, hint, error, required marker and aria-describedby wiring, so do not write them by hand for normal field usage. #### form.html ```html ``` #### form.html ```html ``` ### Custom field templates Use projected marker directives only when the field needs custom template logic. #### form.html ```html

Use your work email

@if (showEmailError()) {

Email is required

}
``` ### Controls that are not native elements kui-segmented and kui-otp-input implement the Signal Forms control contract themselves, so formField goes on the component. #### form.html ```html ``` ### Required and invalid state How the field and its controls expose validation to assistive technology. --- # Installation > Package installation and global stylesheet setup. - Status: available - Route: /foundations/installation - Package: @kikita-labs/ui@2.0.0 ## Content ### Package registry Kikita UI is published under the @kikita-labs scope on the public npm registry. No registry configuration or auth token is required. #### terminal ```bash pnpm add @kikita-labs/ui ``` ### Angular CLI setup Use the package schematic when possible. It preserves existing style entries and configures the selected Angular project. #### terminal ```bash ng add @kikita-labs/ui ``` #### terminal ```bash ng add @kikita-labs/ui --project my-app ``` ### Manual setup This docs app keeps the stylesheet in angular.json because that path is verified in a fresh Angular consumer build. #### angular.json ```json "styles": [ "node_modules/@kikita-labs/ui/styles/kikita-ui.css", "src/styles.scss" ] ``` #### app.config.ts ```ts import { type ApplicationConfig } from '@angular/core'; import { provideKikitaUi } from '@kikita-labs/ui'; export const appConfig: ApplicationConfig = { providers: [ provideKikitaUi({ scrollbars: 'styled', }), ], }; ``` ### Schematic options Use these options when a consumer app needs to control which parts of setup are written. | Name | Type | Default | Description | | --- | --- | --- | --- | | --project | string | - | Targets a specific Angular project when the workspace contains multiple projects. | | --skip-provider | boolean | - | Skips writing provideKikitaUi() when the app manages providers manually. | | --skip-styles | boolean | - | Skips adding the package stylesheet to angular.json. | | --theme | boolean | - | Writes the default theme seed configuration into provideKikitaUi(). Without it Kikita UI uses the same default theme internally and adds no theme code to the app. | ### Styles outside the CLI When styles are managed outside Angular CLI, import the public style entrypoint once and register the provider by hand. #### styles.css ```css @import '@kikita-labs/ui/styles'; ``` #### app.config.ts ```ts import { provideKikitaUi } from '@kikita-labs/ui'; export const appConfig = { providers: [provideKikitaUi()], }; ``` ### Icons and Content Security Policy The default Lucide set is read at a pinned lucide-static version (1.51.0) and converted to glyph data, not inserted as trusted HTML. #### app.config.ts ```ts import { createKuiLucideResolver, provideKikitaUi, provideKuiIcons, } from '@kikita-labs/ui'; // Serve the pinned lucide-static files yourself instead of reading them from the CDN. export const appConfig = { providers: [ provideKikitaUi({ icons: false }), provideKuiIcons(createKuiLucideResolver({ baseUrl: '/assets/lucide' })), ], }; ``` #### Content-Security-Policy ```text connect-src 'self' https://cdn.jsdelivr.net ``` | Name | Type | Default | Description | | --- | --- | --- | --- | | KUI_LUCIDE_STATIC_VERSION | '1.51.0' | - | Exact lucide-static version the default resolver reads. It changes only with a Kikita UI release. | | createKuiLucideResolver | (options?: KuiLucideResolverOptions) => KuiIconResolver | - | Reads another lucide-static version or origin, for self-hosted icon files. | | provideKuiIcons | (icons: KuiIconRegistry) => EnvironmentProviders | - | Registers named icons and resolvers for the injector it is provided in. | ### Upgrading from 1.x Update the package and run the migration that ships with it. See the Migrating to 2.0 page for every breaking change. #### terminal ```bash ng update @kikita-labs/ui ``` #### terminal ```bash ng update @kikita-labs/ui --migrate-only --from=1.8.0 --to=2.0.0 ``` --- # Internationalization > Locale and messages are two independent settings: the locale formats dates, numbers and plurals, the messages translate the text the library owns. - Status: available - Route: /foundations/internationalization - Package: @kikita-labs/ui@2.0.0 ## Content ### Locale and messages An application can change either one without the other: German dates with English labels, or French messages with the locale of the request. The library ships English only. | Name | Type | Default | Description | | --- | --- | --- | --- | | Locale | locale | - | Month and weekday names, week start and weekend, date and time layout, numbers and plural rules. | | Messages | messages | - | The text of the library: accessible names, visible words, placeholders, hints and announcements. | ### Quick start Set the locale and a partial messages layer in the root provider. Only the keys you write change; every other key keeps its English default. #### app.config.ts ```ts import { provideKikitaUi, type KuiMessagesLayer } from '@kikita-labs/ui'; const german: KuiMessagesLayer = { pagination: { next: 'Weiter', previous: 'Zurueck' }, calendar: { today: 'Heute' }, }; provideKikitaUi({ locale: 'de-DE', messages: german }); ``` #### messages.ts ```ts import { type KuiMessagesLayer } from '@kikita-labs/ui'; const german: KuiMessagesLayer = { pagination: { summary: ({ start, end, total }) => `${start}-${end} von ${total}`, }, }; ``` ### Follow the language at runtime Pass a Signal or a function. The library re-renders its labels when the signal changes and nothing is recreated. #### app.config.ts ```ts provideKikitaUi({ locale: () => inject(LanguageService).locale, // Signal messages: () => inject(LanguageService).messages, // Signal }); ``` #### language.service.ts ```ts inject(KuiI18n).setLocale('fr-FR'); inject(KuiI18n).setMessages(frenchMessages); ``` #### app.config.ts ```ts provideKikitaUi({ locale: () => inject(LOCALE_ID) }); ``` ### Override a subtree or one instance Levels and per-instance inputs let one part of the page differ without affecting another. #### booking.component.ts ```ts @Component({ providers: [ provideKuiI18n({ locale: 'fr-FR', messages: { calendar: { today: "Aujourd'hui" } } }), ], }) export class BookingComponent {} ``` ### Writing a translation Copy KUI_ENGLISH_MESSAGES, translate the values and let the compiler check every key. #### messages.ts ```ts fileUpload: { tooMany: ({ max }, { formatNumber, plural }) => `Maksymalnie ${formatNumber(max)} ${plural(max, { one: 'plik', few: 'pliki', many: 'plikow', other: 'pliku' })}`, }, ``` #### app.config.ts ```ts provideKikitaUi({ messages: () => { const transloco = inject(TranslocoService); const catalogue = toSignal(transloco.selectTranslateObject('kui')); return computed(() => toKuiMessages(catalogue())); }, }); ``` | Name | Type | Default | Description | | --- | --- | --- | --- | | ctx.locale | string | - | The resolved locale tag. | | ctx.formatNumber(n) | string | - | A number with the grouping and decimal separators of the locale, in Latin digits. | | ctx.plural(n, { one, ... }) | string | - | The form Intl.PluralRules selects: zero, one, two, few, many or other. | ### Where the locale comes from The locale is resolved from the nearest source and checked against the runtime Intl. ### What the locale controls Each area below follows the resolved locale. | Name | Type | Default | Description | | --- | --- | --- | --- | | Calendar | locale | - | Month and weekday names; heading order; first day and weekend from Intl.Locale getWeekInfo (static fallback for older engines); every day button named with its full date. | | Date Picker | locale | - | Field order and separator of the numeric date (10/03/2026, 03.10.2026). Parsing reads digit groups and needs a four digit year; format pins a layout. | | Time Picker | locale | - | Default 12 or 24 hour cycle, the separator, the day period text and its position; typing accepts the locale AM/PM text and ASCII am/pm. | | Pagination, Carousel, Media Viewer, OTP | locale | - | Counts and positions are formatted with the locale. | | Charts | locale | - | The default value format is the compact notation of the locale (1.2K in English, 1,5 Mio. in German). | | File Upload | locale | - | Sizes use Intl units (2.5 MB, 340 kB) and progress uses a percent format. | ### Accessibility and testing Accessible names come from the same messages as the visible text. ### Reference The public API of the locale and messages layer. | Name | Type | Default | Description | | --- | --- | --- | --- | | provideKikitaUi({ locale, messages }) | Provider | - | Root locale and messages. | | provideKuiI18n({ locale, messages }) | Provider[] | - | A level for a subtree. | | provideKuiLocale(locale) | Provider[] | - | Locale only. Accepts a tag, a Signal or a function. | | provideKuiMessages(messages) | Provider[] | - | Messages only. | | KuiI18n | service | - | locale, messages, context, get(group), setLocale and setMessages. | | KuiMessages, KuiMessagesLayer | types | - | The full message map and its partial override. | | KuiMessageContext, KuiPluralForms | types | - | Helpers passed to function messages. | | KUI_ENGLISH_MESSAGES | KuiMessages | - | The complete English pack. | | KUI_LOCALE | InjectionToken | - | Root locale source: request, transfer state, navigator. | | getKuiCalendarLocaleText(locale) | function | - | Month and weekday names, first day and weekend for a locale (pure, no cache). | --- # Migrating to 2.0 > Every breaking change of @kikita-labs/ui 2.0: renamed exports, provider defaults, locale and messages, icons, tokens, component behaviour and the charts. - Status: available - Route: /foundations/migration - Package: @kikita-labs/ui@2.0.0 ## Content ### Automatic migration Update the package and run the migration that ships with it. It renames identifiers only and never touches strings, comments or templates. #### terminal ```bash ng update @kikita-labs/ui ``` #### terminal ```bash ng update @kikita-labs/ui --migrate-only --from=1.8.0 --to=2.0.0 ``` #### terminal ```bash git grep -nE "Kui[A-Za-z]+(Component|Directive)\b|KuiToastService|kuiProvideLocale" ``` ### Naming rule and renamed exports An Angular class is named for what it is, not for the construct that declares it. There are no compatibility aliases: the old names no longer exist in 2.0. | Name | Type | Default | Description | | --- | --- | --- | --- | | KuiButtonDirective | KuiButton | - | A directive loses its suffix. | | KuiTabsComponent | KuiTabs | - | A component loses its suffix. | | KuiToastService | KuiToast | - | A service loses its suffix; kuiToast() still returns it. | | KuiSelectCellComponent | KuiSelectCell | - | Table selection parts are renamed the same way. | | kuiProvideLocale | provideKuiLocale | - | Returns Provider[] and accepts a Signal. | ### Provider defaults Component defaults moved from six injection tokens to one mechanism, KuiDefaults. A nested provider now merges with its parent per property. | Name | Type | Default | Description | | --- | --- | --- | --- | | KUI_BUTTON_OPTIONS, KUI_FIELD_OPTIONS, KUI_SELECT_OPTIONS | provideKuiDefaults({ button, field, select }) | - | The injection tokens are removed. | | KUI_COMBOBOX_OPTIONS, KUI_TOOLTIP_OPTIONS, KUI_TOAST_OPTIONS | provideKuiDefaults({ combobox, tooltip, toast }) | - | The injection tokens are removed. | | kuiProvideButtonOptions, kuiProvideFieldOptions, kuiProvideSelectOptions | provideKuiDefaults | - | Deprecated, forward to provideKuiDefaults, removed in 3.0. | | kuiProvideComboboxOptions, kuiProvideTooltipOptions, provideKuiToastOptions | provideKuiDefaults | - | Deprecated, forward to provideKuiDefaults, removed in 3.0. | | provideKikitaUi({ tooltip }) | provideKikitaUi({ defaults: { tooltip } }) | - | Deprecated. | | KikitaUiDefaults | KuiComponentDefaults | - | Deprecated alias, removed in 3.0. | | KuiButtonOptions as { button, iconButton } | KuiButtonProviderOptions | - | KuiButtonOptions now describes one button. | ### Locale and messages All text the library owns is a typed message with an English default. ### Icons Structural icons are replaceable data, and the Lucide set is read at a pinned version. ### Component behaviour Behaviour that differs from 1.x. Each item names the component, so search this list for the ones you use. ### Packaging and styles Style delivery changed, and field and icon now need the shared stylesheet like every other component. ### Token and style changes Token names are kept with the exceptions below. Colour tokens have their own table on the Theming page. ### Chart behaviour The four charts changed their keyboard model, tooltip data and sizing. ### Verify the upgrade Work through these checks in order after the automatic migration. --- # Structural icons > The small glyphs a component draws for itself, such as the cross on a dialog or the chevron on a select, as replaceable icon data. - Status: available - Route: /foundations/structural-icons - Package: @kikita-labs/ui@2.0.0 ## Content ### Replace a glyph Structural icons are not the icons you pass to kui-icon by name. They never touch the icon registry or the network, they render on the server, and you can replace them for the whole app or for one subtree without changing a template. #### close-icon.ts ```ts import type { KuiIconGlyph } from '@kikita-labs/ui'; export const CIRCLE_X: KuiIconGlyph = { node: [ ['circle', { cx: 12, cy: 12, r: 10 }], ['path', { d: 'm15 9-6 6' }], ['path', { d: 'm9 9 6 6' }], ], }; ``` #### app.config.ts ```ts provideKikitaUi({ defaults: { icons: { close: CIRCLE_X, remove: CIRCLE_X } } }); ``` #### section.providers.ts ```ts providers: [provideKuiDefaults({ icons: { close: CIRCLE_X } })]; ``` ### Precedence A role changes every component without a more specific override; a component slot changes only that component. ### Roles defaults.icons takes one glyph per role. Roles are named for what the icon does, not for its shape: one cross is close on a dialog, remove on a chip and clear in a field. | Name | Type | Default | Description | | --- | --- | --- | --- | | close | role | - | Dialog, Drawer, Media Viewer, Toast and Alert close buttons. | | remove | role | - | Chip remove button (also the chips of a multiple Select) and File Upload remove button. | | clear | role | - | Clear button of Select, Combobox, Date Picker and Time Picker, and the Command Palette search clear. | | pickerChevron | role | - | Options toggle of Select, Combobox, Date Picker, Time Picker and Color Input. | | previous, next | role | - | Previous and next page, month, slide or tab group (Pagination, Calendar, Calendar Range, Carousel, Tabs, Media Viewer). | | first, last | role | - | First and last page buttons of Pagination. | | disclosure | role | - | Expand control of Accordion items and Tree nodes; the rotation stays CSS. | | separator | role | - | Breadcrumb separator. | | check | role | - | Completed Stepper step and finished File Upload item. | | statusInfo, statusSuccess, statusWarning, statusDanger | role | - | Status mark of Alert and Toast, and the warning mark of a non-default Confirm dialog. | | externalLink | role | - | Mark after an external kuiLink. | ### Component slots A component slot beats the role. Slots live in the options interface of the component, so a typo is a type error. | Name | Type | Default | Description | | --- | --- | --- | --- | | dialog, drawer | closeIcon | - | Close button. | | alert, toast | closeIcon | - | Close button. | | chip, fileUpload | removeIcon | - | Remove button. | | select, combobox, datePicker, timePicker | chevronIcon, clearIcon | - | Options toggle and clear button. | | colorInput | chevronIcon | - | Options toggle. | | calendar, calendarRange, carousel, tabs | previousIcon, nextIcon | - | Step controls. | | pagination | firstIcon, previousIcon, nextIcon, lastIcon | - | Step controls. | | accordion, tree | disclosureIcon | - | Expand control. | | breadcrumbs | separatorIcon | - | Separator. | | link | externalIcon | - | Mark after an external link. | ### Glyph data An icon is plain data in the icon-node layout of Lucide, so an icon from the Lucide packages can be used as is. #### glyph.ts ```ts interface KuiIconGlyph { readonly node: readonly (readonly [ tag: string, attributes: Record, ])[]; readonly viewBox?: string; // default '0 0 24 24' } ``` | Name | Type | Default | Description | | --- | --- | --- | --- | | Elements | path, line, polyline, polygon, circle, ellipse, rect | - | Any other element invalidates the glyph. | | Attributes | geometry and paint | - | Geometry (d, cx, cy, r, rx, ry, x, y, x1, y1, x2, y2, width, height, points) and paint (fill, fill-opacity, fill-rule, clip-rule, stroke, stroke-opacity, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-dasharray, stroke-dashoffset, opacity, transform). Everything else is ignored. | | Values | strings and numbers | - | Values containing url(, <, > or javascript: are ignored. | | Line weight | stroke-width, vector-effect | - | Not accepted; the stroke tokens own them. | | Filled shapes | fill and stroke none | - | Set fill and stroke: none on the element, as the built-in play glyph does. | | Invalid override | ignored | - | The next level of the precedence chain is used. In development mode the first use of an invalid glyph logs a warning. | ### Stroke width Two public CSS custom properties control the line of structural icons and of stroke-based kui-icon content. Set them on the root or on any subtree. #### styles.css ```css :root { --kui-icon-stroke-width: 1.5; /* thinner icons everywhere */ } ``` #### icon.html ```html ``` | Name | Type | Default | Description | | --- | --- | --- | --- | | --kui-icon-stroke-width | a number in glyph-grid units | - | Built-in glyphs default to the weight of their call site (between 1.5 and 2.5); content icons keep the weight of their own markup until the token is set. | | --kui-icon-vector-effect | none \| non-scaling-stroke | - | non-scaling-stroke keeps the stroke the same number of pixels at any icon size. The default is none. | ### Accessibility, security and server rendering Structural icons are decorative plain template output. ### Not supported Use a subtree and provideKuiDefaults for per-instance needs. --- # Theming > Theme provider setup and theme customization basics. - Status: available - Route: /foundations/theming - Package: @kikita-labs/ui@2.0.0 ## Content ### Runtime contract The public theming contract is CSS variables. The theme pipeline starts with seed tokens and ends in component-level tokens. #### theme-pipeline.txt ```text seed tokens -> OKLCH palettes -> semantic tokens -> component tokens ``` #### index.html ```html ``` ### Angular provider Use provideKikitaUi() for the default theme and optional root configuration. #### app.config.ts ```ts import { type ApplicationConfig } from '@angular/core'; import { provideKikitaUi } from '@kikita-labs/ui'; export const appConfig: ApplicationConfig = { providers: [provideKikitaUi()], }; ``` #### app.config.ts ```ts provideKikitaUi({ scrollbars: 'styled', }); ``` ### Overriding tokens Where you set a token decides how far it reaches. Components read semantic or component tokens, never palette or seed variables. #### billing.css ```css .billing-panel { --kui-btn-danger-bg: oklch(0.5 0.2 25); --kui-btn-danger-bg-hov: oklch(0.44 0.2 25); } ``` | Name | Type | Default | Description | | --- | --- | --- | --- | | A seed in provideKikitaUi({ theme }) | whole theme | - | Palette, semantic roles and literal component tokens are regenerated for every element. | | A semantic token on any element | element and below | - | --kui-color-danger-fill on an element restyles that element and everything below it; on the root it changes the whole page. | | A component token on any element | element and below | - | --kui-btn-danger-bg restyles that one component part for the element and everything below it. | | A palette step or a type role alias | set globally | - | Not reliable on an element: semantic tokens and --kui-type-* are resolved from them on the root, so set them there. | ### Defaults, layers and density The default theme works from CSS alone, and your own variables always win over the generated ones. ### Contrast profiles WCAG 1.4.11 asks for 3:1 on the boundary of a control only where that boundary identifies it. A contrast profile re-points the neutral roles that draw it. #### app.config.ts ```ts import { DEFAULT_KUI_THEME, provideKuiTheme } from '@kikita-labs/ui'; provideKuiTheme({ ...DEFAULT_KUI_THEME, contrast: 'soft' }); ``` #### contrast.ts ```ts document.documentElement.setAttribute('data-kui-contrast', 'strict'); ``` | Name | Type | Default | Description | | --- | --- | --- | --- | | KuiThemeContrast | 'strict' \| 'soft' | - | Contrast profile name and the value of the data-kui-contrast attribute. | | DEFAULT_KUI_THEME_CONTRAST | KuiThemeContrast | - | Profile a theme uses when the contrast option is not set. | | KuiGeneratedContrast | { name; media?; light; dark } | - | Variables one profile changes relative to the default, emitted as [data-kui-contrast] rules and an optional media query. | ### Shared behaviour tokens A few tokens change one behaviour for the whole library. Set them on the root or on any subtree. #### styles.css ```css :root { --kui-opacity-disabled: 0.4; /* every disabled control, option and cell */ --kui-focus-ring-width: 2px; /* standalone controls; parts use --kui-focus-ring-width-sm */ --kui-duration-base: 120ms; /* enter animations and control state changes */ --kui-color-scrim: oklch(0 0 0 / 0.65); /* behind Dialog, Drawer and Command Palette */ } ``` ### Migrating to the colour roles The 2.x colour system keeps every public token name, so an existing theme keeps working. Move to the new roles when you next touch a custom component. | Name | Type | Default | Description | | --- | --- | --- | --- | | --kui-color-on-fill on a solid fill | --kui-color--on-fill | - | White or near-black, whichever reaches 4.5:1 on that fill. | | --kui-color--fill as text or an icon colour | --kui-color--text | - | 4.5:1 on every surface. | | --kui-color--fill as a border, outline, bar or mark | --kui-color--indicator | - | 3:1 on every light surface. | | --kui-color-border on an interactive control | --kui-color-border-control | - | A 3:1 boundary at rest; the hover value is --kui-color-border-control-hover. | | --kui-color-primary-focus-ring or a box-shadow ring | a 2px outline in --kui-color-focus | - | Visible in forced-colors mode and 3:1. | | --kui-color-text-disabled on placeholders | --kui-color-text-placeholder | - | 4.5:1; disabled text stays for disabled controls. | ### Custom seeds Seed values are the stable way to customize generated palettes and shared scales. #### app.config.ts ```ts provideKikitaUi({ theme: { seeds: { color: { primary: 'oklch(0.52 0.25 285)', neutral: 'oklch(0.5 0.01 80)', success: 'oklch(0.54 0.16 145)', warning: 'oklch(0.74 0.16 75)', danger: 'oklch(0.54 0.22 25)', info: 'oklch(0.58 0.16 215)', }, radius: 8, density: 'regular', }, }, }); ``` ### Theme utilities These public functions can generate CSS variables for docs, visual tests, or non-Angular tooling. | Name | Type | Default | Description | | --- | --- | --- | --- | | createKuiTheme | (options?: KuiThemeOptions) => KuiGeneratedTheme | - | Generates a theme object from seed options. | | createKuiThemeVariableMap | (theme, mode?) => KuiCssVariableMap | - | Flattens a generated theme into CSS variable names and values. | | createKuiThemeCssText | (theme, selector, mode?) => string | - | Serializes variables for a selector. | | createKuiThemeStyleSheet | (theme) => string | - | Serializes light and dark theme CSS for tooling or docs output. | --- # Tokens > Design token categories exposed through Kikita CSS variables. - Status: available - Route: /foundations/tokens - Package: @kikita-labs/ui@2.0.0 ## Content ### Token layers Public CSS variables use the --kui-* prefix and flow through predictable layers. #### token-layers.txt ```text seed -> palette -> semantic -> component ``` #### palette.css ```css --kui-primary-1 ... --kui-primary-12 --kui-neutral-1 ... --kui-neutral-12 --kui-success-1 ... --kui-success-12 --kui-warning-1 ... --kui-warning-12 --kui-danger-1 ... --kui-danger-12 --kui-info-1 ... --kui-info-12 ``` #### semantic.css ```css --kui-color-bg --kui-color-surface --kui-color-border --kui-color-text --kui-color-primary-fill --kui-color-focus ``` ### Color seeds Required color seeds generate the palette and semantic token layers. | Name | Type | Default | Description | | --- | --- | --- | --- | | --kui-seed-primary | oklch(0.52 0.25 285) | - | Brand and action color. | | --kui-seed-neutral | oklch(0.5 0.01 80) | - | Surface, border, and text base. | | --kui-seed-success | oklch(0.54 0.16 145) | - | Positive state. | | --kui-seed-warning | oklch(0.56 0.15 65) | - | Caution state. | | --kui-seed-danger | oklch(0.54 0.22 25) | - | Error or destructive state. | | --kui-seed-info | oklch(0.53 0.14 215) | - | Informational state. | ### Fill, indicator and text roles Every accent (primary, success, warning, danger, info) has these roles. A fill is a background only: text and icons read -text, and borders and marks read -indicator. | Name | Type | Default | Description | | --- | --- | --- | --- | | --kui-color--fill | solid background | - | The seed in both modes, slightly corrected when no text colour reaches 4.5:1 on it. | | --kui-color--on-fill | text and icons on the fill | - | White or near-black, whichever reads better (at least 4.5:1). Generated. | | --kui-color--fill-away | away colour | - | Black when the on-fill is light, white when it is dark. Generated. | | --kui-color--fill-hover, -fill-active | hover and pressed fill | - | The fill mixed with the away colour (light 18% and 36%, dark 28% and 8% toward black), so contrast never drops. | | --kui-color--indicator | border, outline, mark | - | The fill when it reaches 3:1 on every surface of the mode, otherwise step 7 (light) or step 5 (dark). Generated. | | --kui-color--text | text and icon on a surface | - | At least 4.5:1: step 8 in light mode and step 4 in dark mode. | | --kui-color--soft-bg, -soft-text, -soft-border | tinted surface | - | Tinted background with its text and border. | | --kui-color-border-control, -hover | control boundary | - | The boundary of a control that the border alone identifies, such as an input or a checkbox: at least 3:1 in the strict profile, quieter in soft. --kui-color-border and --kui-color-border-strong stay for dividers and cards. | | --kui-color-text-placeholder | placeholder text | - | 4.5:1 on every surface. --kui-color-text-disabled is only for disabled controls. | | --kui-color-state-hover, -state-active | translucent text layers | - | 8% and 14% of the text colour for the hover and pressed fill of list items, menu items, calendar days, tabs and ghost buttons, so a hover never disappears on any surface. | | --kui-color-focus | 2px focus outline colour | - | Defaults to the primary indicator. | | --kui-color-scrim, -scrim-strong, -on-scrim | overlay layers | - | Black at 50% behind Dialog, Drawer and Command Palette, black at 92% behind the fullscreen Media Viewer, and white text over a scrim. | ### Common scales Radius and spacing scales are shared by component tokens and docs layout primitives. #### radius.css ```css --kui-radius-none: 0; --kui-radius-xs: 4px; --kui-radius-sm: 6px; --kui-radius-md: 8px; --kui-radius-lg: 10px; --kui-radius-xl: 14px; --kui-radius-full: 9999px; ``` #### spacing.css ```css --kui-space-1: 4px; --kui-space-2: 8px; --kui-space-3: 12px; --kui-space-4: 16px; --kui-space-5: 20px; --kui-space-6: 24px; --kui-space-8: 32px; --kui-space-12: 48px; --kui-space-16: 64px; ``` ### Shared tokens A few global tokens are the single knob for a behaviour the whole library shares. A component hook is read first and defaults to the global token in the CSS of the component, so a value set on any ancestor wins. #### styles.css ```css :root { --kui-opacity-disabled: 0.4; --kui-focus-ring-width: 2px; --kui-duration-base: 120ms; } ``` | Name | Type | Default | Description | | --- | --- | --- | --- | | --kui-duration-fast | 100ms | - | Hover and colour changes. | | --kui-duration-quick | 120ms | - | Exit animations. | | --kui-duration-base | 160ms | - | Enter animations and control state changes. | | --kui-duration-normal | 200ms | - | Moving indicators, backdrops and progress. | | --kui-ease, --kui-ease-exit | cubic-bezier(0.16, 1, 0.3, 1) and cubic-bezier(0.4, 0, 1, 1) | - | Entering and moving, and leaving (shorter and accelerating, never lingering). | | --kui-focus-ring-width | 3px | - | Standalone controls: Button, Icon Button, Checkbox, Radio, Switch, Tab, Segmented, Card, Chip, Avatar, Table sort and selection. | | --kui-focus-ring-width-sm | 2px | - | Parts inside a composite: links, calendar and picker cells, rows, options, field actions, chip remove. | | --kui-focus-ring-offset, --kui-focus-ring-offset-inset | 2px and -2px | - | Gap between the element and an outer ring, and the ring drawn inside rows, cells and options in a scroll container. | | --kui-opacity-disabled | 0.5 | - | Dims every disabled control, row, cell and option. The hooks --kui-btn-disabled-opacity, --kui-chip-disabled-opacity and --kui-field-action-disabled-opacity override it for one component. | | --kui-border-width-hairline, -thick, -heavy | 1px, 1.5px, 2px | - | Borders and dividers, the today marker and thick separators, and indicator bars, step circles, dashed dropzone borders and spinner strokes. | ### Icon tokens Two public tokens control the line of structural icons and of stroke-based kui-icon content. Set them on the root or on any subtree. | Name | Type | Default | Description | | --- | --- | --- | --- | | --kui-icon-stroke-width | a number in glyph-grid units | - | Structural icons default to the weight of their call site (1.5 to 2.5); kui-icon keeps the weight of the icon itself. | | --kui-icon-vector-effect | none \| non-scaling-stroke | - | none lets the stroke scale with the icon; non-scaling-stroke keeps it the same number of pixels. | ### Defaults that moved into CSS These tokens are still valid hooks: set one on an element or an ancestor to override a single component. They are no longer defined on the root, because a literal copy of a global value there would shadow a change to the global token. | Name | Type | Default | Description | | --- | --- | --- | --- | | --kui-btn-focus-ring-w, --kui-checkbox-focus-ring-w, --kui-radio-focus-ring-w, --kui-switch-focus-ring-w, --kui-avatar-focus-ring-w, --kui-chip-focus-ring-width | --kui-focus-ring-width | - | Focus ring width hooks. | | --kui-chip-remove-focus-ring-width, --kui-field-action-focus-ring-width | --kui-focus-ring-width-sm | - | Focus ring width hooks of parts inside a composite. | | --kui-btn-focus-ring-off, --kui-checkbox-focus-ring-off, --kui-radio-focus-ring-off, --kui-switch-focus-ring-off, --kui-avatar-focus-ring-off | --kui-focus-ring-offset | - | Focus ring offset hooks. | | --kui-btn-disabled-opacity, --kui-chip-disabled-opacity, --kui-field-action-disabled-opacity | --kui-opacity-disabled | - | Disabled opacity hooks; the chip one was 0.4. | | --kui-dialog-backdrop, --kui-drawer-backdrop-bg, --kui-command-backdrop-bg | --kui-color-scrim | - | Backdrop colour hooks. | | --kui-btn-font-weight, --kui-tab-font-weight, --kui-seg-font-weight, --kui-menu-item-font-weight | --kui-font-weight-medium | - | Medium weight hooks. | | --kui-tab-font-weight-active, --kui-seg-font-weight-active, --kui-badge-font-weight, --kui-avatar-font-weight, --kui-chip-font-weight, --kui-field-label-weight, --kui-menu-group-header-font-weight, --kui-drawer-title-weight, --kui-breadcrumb-font-weight-current, --kui-empty-title-weight | --kui-font-weight-semibold | - | Semibold weight hooks; the empty state title was 650. | | --kui-chip-avatar-font-weight | --kui-font-weight-bold | - | Bold weight hook. | ### Removed in 2.0 These generated tokens are gone and nothing in Kikita UI reads them any more. Set the replacement. 322 component tokens that only mapped a role onto another token are no longer generated either; each component states its default in its own CSS. | Name | Type | Default | Description | | --- | --- | --- | --- | | --kui-btn-bg | --kui-btn-solid-bg | - | Button background. | | --kui-btn-bg-hover | --kui-btn-solid-bg-hov | - | Button hover background. | | --kui-btn-bg-active | --kui-btn-solid-bg-act | - | Button pressed background. | | --kui-btn-color | --kui-btn-solid-fg | - | Button text colour. | | --kui-btn-secondary-bg | --kui-btn-soft-bg | - | Soft button background. | | --kui-btn-secondary-bg-hover | --kui-btn-soft-bg-hov | - | Soft button hover background. | | --kui-btn-secondary-color | --kui-btn-soft-fg | - | Soft button text colour. | | --kui-btn-outline-bg-hover | --kui-btn-outline-bg-hov | - | Outline button hover background. | | --kui-btn-ghost-bg-hover | --kui-btn-ghost-bg-hov | - | Ghost button hover background. | | --kui-btn-focus-ring-width | --kui-btn-focus-ring-w | - | Button focus ring width. | | --kui-btn-focus-ring-offset | --kui-btn-focus-ring-off | - | Button focus ring offset. | | --kui-btn-focus-ring | outline from --kui-btn-focus-ring-w and -color | - | Button focus ring shadow. | | --kui-select-bg | --kui-input-bg | - | Select background. | | --kui-select-border | --kui-input-border | - | Select border. | | --kui-select-border-hover | --kui-input-border-hover | - | Select hover border. | | --kui-select-border-focus | --kui-input-border-focus | - | Select focus border. | | --kui-select-border-error | --kui-input-border-error | - | Select error border. | | --kui-select-radius | --kui-input-radius | - | Select corner radius. | --- # Typography > Semantic type-role classes, text tones, and the kuiText directive. - Status: available - Route: /foundations/typography - Package: @kikita-labs/ui@2.0.0 ## Content ### Import The CSS classes ship through the main stylesheet. Import the directive only when templates should bind variant or tone. #### angular.json ```json "styles": [ "node_modules/@kikita-labs/ui/styles/kikita-ui.css", "src/styles.scss" ] ``` #### typography-example.ts ```ts import { KuiText } from '@kikita-labs/ui'; ``` ### Usage Decorate native text elements. Typography classes and kuiText change presentation without replacing semantic HTML. #### typography-example.html ```html

Project profile

Workspace settings

Manage members, billing, and integrations.

Last updated 2 minutes ago

Slug is already used by another workspace.

Current slug: workspace.slug

``` #### typography-directive-example.html ```html

Project profile

Workspace settings

Manage members, billing, and integrations.

Last updated 2 minutes ago

Slug is already used by another workspace.

Current slug: workspace.slug

``` ### Type roles Choose the role that matches the text's purpose, then keep the native element semantic. Each role resets margin to 0; control vertical spacing explicitly with gap or layout primitives instead of relying on the host tag's default margin. | Name | Type | Default | Description | | --- | --- | --- | --- | | .kui-display | h1 | - | Rare docs or specification page title. | | .kui-heading-lg | h1 \| h2 | - | Main page or top-level section title. | | .kui-heading-md | h2 \| h3 | - | Panel, dialog, or drawer title. | | .kui-heading-sm | h3 \| h4 | - | Compact section, card, or table group title. | | .kui-title | h4 \| h5 \| span | - | Small emphasized UI title. | | .kui-body-lg | p | - | Relaxed paragraph text where space allows. | | .kui-body | p | - | Default product UI body text. | | .kui-body-sm | p \| span | - | Dense descriptions and table adjunct text. | | .kui-caption | small \| span | - | Hints, metadata, helper text, and timestamps. | | .kui-overline | span | - | Optional uppercase group label. Use sparingly. | | .kui-code | code \| span | - | Inline monospace code and token text. | ### Tone utilities Tone utilities only set color. Pair status color with clear visible text when the state matters. | Name | Type | Default | Description | | --- | --- | --- | --- | | .kui-text-default | default | - | Normal foreground text color. | | .kui-text-muted | muted | - | Secondary copy, descriptions, and metadata. | | .kui-text-disabled | disabled | - | Unavailable copy paired with a disabled control or state. | | .kui-text-primary | primary | - | Brand or primary action emphasis. | | .kui-text-success | success | - | Positive status text paired with visible status copy. | | .kui-text-warning | warning | - | Caution status text paired with visible status copy. | | .kui-text-danger | danger | - | Error or destructive status text paired with visible status copy. | ### Directive API The kuiText directive is convenience sugar over the same public class contract. | Name | Type | Default | Description | | --- | --- | --- | --- | | kuiText | attribute directive | - | Applies a semantic type role and text tone to a native text element. | | variant | KuiTextVariant \| undefined | undefined | Semantic typography role applied by the directive. Falls back to defaults.typography.variant, then body. | | tone | KuiTextTone \| undefined | undefined | Semantic text color tone applied by the directive. Falls back to defaults.typography.tone, then default. | | KuiTextVariant | 'display' \| 'heading-lg' \| 'heading-md' \| 'heading-sm' \| 'title' \| 'body-lg' \| 'body' \| 'body-sm' \| 'caption' \| 'overline' \| 'code' | - | Public type for the directive variant input. | | KuiTextTone | 'default' \| 'muted' \| 'disabled' \| 'primary' \| 'success' \| 'warning' \| 'danger' | - | Public type for the directive tone input. | ### Tokens Each role exposes generated size, line-height, and weight tokens for theme-aware text scales. #### typography-tokens.css ```css --kui-type-heading-md-size --kui-type-heading-md-line-height --kui-type-heading-md-weight ``` #### font-weight-tokens.css ```css --kui-font-weight-regular --kui-font-weight-medium --kui-font-weight-semibold --kui-font-weight-bold ``` ### Accessibility Typography should strengthen native semantics rather than replace them. --- # Accordion > Disclosure component for grouped expandable content. - Status: available - Route: /components/accordion - Package: @kikita-labs/ui@2.0.0 - Import: KuiAccordion from @kikita-labs/ui - Source docs: https://github.com/kikita-labs/kikita-ui/blob/v2.0.0/docs/accordion.md ## Install ```bash pnpm add @kikita-labs/ui ng add @kikita-labs/ui ``` ## Usage ```html Configure display and behavior options. Account security parameters. ``` ## Examples Rendered at /components/accordion: ### appearance-accordion-example #### appearance-accordion-example.html ```html

bordered

Configure display and behavior options. Account security parameters.

ghost

Configure display and behavior options. Account security parameters.
``` #### appearance-accordion-example.ts ```ts import { Component } from '@angular/core'; import { KuiAccordion, KuiAccordionItem } from '@kikita-labs/ui'; @Component({ selector: 'app-appearance-accordion-example', imports: [KuiAccordion, KuiAccordionItem], templateUrl: './appearance-accordion-example.html', styleUrl: './appearance-accordion-example.scss', }) export class AppearanceAccordionExample {} ``` #### appearance-accordion-example.scss ```scss .appearance-accordion-example { display: flex; gap: var(--kui-space-6, 24px); flex-wrap: wrap; } .appearance-accordion-example__col { flex: 1; min-width: 220px; } .appearance-accordion-example__label { margin: 0 0 var(--kui-space-2, 8px); color: var(--kui-color-text-secondary); font-size: var(--kui-text-xs-size, 11px); text-transform: uppercase; letter-spacing: 0.5px; } ``` ### basic-accordion-example #### basic-accordion-example.html ```html Configure display and behavior options. Manage push notifications and email digests. Account security parameters. ``` #### basic-accordion-example.ts ```ts import { Component } from '@angular/core'; import { KuiAccordion, KuiAccordionItem } from '@kikita-labs/ui'; @Component({ selector: 'app-basic-accordion-example', imports: [KuiAccordion, KuiAccordionItem], templateUrl: './basic-accordion-example.html', styleUrl: './basic-accordion-example.scss', }) export class BasicAccordionExample {} ``` #### basic-accordion-example.scss ```scss :host { display: block; } ``` ### icon-accordion-example #### icon-accordion-example.html ```html Settings content with a leading icon slot. This section is disabled and cannot be toggled. ``` #### icon-accordion-example.ts ```ts import { Component } from '@angular/core'; import { KuiAccordion, KuiAccordionIcon, KuiAccordionItem, KuiIcon } from '@kikita-labs/ui'; @Component({ selector: 'app-icon-accordion-example', imports: [KuiAccordion, KuiAccordionIcon, KuiAccordionItem, KuiIcon], templateUrl: './icon-accordion-example.html', styleUrl: './icon-accordion-example.scss', }) export class IconAccordionExample {} ``` #### icon-accordion-example.scss ```scss :host { display: block; } ``` ### multi-accordion-example #### multi-accordion-example.html ```html Profile content. Billing content. Team content. ``` #### multi-accordion-example.ts ```ts import { Component, signal } from '@angular/core'; import { KuiAccordion, KuiAccordionItem } from '@kikita-labs/ui'; @Component({ selector: 'app-multi-accordion-example', imports: [KuiAccordion, KuiAccordionItem], templateUrl: './multi-accordion-example.html', styleUrl: './multi-accordion-example.scss', }) export class MultiAccordionExample { protected readonly expanded = signal(['profile']); } ``` #### multi-accordion-example.scss ```scss :host { display: block; } ``` ## API | Name | Type | Default | Description | | --- | --- | --- | --- | | mode | 'exclusive' \| 'multi' | 'exclusive' | Toggle mode. exclusive keeps a single section open at a time; multi allows any number of sections open simultaneously. A plain input, not two-way bindable. Falls back to defaults.accordion.mode. | | appearance | 'default' \| 'bordered' \| 'ghost' | 'default' | Container and divider treatment: default uses bottom borders between items, bordered wraps each item in its own bordered block, ghost has no borders. A plain input; falls back to defaults.accordion.appearance. | | size | 'xs' \| 'sm' \| 'md' \| 'lg' | 'md' | Trigger height and text size. A plain input; falls back to defaults.accordion.size, then the global defaults.size. | | expandedItems | string[] | [] | IDs of currently expanded items. The only mutable state of the accordion and the only two-way bindable one: use [(expandedItems)] or listen to (expandedItemsChange). | | header | string | '' | kui-accordion-item: trigger label text. | | id | string | auto-generated | kui-accordion-item: stable ID used for state tracking and ARIA wiring. The generated default is numbered per Angular application, so server-rendered ids match the browser. | | disabled | boolean | false | kui-accordion-item: removes the trigger from tab order and prevents toggling the section. | | kuiAccordionIcon | - | - | Marker directive for an ng-template projected into a kui-accordion-item trigger, before the label text. | | provideKuiDefaults({ accordion }) | (defaults: KuiComponentDefaults) => Provider | - | Sets size, mode, appearance and disclosureIcon for a subtree; provideKikitaUi({ defaults }) does it for the whole application. | | KuiAccordionOptions | interface | - | Shape of defaults.accordion. disclosureIcon takes precedence over defaults.icons.disclosure. | | KuiAccordionMode / KuiAccordionAppearance | type aliases | - | Public unions of the mode and appearance values. | ## Accessibility Each item renders a native button trigger with `aria-expanded`, `aria-controls`, and a region body linked through `aria-labelledby`. ## Playground Available at /components/accordion/playground. --- # Alert > Inline notification embedded in the page content flow. - Status: available - Route: /components/alert - Package: @kikita-labs/ui@2.0.0 - Import: KuiAlert from @kikita-labs/ui - Source docs: https://github.com/kikita-labs/kikita-ui/blob/v2.0.0/docs/alert.md ## Install ```bash pnpm add @kikita-labs/ui ng add @kikita-labs/ui ``` ## Usage ```html ``` `kui-alert` is a controlled component: it never removes itself from the DOM. `(closed)` only notifies the consumer when the close button is clicked, the same pattern `[kuiChip]`'s `(removed)` uses -- conditionally render the alert (e.g. `@if (!dismissed())`) to actually hide it. ```ts protected readonly dismissed = signal(false); ``` ```html @if (!dismissed()) { } ``` At least one of `title`/`message`/a projected `[kuiAlertMessage]` should be set. ## Examples Rendered at /components/alert: ### basic-alert-example #### basic-alert-example.html ```html
``` #### basic-alert-example.ts ```ts import { Component } from '@angular/core'; import { KuiAlert } from '@kikita-labs/ui'; @Component({ selector: 'app-basic-alert-example', imports: [KuiAlert], templateUrl: './basic-alert-example.html', styleUrl: './basic-alert-example.scss', }) export class BasicAlertExample {} ``` #### basic-alert-example.scss ```scss .alert-example { display: grid; gap: var(--kui-space-3); } ``` ### alert-shape-example #### alert-shape-example.html ```html
``` #### alert-shape-example.ts ```ts import { Component } from '@angular/core'; import { KuiAlert } from '@kikita-labs/ui'; @Component({ selector: 'app-alert-shape-example', imports: [KuiAlert], templateUrl: './alert-shape-example.html', styleUrl: './alert-shape-example.scss', }) export class AlertShapeExample {} ``` #### alert-shape-example.scss ```scss .alert-example { display: grid; gap: var(--kui-space-3); } ``` ### alert-action-example #### alert-action-example.html ```html
@if (!dismissed()) { } @else { }
``` #### alert-action-example.ts ```ts import { Component, signal } from '@angular/core'; import { KuiAlert, KuiButton } from '@kikita-labs/ui'; @Component({ selector: 'app-alert-action-example', imports: [KuiAlert, KuiButton], templateUrl: './alert-action-example.html', styleUrl: './alert-action-example.scss', }) export class AlertActionExample { protected readonly dismissed = signal(false); protected readonly renewals = signal(0); protected renew(): void { this.renewals.update((count) => count + 1); } protected restore(): void { this.dismissed.set(false); } } ``` #### alert-action-example.scss ```scss .alert-example { display: grid; gap: var(--kui-space-3); justify-items: start; } .alert-example kui-alert { inline-size: 100%; } ``` ### alert-custom-content-example #### alert-custom-content-example.html ```html Upload failed retrying

Check your connection and try again.

``` #### alert-custom-content-example.ts ```ts import { Component } from '@angular/core'; import { KuiAlert, KuiAlertActions, KuiAlertIcon, KuiAlertMessage, KuiAlertTitle, KuiBadge, KuiButton, KuiIcon, } from '@kikita-labs/ui'; @Component({ selector: 'app-alert-custom-content-example', imports: [ KuiAlert, KuiAlertActions, KuiAlertIcon, KuiAlertMessage, KuiAlertTitle, KuiBadge, KuiButton, KuiIcon, ], templateUrl: './alert-custom-content-example.html', styleUrl: './alert-custom-content-example.scss', }) export class AlertCustomContentExample {} ``` #### alert-custom-content-example.scss ```scss :host { display: block; } ``` ### alert-banner-example #### alert-banner-example.html ```html ``` #### alert-banner-example.ts ```ts import { Component } from '@angular/core'; import { KuiAlert } from '@kikita-labs/ui'; @Component({ selector: 'app-alert-banner-example', imports: [KuiAlert], templateUrl: './alert-banner-example.html', styleUrl: './alert-banner-example.scss', }) export class AlertBannerExample {} ``` #### alert-banner-example.scss ```scss :host { display: block; } ``` ## API | Name | Type | Default | Description | | --- | --- | --- | --- | | appearance | 'neutral' \| 'info' \| 'success' \| 'warning' \| 'danger' | 'neutral' | Semantic type. Same five values as the toast. neutral never shows the built-in icon; danger is announced assertively, every other value politely. | | shape | 'soft' \| 'outline' \| 'solid' \| undefined | undefined | Visual weight, using the button shape vocabulary. Falls back to defaults.alert.shape, then soft. | | size | 'sm' \| 'md' \| undefined | undefined | Padding and gap density. Falls back to defaults.alert.size, then the root defaults.size (sm or md only), then md. | | banner | boolean | false | Stretches the alert to the full width of its container and removes the corner radius. | | title | string \| undefined | undefined | Optional single-line heading. Ignored when [kuiAlertTitle] is projected. Set at least one of title, message or [kuiAlertMessage]. | | message | string \| undefined | undefined | Optional supporting text below the title. Ignored when [kuiAlertMessage] is projected. | | showIcon | boolean \| undefined | undefined | Shows the built-in appearance icon (defaults.alert.showIcon, then true). neutral never shows one. Ignored when [kuiAlertIcon] is projected, which always renders. | | closable | boolean \| undefined | undefined | Shows the close button and enables (closed). Falls back to defaults.alert.closable, then true. | | closeLabel | string \| undefined | undefined | Accessible label for the close button. Falls back to the alert.close message (Close notification). | | actionLabel | string \| undefined | undefined | Label for the inline ghost action button. Ignored when [kuiAlertActions] is projected. | | (action) | void | - | Emits when the action button is clicked. Not emitted for a projected [kuiAlertActions]. | | (closed) | void | - | Emits when the close button is clicked. The alert never removes itself; hide it with @if. | | [kuiAlertTitle] | content slot | - | Replaces the plain title string with arbitrary markup. | | [kuiAlertIcon] | content slot | - | Replaces the built-in severity icon. A projected icon always renders, even for neutral, and inherits --kui-alert-icon-color. | | [kuiAlertMessage] | content slot | - | Replaces the plain message string with arbitrary markup (links, lists). The title still renders alongside it. | | [kuiAlertActions] | content slot | - | Replaces the single ghost action button with custom controls. kuiButton inside it picks up the appearance-tinted ghost colour. | | KuiAlertOptions | interface | - | Shape of defaults.alert: size, shape, showIcon, closable and closeIcon. | ## Accessibility - `role="alert"` + `aria-live="assertive"` + `aria-atomic="true"` only for `appearance="danger"` (genuinely urgent). Every other appearance uses `role="status"` + `aria-live="polite"` + `aria-atomic="true"` -- the same split `kuiToast()` uses, so a screen reader is not interrupted by routine info/success/warning alerts. - `kui-alert` itself is not in the tab order; only its real controls (action, close) are focusable. - The close button is a `kuiIconButton` with a required accessible name (`closeLabel`, default `"Close notification"`), never an unlabeled icon. - Severity is never color-only: `info`/`success`/`warning`/`danger` always pair an icon with text; `neutral` has no icon because it carries no severity meaning. - `Escape` does not close `kui-alert` -- it is a static region, not an overlay. ## Playground Available at /components/alert/playground. --- # Avatar > User or entity identity with image, initials, and status. - Status: available - Route: /components/avatar - Package: @kikita-labs/ui@2.0.0 - Import: KuiAvatar from @kikita-labs/ui - Source docs: https://github.com/kikita-labs/kikita-ui/blob/v2.0.0/docs/avatar.md ## Install ```bash pnpm add @kikita-labs/ui ng add @kikita-labs/ui ``` ## Usage ```html ``` Image avatars render a native ``. If the image fails to load, the component falls back to initials generated from `name`, then to the icon fallback when no initials are available. ## Examples Rendered at /components/avatar: ### avatar-button-example #### avatar-button-example.html ```html
``` #### avatar-button-example.ts ```ts import { Component } from '@angular/core'; import { KuiAvatar } from '@kikita-labs/ui'; @Component({ selector: 'app-avatar-button-example', imports: [KuiAvatar], templateUrl: './avatar-button-example.html', styleUrl: './avatar-button-example.scss', }) export class AvatarButtonExample {} ``` #### avatar-button-example.scss ```scss .avatar-button-example { display: flex; align-items: center; justify-content: center; } ``` ### avatar-group-example #### avatar-group-example.html ```html
``` #### avatar-group-example.ts ```ts import { Component } from '@angular/core'; import { KuiAvatarGroup, type KuiAvatarItem } from '@kikita-labs/ui'; const MEMBERS: readonly KuiAvatarItem[] = [ { src: 'https://i.pravatar.cc/64?img=12', name: 'Nikita Repin', status: 'online' }, { name: 'Anya Murashova', status: 'away' }, { name: 'Timur Ognev' }, { name: 'Vera Saltykova' }, { name: 'Ilya Denisov' }, ]; @Component({ selector: 'app-avatar-group-example', imports: [KuiAvatarGroup], templateUrl: './avatar-group-example.html', styleUrl: './avatar-group-example.scss', }) export class AvatarGroupExample { protected readonly members = MEMBERS; } ``` #### avatar-group-example.scss ```scss .avatar-group-example { display: flex; align-items: center; justify-content: center; } ``` ### avatar-sizes-shapes-example #### avatar-sizes-shapes-example.html ```html
``` #### avatar-sizes-shapes-example.ts ```ts import { Component } from '@angular/core'; import { KuiAvatar } from '@kikita-labs/ui'; @Component({ selector: 'app-avatar-sizes-shapes-example', imports: [KuiAvatar], templateUrl: './avatar-sizes-shapes-example.html', styleUrl: './avatar-sizes-shapes-example.scss', }) export class AvatarSizesShapesExample {} ``` #### avatar-sizes-shapes-example.scss ```scss .avatar-sizes-shapes-example { display: flex; flex-direction: column; gap: var(--kui-space-4, 16px); align-items: center; } .avatar-sizes-shapes-example__row { display: flex; flex-wrap: wrap; gap: var(--kui-space-3, 12px); align-items: center; justify-content: center; } ``` ### avatar-status-example #### avatar-status-example.html ```html
``` #### avatar-status-example.ts ```ts import { Component } from '@angular/core'; import { KuiAvatar } from '@kikita-labs/ui'; @Component({ selector: 'app-avatar-status-example', imports: [KuiAvatar], templateUrl: './avatar-status-example.html', styleUrl: './avatar-status-example.scss', }) export class AvatarStatusExample {} ``` #### avatar-status-example.scss ```scss .avatar-status-example { display: flex; flex-wrap: wrap; gap: var(--kui-space-3, 12px); align-items: center; justify-content: center; } ``` ### basic-avatar-example #### basic-avatar-example.html ```html
``` #### basic-avatar-example.ts ```ts import { Component } from '@angular/core'; import { KuiAvatar } from '@kikita-labs/ui'; @Component({ selector: 'app-basic-avatar-example', imports: [KuiAvatar], templateUrl: './basic-avatar-example.html', styleUrl: './basic-avatar-example.scss', }) export class BasicAvatarExample {} ``` #### basic-avatar-example.scss ```scss .basic-avatar-example { display: flex; flex-wrap: wrap; gap: var(--kui-space-3, 12px); align-items: center; justify-content: center; } ``` ## API | Name | Type | Default | Description | | --- | --- | --- | --- | | src | string \| undefined | undefined | Image URL. Falls back to initials, then the icon fallback, on load error. | | name | string \| undefined | undefined | Used to derive initials, the palette hash, and the accessible label. | | initials | string \| undefined | auto | Explicit one or two character initials, overriding the value derived from name. | | alt | string \| undefined | name | Image alt text and accessible label override. | | size | 'xs' \| 'sm' \| 'md' \| 'lg' \| 'xl' \| '2xl' | 'md' | Fixed avatar size. Falls back to defaults.avatar.size, then the global defaults.size. | | shape | 'circle' \| 'square' | 'circle' | circle is intended for people; square is intended for entities such as bots, teams, or projects. Falls back to defaults.avatar.shape. | | status | 'online' \| 'away' \| 'busy' \| 'offline' \| undefined | undefined | Optional presence indicator. Appended to the accessible label; the dot itself is decorative. | | paletteIndex | number \| undefined | auto | Palette slot from 1 to 7 used for the fallback background and text color. A static numeric attribute is coerced and finite values clamp to 1-7. | | loading | boolean | false | Renders the avatar using the internal [kuiSkeleton] loading treatment and hides avatar content. | | kui-avatar-group avatars | readonly KuiAvatarItem[] | [] | Items rendered by the group. Each item accepts the same fields as kui-avatar. | | kui-avatar-group max | number | 4 | Maximum visible avatars before the group collapses the rest into a +N overflow avatar. Falls back to defaults.avatarGroup.max; a static numeric attribute is coerced, and an invalid or less-than-one value resolves to 1. | | kui-avatar-group size | KuiAvatarSize | 'md' | Size applied to every avatar in the group, including the overflow avatar. Falls back to defaults.avatarGroup.size, then the global defaults.size. | | kui-avatar-group shape | KuiAvatarShape | 'circle' | Shape applied to every avatar in the group, including the overflow avatar. Falls back to defaults.avatarGroup.shape. | | kui-avatar-group label | string \| undefined | 'Avatar group' | Accessible label for the group container. Undefined when omitted: the rendered text comes from the avatarGroup.label message. | | .kui-avatar-action | CSS class | - | Applied to an external native button wrapping a kui-avatar to make it interactive. kui-avatar itself must not be made clickable. | | KuiAvatarItem | interface | - | Item of kui-avatar-group avatars: the same fields as kui-avatar (src, name, initials, alt, status, paletteIndex). | | KuiAvatarOptions / KuiAvatarGroupOptions | interfaces | - | Shapes of defaults.avatar (size, shape) and defaults.avatarGroup (size, shape, max). | | KuiAvatarMessages / KuiAvatarGroupMessages | interfaces | - | Typed messages of the avatar (fallback name, status words, name with status) and of the group (label, overflow text). | ## Accessibility - Image avatars render a native `` with `alt` derived from `alt`, then `name`. - Initials and icon fallback avatars expose `role="img"` and `aria-label`. - Status is appended to the accessible label, for example `Nikita Repin, online`. - The status dot is decorative. - Interactive avatars must use a native `
  • Headphones
  • Electronics Audio ``` #### breadcrumbs-collapse-example.ts ```ts import { Component } from '@angular/core'; import { KuiBreadcrumbItem, KuiBreadcrumbs, KuiBreadcrumbSeparator, KuiMenu, KuiMenuFor, KuiMenuItem, } from '@kikita-labs/ui'; @Component({ selector: 'app-breadcrumbs-collapse-example', imports: [ KuiBreadcrumbItem, KuiBreadcrumbSeparator, KuiBreadcrumbs, KuiMenu, KuiMenuFor, KuiMenuItem, ], templateUrl: './breadcrumbs-collapse-example.html', styleUrl: './breadcrumbs-collapse-example.scss', }) export class BreadcrumbsCollapseExample {} ``` #### breadcrumbs-collapse-example.scss ```scss .breadcrumbs-collapse-example { display: grid; gap: var(--kui-space-4, 16px); min-inline-size: 0; } .breadcrumbs-collapse-example__trail { flex-wrap: nowrap; max-inline-size: 20rem; } ``` ## API | Name | Type | Default | Description | | --- | --- | --- | --- | | ol[kuiBreadcrumbs].size | 'sm' \| 'md' \| 'lg' | 'md' | Font size, separator scale, and spacing for the full trail. Falls back to defaults.breadcrumbs.size, then the global defaults.size. | | a[kuiBreadcrumbItem] | directive | - | Native link crumb for navigable hierarchy levels. | | span[kuiBreadcrumbItem] | directive | - | Plain-text crumb for grouping labels or the current page. | | span[kuiBreadcrumbItem].current | boolean | false | Marks the final crumb as the current page and sets aria-current. | | li[kuiBreadcrumbSeparator] | component | - | Decorative separator list item hidden from assistive technology. | | .kui-breadcrumb-truncate | CSS class | - | Added to the crumb that should shrink with an ellipsis; keep the trail non-wrapping. The maximum width is --kui-breadcrumb-truncate-max-width. | | button.kui-breadcrumb-ellipsis | CSS class | - | Styles a button that stands in for hidden crumbs. Breadcrumbs does not manage the menu; wire it to kui-menu or kui-dropdown yourself. | | span.kui-breadcrumb-icon | CSS class | - | Optional leading icon wrapper, on the first crumb only. | | KuiBreadcrumbsOptions | interface | - | Shape of defaults.breadcrumbs: size and separatorIcon (takes precedence over defaults.icons.separator). | ## Accessibility - Wrap the trail in `