Defaults cover preferences shared by many instances. Data, instance state and form state are never defaults.

NameTypeDefaultDescription
Colour, radius, spacing, typeTheme seeds and CSS variables — Visual identity of the whole application.
Variant or behaviour shared across the appDefaults — Size, shape, clearable, toast placement and similar preferences (this page).
DensityTheme seeds — Set seeds.density in the theme.
Texts and accessible namesMessages — See the Internationalization page.

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.

provideKikitaUi({
  defaults: {
    size: 'sm',
    button: { shape: 'ghost', size: 'md' },
    select: { clearable: true, maxVisibleChips: 2 },
    toast: { position: 'top-end', duration: 4000 },
  },
});

KuiComponentDefaults lists every key. Interfaces that share a meaning share a base (KuiButtonBaseOptions, KuiFieldControlOptions). Each component page lists its own options in the Provider defaults section.

The nearest value wins, and each level is merged over the defaults it inherits per component key and per property.

  • Order: local input, then the nearest level, then parent levels, then provideKikitaUi defaults, then the component default.
  • An omitted or undefined property inherits from the parent; false, 0, '' and null are real values and override.
  • Arrays and functions are replaced as a whole, and a level never changes its parent.
  • Several provideKuiDefaults or provideKikitaUi providers on one level combine in provider order, the later one winning per property.

Every property accepts a plain value or a Signal, and the whole defaults value may be a function that runs in an injection context.

@Service()
class ThemeState {
  readonly shape = signal<KuiButtonShape>('solid');
}

provideKikitaUi({
  defaults: () => ({ button: { shape: inject(ThemeState).shape } }),
});
  • Components read the effective value in a computed, so changing the signal updates every affected component. A component providers array cannot read this; put the state in a service and read it in a function.
  • set and update write to the nearest level only, and KuiDefaults never exposes a writable signal.
  • Dialog, drawer and toast options are read each time one opens, so an open overlay keeps what it opened with, and a tooltip reads its options each time it shows. Toast position and maxVisible belong to the shared region and follow a change of the default. Everything else follows runtime changes immediately.
  • Defaults live in the injector of each application instance, so concurrent server requests never share them. Do not keep a module-level signal in an application config shared by requests; create it inside a function default or a service.

defaults.size applies to every primitive with a size input when neither the local input nor the component key sets one.

  • Order: local input, then defaults.<component>.size, then defaults.size, then md. A primitive whose size type is narrower than KuiSize ignores unsupported values; kui-calendar supports sm and md, so a global xs leaves it at md. kui-icon is excluded because its size is a raw CSS size.
  • Field controls (kuiInput, kuiTextarea, kuiNumberInput, kuiColorInput, kuiCheckbox, kuiRadio, kuiSwitch) have their own key, and an explicit size on the parent kui-field wins over the control key: local size, then the parent field local size, then defaults.<control>.size, then defaults.field.size, then defaults.size, then md.
  • kuiSlider does not read the parent field. kui-field resolves local size, defaults.field.size, defaults.size, md. kuiSelect, kuiCombobox, kuiDatePicker and kuiTimePicker have no size input and follow the parent field.
  • kuiButton and kuiIconButton use separate keys because their default shapes differ on purpose (solid for buttons, ghost for icon-only buttons): local input, then defaults.button or defaults.iconButton, then defaults.size.

A few keys resolve through a chain with a shared field key.

  • Clearable: local input, then defaults.<select|combobox|datePicker|timePicker>, then defaults.field, then the component default. Select defaults to false; Combobox, Date Picker and Time Picker default to true.
  • defaults.select.multipleDisplay (chips or text) sets how a multiple select shows its selection and defaults.select.maxVisibleChips how many chips it shows before the +N chip.
  • Tooltip: local triggerType, then defaults.tooltip.triggerType, then auto. auto shows on mouse hover and keyboard focus and toggles on touch tap, hover disables touch taps, click uses click or keyboard activation everywhere and none disables the directive. Tooltip content stays supplemental; use a popover for links or buttons.

Anchored overlays share the placement and offset options and add their own.

NameTypeDefaultDescription
popoverplacement, offset, align, arrow, triggerType, hoverDelay — Built-in: bottom, 8, center, false, click, 100.
menuplacement, offset, menuAlign, minWidth — Built-in: bottom, 4, start, none.
dropdownmaxHeight, offset, closeOnSelect, panelWidth — Built-in: 240px, 4, true, anchor.
tooltiptriggerType, placement — Built-in: auto, top.
dialogsize, appearance, dismissable, closable — Per kuiDialog call. Built-in: md, default, true, true.
drawerside, size, closeOnBackdropClick, closeOnEscape, closable — Built-in: right, md, true, true, true.
  • Each option resolves as local input or call config, then defaults.<overlay>, then the built-in default.
  • kui-dropdown is also the panel of kuiSelect, kuiCombobox, kuiDatePicker and kuiTimePicker, so defaults.dropdown reaches those panels unless the control sets the input itself. kuiDialog and kuiDrawer read the defaults of the injector they are called from, so a nested provideKuiDefaults applies to dialogs opened inside it.

These keys follow local input, then defaults, then the built-in default.

NameTypeDefaultDescription
calendar, calendarRangesize, flat, showWeekend, showFooter, showPrevNav, showNextNav — Built-in: global size, false, true, false, true, true. The two keys are separate and share KuiCalendarViewOptions.
timePickerclearable, 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.
carouselitemsPerView, loop, autoplay, autoplayInterval, showArrows, showDots, draggable — Built-in: 1, false, false, 4000, true, true, true.
paginationvariant, siblingCount, boundaryCount, pageSizeOptions — Built-in: compact, 1, 1, [10, 25, 50, 100].

A date picker renders a calendar inside its panel, so a defaults.calendar entry reaches it unless the panel sets the input itself.

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.

NameTypeDefaultDescription
badge, breadcrumbs, chip, emptyState, loader, segmented, tablesize —
input, textarea, checkbox, radio, switch, colorInputsize —
numberInputsize, variant —
slider, progresssize, color —
accordionsize, mode, appearance —
alertsize, shape, showIcon, closable —
cardsize, appearance —
tabssize, variant, orientation —
steppersize, orientation, linear, compact —
treesize, mode —
groupsize, orientation, collapsed, rounded —
avatar, avatarGroupsize, shape (avatarGroup also max) —
linktone, underline —
separatorappearance, orientation, spacing —
skeletonshape, animation —
fileUploadsize, variant, mode —
otpInputsize, mask, integerOnly —
barChart, lineChart, donutChart, scatterChartsize, legend —

Not configurable on purpose: values, open and loading state, disabled, readonly, validation state, data inputs (series, data, groups), ids, accessible names and library message text, and per-instance structure such as Select.multiple, Chip.removable or the OTP length.

The icons key replaces the glyphs components draw for themselves, one glyph per role or per component slot.

app.config.ts
provideKikitaUi({ defaults: { icons: { close: MY_CLOSE }, select: { chevronIcon: MY_CHEVRON } } });

Order: defaults.<component>.<slot>Icon, then defaults.icons.<role>, then the built-in glyph. A glyph is plain icon data and an invalid one is ignored. The roles and the data format are listed on the Structural icons page; these are not the icons you pass to kui-icon by name.

The injection tokens are removed and the provider functions remain as deprecated wrappers until 3.0.

NameTypeDefaultDescription
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).
KuiButtonPrimitiveOptionsKuiButtonBaseOptions — Renamed.
KikitaUiDefaultsKuiComponentDefaults — Deprecated alias.

A nested level now merges with its parent per property (before, a nested field provider replaced the whole parent object), and kuiDatePicker and kuiTimePicker read their own datePicker and timePicker keys before the field key.