@kovojs/headless-ui
Generated from 35 public subpaths — 434 exports, 434 documented. Do not edit by hand.
@kovojs/headless-ui/accordion#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/accordion.ts
Values#
accordionRootAttributes#
Builds the accordion root attributes record for the Accordion primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { accordionRootAttributes } from '@kovojs/headless-ui/accordion';
declare const input: Parameters<typeof accordionRootAttributes>[0];
const result = accordionRootAttributes(input);Signature
function accordionRootAttributes(state: AccordionState): AccordionPrimitiveAttributes;accordionItemAttributes#
Builds the accordion item attributes record for the Accordion primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { accordionItemAttributes } from '@kovojs/headless-ui/accordion';
declare const input: Parameters<typeof accordionItemAttributes>[0];
const result = accordionItemAttributes(input);Signature
function accordionItemAttributes(
options: AccordionItemOptions,
): AccordionPrimitiveAttributes;accordionHeaderAttributes#
Builds the accordion header attributes record for the Accordion primitive.
Emits aria-level.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { accordionHeaderAttributes } from '@kovojs/headless-ui/accordion';
declare const input: Parameters<typeof accordionHeaderAttributes>[0];
const result = accordionHeaderAttributes(input);Signature
function accordionHeaderAttributes(
options: AccordionHeaderAttributeOptions,
): AccordionPrimitiveAttributes;accordionTriggerAttributes#
Builds the accordion trigger attributes record for the Accordion primitive.
Emits aria-controls, aria-expanded.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { accordionTriggerAttributes } from '@kovojs/headless-ui/accordion';
declare const input: Parameters<typeof accordionTriggerAttributes>[0];
const result = accordionTriggerAttributes(input);Signature
function accordionTriggerAttributes(
options: AccordionTriggerAttributeOptions,
): AccordionPrimitiveAttributes;accordionContentAttributes#
Builds the accordion content attributes record for the Accordion primitive.
Emits aria-labelledby.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { accordionContentAttributes } from '@kovojs/headless-ui/accordion';
declare const input: Parameters<typeof accordionContentAttributes>[0];
const result = accordionContentAttributes(input);Signature
function accordionContentAttributes(
options: AccordionContentAttributeOptions,
): AccordionPrimitiveAttributes;Supporting types#
AccordionType#
Public type used by the Accordion primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AccordionType } from '@kovojs/headless-ui/accordion';
declare const value: AccordionType;Signature
type AccordionType = 'multiple' | 'single';AccordionValue#
Public type used by the Accordion primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AccordionValue } from '@kovojs/headless-ui/accordion';
declare const value: AccordionValue;Signature
type AccordionValue = readonly string[] | string | undefined;AccordionState#
State snapshot consumed by the Accordion primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AccordionState } from '@kovojs/headless-ui/accordion';
declare const value: AccordionState;Signature
interface AccordionState {
activeValue?: string;
collapsible?: boolean;
dir?: TextDirection;
disabled?: boolean;
items?: readonly AccordionItem[];
loop?: boolean;
orientation?: CollectionOrientation;
type?: AccordionType;
value?: AccordionValue;
}AccordionItem#
Public interface used by the Accordion primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AccordionItem } from '@kovojs/headless-ui/accordion';
declare const value: AccordionItem;Signature
interface AccordionItem {
disabled?: boolean;
value: string;
}AccordionItemOptions#
Options accepted by the Accordion primitive accordion item.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AccordionItemOptions } from '@kovojs/headless-ui/accordion';
declare const value: AccordionItemOptions;Signature
interface AccordionItemOptions extends AccordionState {
itemDisabled?: boolean;
itemValue: string;
}AccordionHeaderAttributeOptions#
Options accepted by the Accordion primitive accordion header attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AccordionHeaderAttributeOptions } from '@kovojs/headless-ui/accordion';
declare const value: AccordionHeaderAttributeOptions;Signature
interface AccordionHeaderAttributeOptions extends AccordionItemOptions {
level?: number;
}AccordionTriggerAttributeOptions#
Options accepted by the Accordion primitive accordion trigger attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AccordionTriggerAttributeOptions } from '@kovojs/headless-ui/accordion';
declare const value: AccordionTriggerAttributeOptions;Signature
interface AccordionTriggerAttributeOptions extends AccordionItemOptions {
contentId?: string;
triggerId?: string;
}AccordionContentAttributeOptions#
Options accepted by the Accordion primitive accordion content attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AccordionContentAttributeOptions } from '@kovojs/headless-ui/accordion';
declare const value: AccordionContentAttributeOptions;Signature
interface AccordionContentAttributeOptions extends AccordionItemOptions {
contentId?: string;
triggerId?: string;
}AccordionMoveResult#
Result returned by the Accordion primitive accordion move.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AccordionMoveResult } from '@kovojs/headless-ui/accordion';
declare const value: AccordionMoveResult;Signature
interface AccordionMoveResult {
index: number;
value: string | undefined;
}AccordionPrimitiveAttributes#
Serializable attribute record returned by Accordion primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AccordionPrimitiveAttributes } from '@kovojs/headless-ui/accordion';
declare const value: AccordionPrimitiveAttributes;Signature
type AccordionPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | number | string>>;@kovojs/headless-ui/alert-dialog#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/alert-dialog.ts
Values#
alertDialogRootAttributes#
Builds the alert dialog root attributes record for the Alert Dialog primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { alertDialogRootAttributes } from '@kovojs/headless-ui/alert-dialog';
declare const input: Parameters<typeof alertDialogRootAttributes>[0];
const result = alertDialogRootAttributes(input);Signature
function alertDialogRootAttributes(state: AlertDialogState): AlertDialogPrimitiveAttributes;alertDialogTriggerAttributes#
Builds the alert dialog trigger attributes record for the Alert Dialog primitive.
Emits aria-controls, aria-expanded, aria-haspopup.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { alertDialogTriggerAttributes } from '@kovojs/headless-ui/alert-dialog';
declare const input: Parameters<typeof alertDialogTriggerAttributes>[0];
const result = alertDialogTriggerAttributes(input);Signature
function alertDialogTriggerAttributes(
options: AlertDialogAttributeOptions,
): AlertDialogPrimitiveAttributes;alertDialogContentAttributes#
Builds the alert dialog content attributes record for the Alert Dialog primitive.
Emits aria-describedby, aria-labelledby, aria-modal.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { alertDialogContentAttributes } from '@kovojs/headless-ui/alert-dialog';
declare const input: Parameters<typeof alertDialogContentAttributes>[0];
const result = alertDialogContentAttributes(input);Signature
function alertDialogContentAttributes(
options: AlertDialogAttributeOptions,
): AlertDialogPrimitiveAttributes;alertDialogCancelAttributes#
Builds the alert dialog cancel attributes record for the Alert Dialog primitive.
Emits data-intent.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { alertDialogCancelAttributes } from '@kovojs/headless-ui/alert-dialog';
declare const input: Parameters<typeof alertDialogCancelAttributes>[0];
const result = alertDialogCancelAttributes(input);Signature
function alertDialogCancelAttributes(
options: AlertDialogCancelAttributeOptions,
): AlertDialogPrimitiveAttributes;alertDialogActionAttributes#
Builds the alert dialog action attributes record for the Alert Dialog primitive.
Emits data-intent.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { alertDialogActionAttributes } from '@kovojs/headless-ui/alert-dialog';
declare const input: Parameters<typeof alertDialogActionAttributes>[0];
const result = alertDialogActionAttributes(input);Signature
function alertDialogActionAttributes(
options: AlertDialogActionAttributeOptions,
): AlertDialogPrimitiveAttributes;Supporting types#
AlertDialogActionIntent#
Public type used by the Alert Dialog primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AlertDialogActionIntent } from '@kovojs/headless-ui/alert-dialog';
declare const value: AlertDialogActionIntent;Signature
type AlertDialogActionIntent = 'confirm' | 'destructive';AlertDialogState#
State snapshot consumed by the Alert Dialog primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AlertDialogState } from '@kovojs/headless-ui/alert-dialog';
declare const value: AlertDialogState;Signature
interface AlertDialogState {
disabled?: boolean;
open: boolean;
}AlertDialogAttributeOptions#
Options accepted by the Alert Dialog primitive alert dialog attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AlertDialogAttributeOptions } from '@kovojs/headless-ui/alert-dialog';
declare const value: AlertDialogAttributeOptions;Signature
interface AlertDialogAttributeOptions extends AlertDialogState {
contentId?: string;
descriptionId?: string;
titleId?: string;
}AlertDialogActionAttributeOptions#
Options accepted by the Alert Dialog primitive alert dialog action attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AlertDialogActionAttributeOptions } from '@kovojs/headless-ui/alert-dialog';
declare const value: AlertDialogActionAttributeOptions;Signature
interface AlertDialogActionAttributeOptions extends AlertDialogAttributeOptions {
intent?: AlertDialogActionIntent;
}AlertDialogCancelAttributeOptions#
Options accepted by the Alert Dialog primitive alert dialog cancel attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AlertDialogCancelAttributeOptions } from '@kovojs/headless-ui/alert-dialog';
declare const value: AlertDialogCancelAttributeOptions;Signature
interface AlertDialogCancelAttributeOptions extends AlertDialogAttributeOptions {
autoFocus?: boolean;
}AlertDialogPrimitiveAttributes#
Serializable attribute record returned by Alert Dialog primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AlertDialogPrimitiveAttributes } from '@kovojs/headless-ui/alert-dialog';
declare const value: AlertDialogPrimitiveAttributes;Signature
type AlertDialogPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | string>>;@kovojs/headless-ui/autocomplete#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/autocomplete.ts
Values#
autocompleteValueText#
Computes autocomplete value text for the Autocomplete primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { autocompleteValueText } from '@kovojs/headless-ui/autocomplete';
declare const input: Parameters<typeof autocompleteValueText>[0];
const result = autocompleteValueText(input);Signature
function autocompleteValueText(state: AutocompleteState): string;autocompleteRootAttributes#
Builds the autocomplete root attributes record for the Autocomplete primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { autocompleteRootAttributes } from '@kovojs/headless-ui/autocomplete';
declare const input: Parameters<typeof autocompleteRootAttributes>[0];
const result = autocompleteRootAttributes(input);Signature
function autocompleteRootAttributes(
options: AutocompleteRootAttributeOptions = {},
): AutocompletePrimitiveAttributes;autocompleteInputAttributes#
Builds the autocomplete input attributes record for the Autocomplete primitive.
Emits aria-autocomplete, aria-expanded.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { autocompleteInputAttributes } from '@kovojs/headless-ui/autocomplete';
declare const input: Parameters<typeof autocompleteInputAttributes>[0];
const result = autocompleteInputAttributes(input);Signature
function autocompleteInputAttributes(
options: AutocompleteInputAttributeOptions = {},
): AutocompletePrimitiveAttributes;autocompleteListAttributes#
Builds the autocomplete list attributes record for the Autocomplete primitive.
Emits aria-labelledby.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { autocompleteListAttributes } from '@kovojs/headless-ui/autocomplete';
declare const input: Parameters<typeof autocompleteListAttributes>[0];
const result = autocompleteListAttributes(input);Signature
function autocompleteListAttributes(
options: AutocompleteListAttributeOptions = {},
): AutocompletePrimitiveAttributes;autocompleteOptionAttributes#
Builds the autocomplete option attributes record for the Autocomplete primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { autocompleteOptionAttributes } from '@kovojs/headless-ui/autocomplete';
declare const input: Parameters<typeof autocompleteOptionAttributes>[0];
const result = autocompleteOptionAttributes(input);Signature
function autocompleteOptionAttributes(
options: AutocompleteOptionAttributeOptions,
): AutocompletePrimitiveAttributes;autocompleteValueAttributes#
Builds the autocomplete value attributes record for the Autocomplete primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { autocompleteValueAttributes } from '@kovojs/headless-ui/autocomplete';
declare const input: Parameters<typeof autocompleteValueAttributes>[0];
const result = autocompleteValueAttributes(input);Signature
function autocompleteValueAttributes(
options: AutocompleteValueAttributeOptions = {},
): AutocompletePrimitiveAttributes;Supporting types#
AutocompleteItem#
Public interface used by the Autocomplete primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AutocompleteItem } from '@kovojs/headless-ui/autocomplete';
declare const value: AutocompleteItem;Signature
interface AutocompleteItem {
disabled?: boolean;
id?: string;
label?: string;
textValue?: string;
value: string;
}AutocompleteState#
State snapshot consumed by the Autocomplete primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AutocompleteState } from '@kovojs/headless-ui/autocomplete';
declare const value: AutocompleteState;Signature
interface AutocompleteState {
disabled?: boolean;
form?: string;
highlightedValue?: string;
inputValue?: string;
invalid?: boolean;
items?: readonly AutocompleteItem[];
listId?: string;
name?: string;
open?: boolean;
placeholder?: string;
required?: boolean;
value?: string;
}AutocompleteRootAttributeOptions#
Options accepted by the Autocomplete primitive autocomplete root attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AutocompleteRootAttributeOptions } from '@kovojs/headless-ui/autocomplete';
declare const value: AutocompleteRootAttributeOptions;Signature
interface AutocompleteRootAttributeOptions extends AutocompleteState {
id?: string;
}AutocompleteInputAttributeOptions#
Options accepted by the Autocomplete primitive autocomplete input attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AutocompleteInputAttributeOptions } from '@kovojs/headless-ui/autocomplete';
declare const value: AutocompleteInputAttributeOptions;Signature
interface AutocompleteInputAttributeOptions extends AutocompleteState {
autocomplete?: string;
descriptionId?: string;
errorId?: string;
id?: string;
labelledBy?: string;
}AutocompleteListAttributeOptions#
Options accepted by the Autocomplete primitive autocomplete list attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AutocompleteListAttributeOptions } from '@kovojs/headless-ui/autocomplete';
declare const value: AutocompleteListAttributeOptions;Signature
interface AutocompleteListAttributeOptions extends AutocompleteState {
id?: string;
labelledBy?: string;
}AutocompleteOptionAttributeOptions#
Options accepted by the Autocomplete primitive autocomplete option attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AutocompleteOptionAttributeOptions } from '@kovojs/headless-ui/autocomplete';
declare const value: AutocompleteOptionAttributeOptions;Signature
interface AutocompleteOptionAttributeOptions extends AutocompleteState {
id?: string;
itemDisabled?: boolean;
itemLabel?: string;
itemValue: string;
}AutocompleteValueAttributeOptions#
Options accepted by the Autocomplete primitive autocomplete value attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AutocompleteValueAttributeOptions } from '@kovojs/headless-ui/autocomplete';
declare const value: AutocompleteValueAttributeOptions;Signature
interface AutocompleteValueAttributeOptions extends AutocompleteState {
id?: string;
}AutocompleteMoveResult#
Result returned by the Autocomplete primitive autocomplete move.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AutocompleteMoveResult } from '@kovojs/headless-ui/autocomplete';
declare const value: AutocompleteMoveResult;Signature
interface AutocompleteMoveResult {
highlightedIndex: number;
highlightedValue: string | undefined;
}AutocompleteTypeaheadOptions#
Options accepted by the Autocomplete primitive autocomplete typeahead.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AutocompleteTypeaheadOptions } from '@kovojs/headless-ui/autocomplete';
declare const value: AutocompleteTypeaheadOptions;Signature
interface AutocompleteTypeaheadOptions {
currentValue?: string;
loop?: boolean;
now: number;
state?: TypeaheadState;
timeoutMs?: number;
}AutocompleteTypeaheadResult#
Result returned by the Autocomplete primitive autocomplete typeahead.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AutocompleteTypeaheadResult } from '@kovojs/headless-ui/autocomplete';
declare const value: AutocompleteTypeaheadResult;Signature
interface AutocompleteTypeaheadResult {
matchIndex: number;
state: TypeaheadState;
value: string | undefined;
}AutocompletePrimitiveAttributes#
Serializable attribute record returned by Autocomplete primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AutocompletePrimitiveAttributes } from '@kovojs/headless-ui/autocomplete';
declare const value: AutocompletePrimitiveAttributes;Signature
type AutocompletePrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | number | string>>;@kovojs/headless-ui/avatar#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/avatar.ts
Values#
avatarRootAttributes#
Builds the avatar root attributes record for the Avatar primitive.
Emits aria-label, data-state.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { avatarRootAttributes } from '@kovojs/headless-ui/avatar';
declare const input: Parameters<typeof avatarRootAttributes>[0];
const result = avatarRootAttributes(input);Signature
function avatarRootAttributes(
options: AvatarRootAttributeOptions = {},
): AvatarPrimitiveAttributes;avatarImageAttributes#
Builds the avatar image attributes record for the Avatar primitive.
Emits data-state.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { avatarImageAttributes } from '@kovojs/headless-ui/avatar';
declare const input: Parameters<typeof avatarImageAttributes>[0];
const result = avatarImageAttributes(input);Signature
function avatarImageAttributes(
options: AvatarImageAttributeOptions,
): AvatarPrimitiveAttributes;avatarFallbackAttributes#
Builds the avatar fallback attributes record for the Avatar primitive.
Emits data-delay, data-state.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { avatarFallbackAttributes } from '@kovojs/headless-ui/avatar';
declare const input: Parameters<typeof avatarFallbackAttributes>[0];
const result = avatarFallbackAttributes(input);Signature
function avatarFallbackAttributes(
options: AvatarFallbackAttributeOptions = {},
): AvatarPrimitiveAttributes;Supporting types#
AvatarImageStatus#
Public type used by the Avatar primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AvatarImageStatus } from '@kovojs/headless-ui/avatar';
declare const value: AvatarImageStatus;Signature
type AvatarImageStatus = 'error' | 'loaded' | 'loading';AvatarState#
State snapshot consumed by the Avatar primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AvatarState } from '@kovojs/headless-ui/avatar';
declare const value: AvatarState;Signature
interface AvatarState {
src?: string;
status?: AvatarImageStatus;
}AvatarComputedState#
State snapshot consumed by the Avatar primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AvatarComputedState } from '@kovojs/headless-ui/avatar';
declare const value: AvatarComputedState;Signature
interface AvatarComputedState {
fallbackHidden: boolean;
imageHidden: boolean;
src?: string;
status: AvatarImageStatus;
}AvatarRootAttributeOptions#
Options accepted by the Avatar primitive avatar root attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AvatarRootAttributeOptions } from '@kovojs/headless-ui/avatar';
declare const value: AvatarRootAttributeOptions;Signature
interface AvatarRootAttributeOptions extends AvatarState {
label?: string;
}AvatarImageAttributeOptions#
Options accepted by the Avatar primitive avatar image attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AvatarImageAttributeOptions } from '@kovojs/headless-ui/avatar';
declare const value: AvatarImageAttributeOptions;Signature
interface AvatarImageAttributeOptions extends AvatarState {
alt: string;
decoding?: 'async' | 'auto' | 'sync';
loading?: 'eager' | 'lazy';
referrerPolicy?: string;
sizes?: string;
srcSet?: string;
}AvatarFallbackAttributeOptions#
Options accepted by the Avatar primitive avatar fallback attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AvatarFallbackAttributeOptions } from '@kovojs/headless-ui/avatar';
declare const value: AvatarFallbackAttributeOptions;Signature
interface AvatarFallbackAttributeOptions extends AvatarState {
delayMs?: number;
}AvatarPrimitiveAttributes#
Serializable attribute record returned by Avatar primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AvatarPrimitiveAttributes } from '@kovojs/headless-ui/avatar';
declare const value: AvatarPrimitiveAttributes;Signature
type AvatarPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | number | string>>;AvatarImageStatusResult#
Result returned by the Avatar primitive avatar image status.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { AvatarImageStatusResult } from '@kovojs/headless-ui/avatar';
declare const value: AvatarImageStatusResult;Signature
interface AvatarImageStatusResult {
changed: boolean;
status: AvatarImageStatus;
}@kovojs/headless-ui/checkbox#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/checkbox.ts
Values#
checkboxRootAttributes#
Builds the checkbox root attributes record for the Checkbox primitive.
Emits aria-checked.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { checkboxRootAttributes } from '@kovojs/headless-ui/checkbox';
declare const input: Parameters<typeof checkboxRootAttributes>[0];
const result = checkboxRootAttributes(input);Signature
function checkboxRootAttributes(state: CheckboxState): CheckboxPrimitiveAttributes;applyCheckboxIndeterminate#
Computes apply checkbox indeterminate for the Checkbox primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { applyCheckboxIndeterminate } from '@kovojs/headless-ui/checkbox';
declare const input: Parameters<typeof applyCheckboxIndeterminate>[0];
declare const state: Parameters<typeof applyCheckboxIndeterminate>[1];
const result = applyCheckboxIndeterminate(input, state);Signature
function applyCheckboxIndeterminate(
input: CheckboxNativeInput,
checked: CheckboxCheckedState,
): void;Supporting types#
CheckboxCheckedState#
State snapshot consumed by the Checkbox primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CheckboxCheckedState } from '@kovojs/headless-ui/checkbox';
declare const value: CheckboxCheckedState;Signature
type CheckboxCheckedState = boolean | 'indeterminate';CheckboxState#
State snapshot consumed by the Checkbox primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CheckboxState } from '@kovojs/headless-ui/checkbox';
declare const value: CheckboxState;Signature
interface CheckboxState {
checked: CheckboxCheckedState;
disabled?: boolean;
name?: string;
required?: boolean;
value?: string;
}CheckboxPrimitiveAttributes#
Serializable attribute record returned by Checkbox primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CheckboxPrimitiveAttributes } from '@kovojs/headless-ui/checkbox';
declare const value: CheckboxPrimitiveAttributes;Signature
type CheckboxPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | string>>;CheckboxNativeInput#
Public interface used by the Checkbox primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CheckboxNativeInput } from '@kovojs/headless-ui/checkbox';
declare const value: CheckboxNativeInput;Signature
interface CheckboxNativeInput {
indeterminate: boolean;
}@kovojs/headless-ui/checkbox-group#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/checkbox-group.ts
Values#
checkboxGroupRootAttributes#
Builds the checkbox group root attributes record for the Checkbox Group primitive.
Emits aria-labelledby.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { checkboxGroupRootAttributes } from '@kovojs/headless-ui/checkbox-group';
declare const input: Parameters<typeof checkboxGroupRootAttributes>[0];
const result = checkboxGroupRootAttributes(input);Signature
function checkboxGroupRootAttributes(
options: CheckboxGroupRootAttributeOptions = {},
): CheckboxGroupPrimitiveAttributes;checkboxGroupItemAttributes#
Builds the checkbox group item attributes record for the Checkbox Group primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { checkboxGroupItemAttributes } from '@kovojs/headless-ui/checkbox-group';
declare const input: Parameters<typeof checkboxGroupItemAttributes>[0];
const result = checkboxGroupItemAttributes(input);Signature
function checkboxGroupItemAttributes(
options: CheckboxGroupItemAttributeOptions,
): CheckboxGroupPrimitiveAttributes;checkboxGroupControlAttributes#
Builds the checkbox group control attributes record for the Checkbox Group primitive.
Emits aria-checked.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { checkboxGroupControlAttributes } from '@kovojs/headless-ui/checkbox-group';
declare const input: Parameters<typeof checkboxGroupControlAttributes>[0];
const result = checkboxGroupControlAttributes(input);Signature
function checkboxGroupControlAttributes(
options: CheckboxGroupControlAttributeOptions,
): CheckboxGroupPrimitiveAttributes;checkboxGroupLabelAttributes#
Builds the checkbox group label attributes record for the Checkbox Group primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { checkboxGroupLabelAttributes } from '@kovojs/headless-ui/checkbox-group';
declare const input: Parameters<typeof checkboxGroupLabelAttributes>[0];
const result = checkboxGroupLabelAttributes(input);Signature
function checkboxGroupLabelAttributes(
options: CheckboxGroupLabelAttributeOptions,
): CheckboxGroupPrimitiveAttributes;Supporting types#
CheckboxGroupItem#
Public interface used by the Checkbox Group primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CheckboxGroupItem } from '@kovojs/headless-ui/checkbox-group';
declare const value: CheckboxGroupItem;Signature
interface CheckboxGroupItem {
disabled?: boolean;
value: string;
}CheckboxGroupState#
State snapshot consumed by the Checkbox Group primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CheckboxGroupState } from '@kovojs/headless-ui/checkbox-group';
declare const value: CheckboxGroupState;Signature
interface CheckboxGroupState {
activeValue?: string;
dir?: TextDirection;
disabled?: boolean;
form?: string;
invalid?: boolean;
items?: readonly CheckboxGroupItem[];
loop?: boolean;
name?: string;
orientation?: CollectionOrientation;
required?: boolean;
value?: readonly string[];
}CheckboxGroupRootAttributeOptions#
Options accepted by the Checkbox Group primitive checkbox group root attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CheckboxGroupRootAttributeOptions } from '@kovojs/headless-ui/checkbox-group';
declare const value: CheckboxGroupRootAttributeOptions;Signature
interface CheckboxGroupRootAttributeOptions extends CheckboxGroupState {
descriptionId?: string;
errorId?: string;
id?: string;
labelledBy?: string;
}CheckboxGroupItemAttributeOptions#
Options accepted by the Checkbox Group primitive checkbox group item attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CheckboxGroupItemAttributeOptions } from '@kovojs/headless-ui/checkbox-group';
declare const value: CheckboxGroupItemAttributeOptions;Signature
interface CheckboxGroupItemAttributeOptions extends CheckboxGroupState {
id?: string;
itemDisabled?: boolean;
itemValue: string;
}CheckboxGroupControlAttributeOptions#
Options accepted by the Checkbox Group primitive checkbox group control attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CheckboxGroupControlAttributeOptions } from '@kovojs/headless-ui/checkbox-group';
declare const value: CheckboxGroupControlAttributeOptions;Signature
interface CheckboxGroupControlAttributeOptions extends CheckboxGroupItemAttributeOptions {
controlId?: string;
}CheckboxGroupLabelAttributeOptions#
Options accepted by the Checkbox Group primitive checkbox group label attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CheckboxGroupLabelAttributeOptions } from '@kovojs/headless-ui/checkbox-group';
declare const value: CheckboxGroupLabelAttributeOptions;Signature
interface CheckboxGroupLabelAttributeOptions extends CheckboxGroupItemAttributeOptions {
controlId?: string;
}CheckboxGroupMoveResult#
Result returned by the Checkbox Group primitive checkbox group move.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CheckboxGroupMoveResult } from '@kovojs/headless-ui/checkbox-group';
declare const value: CheckboxGroupMoveResult;Signature
interface CheckboxGroupMoveResult {
index: number;
value: string | undefined;
}CheckboxGroupPrimitiveAttributes#
Serializable attribute record returned by Checkbox Group primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CheckboxGroupPrimitiveAttributes } from '@kovojs/headless-ui/checkbox-group';
declare const value: CheckboxGroupPrimitiveAttributes;Signature
type CheckboxGroupPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | number | string>>;@kovojs/headless-ui/collapsible#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/collapsible.ts
Values#
collapsibleRootAttributes#
Builds the collapsible root attributes record for the Collapsible primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { collapsibleRootAttributes } from '@kovojs/headless-ui/collapsible';
declare const input: Parameters<typeof collapsibleRootAttributes>[0];
const result = collapsibleRootAttributes(input);Signature
function collapsibleRootAttributes(state: CollapsibleState): CollapsiblePrimitiveAttributes;collapsibleTriggerAttributes#
Builds the collapsible trigger attributes record for the Collapsible primitive.
Emits aria-controls, aria-expanded.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { collapsibleTriggerAttributes } from '@kovojs/headless-ui/collapsible';
declare const input: Parameters<typeof collapsibleTriggerAttributes>[0];
const result = collapsibleTriggerAttributes(input);Signature
function collapsibleTriggerAttributes(
options: CollapsibleAttributeOptions,
): CollapsiblePrimitiveAttributes;collapsibleContentAttributes#
Builds the collapsible content attributes record for the Collapsible primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { collapsibleContentAttributes } from '@kovojs/headless-ui/collapsible';
declare const input: Parameters<typeof collapsibleContentAttributes>[0];
const result = collapsibleContentAttributes(input);Signature
function collapsibleContentAttributes(
options: CollapsibleAttributeOptions,
): CollapsiblePrimitiveAttributes;Supporting types#
CollapsibleState#
State snapshot consumed by the Collapsible primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CollapsibleState } from '@kovojs/headless-ui/collapsible';
declare const value: CollapsibleState;Signature
interface CollapsibleState {
disabled?: boolean;
open: boolean;
}CollapsibleAttributeOptions#
Options accepted by the Collapsible primitive collapsible attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CollapsibleAttributeOptions } from '@kovojs/headless-ui/collapsible';
declare const value: CollapsibleAttributeOptions;Signature
interface CollapsibleAttributeOptions extends CollapsibleState {
contentId?: string;
}CollapsiblePrimitiveAttributes#
Serializable attribute record returned by Collapsible primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CollapsiblePrimitiveAttributes } from '@kovojs/headless-ui/collapsible';
declare const value: CollapsiblePrimitiveAttributes;Signature
type CollapsiblePrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | string>>;@kovojs/headless-ui/combobox#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/combobox.ts
Values#
comboboxValueText#
Computes combobox value text for the Combobox primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { comboboxValueText } from '@kovojs/headless-ui/combobox';
declare const input: Parameters<typeof comboboxValueText>[0];
const result = comboboxValueText(input);Signature
function comboboxValueText(state: ComboboxState): string;comboboxRootAttributes#
Builds the combobox root attributes record for the Combobox primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { comboboxRootAttributes } from '@kovojs/headless-ui/combobox';
declare const input: Parameters<typeof comboboxRootAttributes>[0];
const result = comboboxRootAttributes(input);Signature
function comboboxRootAttributes(
options: ComboboxRootAttributeOptions = {},
): ComboboxPrimitiveAttributes;comboboxInputAttributes#
Builds the combobox input attributes record for the Combobox primitive.
Emits aria-autocomplete, aria-expanded.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { comboboxInputAttributes } from '@kovojs/headless-ui/combobox';
declare const input: Parameters<typeof comboboxInputAttributes>[0];
const result = comboboxInputAttributes(input);Signature
function comboboxInputAttributes(
options: ComboboxInputAttributeOptions = {},
): ComboboxPrimitiveAttributes;comboboxListboxAttributes#
Builds the combobox listbox attributes record for the Combobox primitive.
Emits aria-labelledby.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { comboboxListboxAttributes } from '@kovojs/headless-ui/combobox';
declare const input: Parameters<typeof comboboxListboxAttributes>[0];
const result = comboboxListboxAttributes(input);Signature
function comboboxListboxAttributes(
options: ComboboxListboxAttributeOptions = {},
): ComboboxPrimitiveAttributes;comboboxOptionAttributes#
Builds the combobox option attributes record for the Combobox primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { comboboxOptionAttributes } from '@kovojs/headless-ui/combobox';
declare const input: Parameters<typeof comboboxOptionAttributes>[0];
const result = comboboxOptionAttributes(input);Signature
function comboboxOptionAttributes(
options: ComboboxOptionAttributeOptions,
): ComboboxPrimitiveAttributes;comboboxValueAttributes#
Builds the combobox value attributes record for the Combobox primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { comboboxValueAttributes } from '@kovojs/headless-ui/combobox';
declare const input: Parameters<typeof comboboxValueAttributes>[0];
const result = comboboxValueAttributes(input);Signature
function comboboxValueAttributes(
options: ComboboxValueAttributeOptions = {},
): ComboboxPrimitiveAttributes;Supporting types#
ComboboxItem#
Public interface used by the Combobox primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ComboboxItem } from '@kovojs/headless-ui/combobox';
declare const value: ComboboxItem;Signature
interface ComboboxItem {
disabled?: boolean;
id?: string;
label?: string;
textValue?: string;
value: string;
}ComboboxState#
State snapshot consumed by the Combobox primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ComboboxState } from '@kovojs/headless-ui/combobox';
declare const value: ComboboxState;Signature
interface ComboboxState {
disabled?: boolean;
form?: string;
highlightedValue?: string;
invalid?: boolean;
items?: readonly ComboboxItem[];
listboxId?: string;
name?: string;
open?: boolean;
placeholder?: string;
required?: boolean;
value?: string;
}ComboboxRootAttributeOptions#
Options accepted by the Combobox primitive combobox root attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ComboboxRootAttributeOptions } from '@kovojs/headless-ui/combobox';
declare const value: ComboboxRootAttributeOptions;Signature
interface ComboboxRootAttributeOptions extends ComboboxState {
id?: string;
}ComboboxInputAttributeOptions#
Options accepted by the Combobox primitive combobox input attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ComboboxInputAttributeOptions } from '@kovojs/headless-ui/combobox';
declare const value: ComboboxInputAttributeOptions;Signature
interface ComboboxInputAttributeOptions extends ComboboxState {
descriptionId?: string;
errorId?: string;
id?: string;
labelledBy?: string;
}ComboboxListboxAttributeOptions#
Options accepted by the Combobox primitive combobox listbox attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ComboboxListboxAttributeOptions } from '@kovojs/headless-ui/combobox';
declare const value: ComboboxListboxAttributeOptions;Signature
interface ComboboxListboxAttributeOptions extends ComboboxState {
id?: string;
labelledBy?: string;
}ComboboxOptionAttributeOptions#
Options accepted by the Combobox primitive combobox option attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ComboboxOptionAttributeOptions } from '@kovojs/headless-ui/combobox';
declare const value: ComboboxOptionAttributeOptions;Signature
interface ComboboxOptionAttributeOptions extends ComboboxState {
id?: string;
itemDisabled?: boolean;
itemLabel?: string;
itemValue: string;
}ComboboxValueAttributeOptions#
Options accepted by the Combobox primitive combobox value attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ComboboxValueAttributeOptions } from '@kovojs/headless-ui/combobox';
declare const value: ComboboxValueAttributeOptions;Signature
interface ComboboxValueAttributeOptions extends ComboboxState {
id?: string;
}ComboboxMoveResult#
Result returned by the Combobox primitive combobox move.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ComboboxMoveResult } from '@kovojs/headless-ui/combobox';
declare const value: ComboboxMoveResult;Signature
interface ComboboxMoveResult {
highlightedIndex: number;
highlightedValue: string | undefined;
}ComboboxTypeaheadOptions#
Options accepted by the Combobox primitive combobox typeahead.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ComboboxTypeaheadOptions } from '@kovojs/headless-ui/combobox';
declare const value: ComboboxTypeaheadOptions;Signature
interface ComboboxTypeaheadOptions {
currentValue?: string;
loop?: boolean;
now: number;
state?: TypeaheadState;
timeoutMs?: number;
}ComboboxTypeaheadResult#
Result returned by the Combobox primitive combobox typeahead.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ComboboxTypeaheadResult } from '@kovojs/headless-ui/combobox';
declare const value: ComboboxTypeaheadResult;Signature
interface ComboboxTypeaheadResult {
matchIndex: number;
state: TypeaheadState;
value: string | undefined;
}ComboboxPrimitiveAttributes#
Serializable attribute record returned by Combobox primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ComboboxPrimitiveAttributes } from '@kovojs/headless-ui/combobox';
declare const value: ComboboxPrimitiveAttributes;Signature
type ComboboxPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | number | string>>;@kovojs/headless-ui/command#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/command.ts
Values#
commandRootAttributes#
Builds the command root attributes record for the Command primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { commandRootAttributes } from '@kovojs/headless-ui/command';
declare const input: Parameters<typeof commandRootAttributes>[0];
const result = commandRootAttributes(input);Signature
function commandRootAttributes(
options: CommandRootAttributeOptions = {},
): CommandPrimitiveAttributes;commandTriggerAttributes#
Builds the command trigger attributes record for the Command primitive.
Emits aria-controls, aria-expanded, aria-haspopup, aria-labelledby.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { commandTriggerAttributes } from '@kovojs/headless-ui/command';
declare const input: Parameters<typeof commandTriggerAttributes>[0];
const result = commandTriggerAttributes(input);Signature
function commandTriggerAttributes(
options: CommandTriggerAttributeOptions = {},
): CommandPrimitiveAttributes;commandDialogAttributes#
Builds the command dialog attributes record for the Command primitive.
Emits aria-describedby, aria-labelledby, aria-modal.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { commandDialogAttributes } from '@kovojs/headless-ui/command';
declare const input: Parameters<typeof commandDialogAttributes>[0];
const result = commandDialogAttributes(input);Signature
function commandDialogAttributes(
options: CommandDialogAttributeOptions = {},
): CommandPrimitiveAttributes;commandCloseAttributes#
Builds the command close attributes record for the Command primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { commandCloseAttributes } from '@kovojs/headless-ui/command';
declare const input: Parameters<typeof commandCloseAttributes>[0];
const result = commandCloseAttributes(input);Signature
function commandCloseAttributes(
options: CommandCloseAttributeOptions = {},
): CommandPrimitiveAttributes;commandInputAttributes#
Builds the command input attributes record for the Command primitive.
Emits aria-autocomplete, aria-expanded.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { commandInputAttributes } from '@kovojs/headless-ui/command';
declare const input: Parameters<typeof commandInputAttributes>[0];
const result = commandInputAttributes(input);Signature
function commandInputAttributes(
options: CommandInputAttributeOptions = {},
): CommandPrimitiveAttributes;commandListboxAttributes#
Builds the command listbox attributes record for the Command primitive.
Emits aria-labelledby.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { commandListboxAttributes } from '@kovojs/headless-ui/command';
declare const input: Parameters<typeof commandListboxAttributes>[0];
const result = commandListboxAttributes(input);Signature
function commandListboxAttributes(
options: CommandListboxAttributeOptions = {},
): CommandPrimitiveAttributes;commandItemAttributes#
Builds the command item attributes record for the Command primitive.
Emits aria-disabled, aria-selected.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { commandItemAttributes } from '@kovojs/headless-ui/command';
declare const input: Parameters<typeof commandItemAttributes>[0];
const result = commandItemAttributes(input);Signature
function commandItemAttributes(
options: CommandItemAttributeOptions,
): CommandPrimitiveAttributes;commandEmptyAttributes#
Builds the command empty attributes record for the Command primitive.
Emits data-empty.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { commandEmptyAttributes } from '@kovojs/headless-ui/command';
declare const input: Parameters<typeof commandEmptyAttributes>[0];
const result = commandEmptyAttributes(input);Signature
function commandEmptyAttributes(
options: CommandEmptyAttributeOptions = {},
): CommandPrimitiveAttributes;commandValueText#
Computes command value text for the Command primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { commandValueText } from '@kovojs/headless-ui/command';
declare const input: Parameters<typeof commandValueText>[0];
const result = commandValueText(input);Signature
function commandValueText(state: CommandState): string;Supporting types#
CommandItem#
Public interface used by the Command primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CommandItem } from '@kovojs/headless-ui/command';
declare const value: CommandItem;Signature
interface CommandItem {
disabled?: boolean;
id?: string;
keywords?: readonly string[];
label?: string;
textValue?: string;
value: string;
}CommandState#
State snapshot consumed by the Command primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CommandState } from '@kovojs/headless-ui/command';
declare const value: CommandState;Signature
interface CommandState {
disabled?: boolean;
form?: string;
highlightedValue?: string;
inputValue?: string;
invalid?: boolean;
items?: readonly CommandItem[];
name?: string;
open?: boolean;
placeholder?: string;
required?: boolean;
value?: string;
}CommandRootAttributeOptions#
Options accepted by the Command primitive command root attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CommandRootAttributeOptions } from '@kovojs/headless-ui/command';
declare const value: CommandRootAttributeOptions;Signature
interface CommandRootAttributeOptions extends CommandState {
id?: string;
}CommandTriggerAttributeOptions#
Options accepted by the Command primitive command trigger attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CommandTriggerAttributeOptions } from '@kovojs/headless-ui/command';
declare const value: CommandTriggerAttributeOptions;Signature
interface CommandTriggerAttributeOptions extends CommandState {
contentId?: string;
id?: string;
labelledBy?: string;
}CommandDialogAttributeOptions#
Options accepted by the Command primitive command dialog attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CommandDialogAttributeOptions } from '@kovojs/headless-ui/command';
declare const value: CommandDialogAttributeOptions;Signature
interface CommandDialogAttributeOptions extends CommandState {
contentId?: string;
descriptionId?: string;
titleId?: string;
}CommandCloseAttributeOptions#
Options accepted by the Command primitive command close attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CommandCloseAttributeOptions } from '@kovojs/headless-ui/command';
declare const value: CommandCloseAttributeOptions;Signature
interface CommandCloseAttributeOptions extends CommandState {
contentId?: string;
}CommandInputAttributeOptions#
Options accepted by the Command primitive command input attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CommandInputAttributeOptions } from '@kovojs/headless-ui/command';
declare const value: CommandInputAttributeOptions;Signature
interface CommandInputAttributeOptions extends CommandState {
autocomplete?: string;
descriptionId?: string;
id?: string;
labelledBy?: string;
listboxId?: string;
}CommandListboxAttributeOptions#
Options accepted by the Command primitive command listbox attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CommandListboxAttributeOptions } from '@kovojs/headless-ui/command';
declare const value: CommandListboxAttributeOptions;Signature
interface CommandListboxAttributeOptions extends CommandState {
id?: string;
labelledBy?: string;
}CommandItemAttributeOptions#
Options accepted by the Command primitive command item attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CommandItemAttributeOptions } from '@kovojs/headless-ui/command';
declare const value: CommandItemAttributeOptions;Signature
interface CommandItemAttributeOptions extends CommandState {
id?: string;
itemDisabled?: boolean;
itemLabel?: string;
itemValue: string;
}CommandEmptyAttributeOptions#
Options accepted by the Command primitive command empty attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CommandEmptyAttributeOptions } from '@kovojs/headless-ui/command';
declare const value: CommandEmptyAttributeOptions;Signature
interface CommandEmptyAttributeOptions extends CommandState {
id?: string;
}CommandMoveResult#
Result returned by the Command primitive command move.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CommandMoveResult } from '@kovojs/headless-ui/command';
declare const value: CommandMoveResult;Signature
interface CommandMoveResult {
highlightedIndex: number;
highlightedValue: string | undefined;
}CommandPrimitiveAttributes#
Serializable attribute record returned by Command primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { CommandPrimitiveAttributes } from '@kovojs/headless-ui/command';
declare const value: CommandPrimitiveAttributes;Signature
type CommandPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | number | string>>;@kovojs/headless-ui/context-menu#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/context-menu.ts
Values#
contextMenuRootAttributes#
Builds the context menu root attributes record for the Context Menu primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { contextMenuRootAttributes } from '@kovojs/headless-ui/context-menu';
declare const input: Parameters<typeof contextMenuRootAttributes>[0];
const result = contextMenuRootAttributes(input);Signature
function contextMenuRootAttributes(
options: ContextMenuRootAttributeOptions = {},
): ContextMenuPrimitiveAttributes;contextMenuTriggerAttributes#
Builds the context menu trigger attributes record for the Context Menu primitive.
Emits aria-controls, aria-disabled, aria-expanded, aria-haspopup, aria-labelledby.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { contextMenuTriggerAttributes } from '@kovojs/headless-ui/context-menu';
declare const input: Parameters<typeof contextMenuTriggerAttributes>[0];
const result = contextMenuTriggerAttributes(input);Signature
function contextMenuTriggerAttributes(
options: ContextMenuTriggerAttributeOptions = {},
): ContextMenuPrimitiveAttributes;contextMenuContentAttributes#
Builds the context menu content attributes record for the Context Menu primitive.
Emits aria-labelledby, data-anchor-x, data-anchor-y.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { contextMenuContentAttributes } from '@kovojs/headless-ui/context-menu';
declare const input: Parameters<typeof contextMenuContentAttributes>[0];
const result = contextMenuContentAttributes(input);Signature
function contextMenuContentAttributes(
options: ContextMenuContentAttributeOptions = {},
): ContextMenuPrimitiveAttributes;contextMenuItemAttributes#
Builds the context menu item attributes record for the Context Menu primitive.
Emits aria-disabled.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { contextMenuItemAttributes } from '@kovojs/headless-ui/context-menu';
declare const input: Parameters<typeof contextMenuItemAttributes>[0];
const result = contextMenuItemAttributes(input);Signature
function contextMenuItemAttributes(
options: ContextMenuItemAttributeOptions,
): ContextMenuPrimitiveAttributes;contextMenuGroupAttributes#
Builds the context menu group attributes record for the Context Menu primitive.
Emits aria-labelledby.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { contextMenuGroupAttributes } from '@kovojs/headless-ui/context-menu';
declare const input: Parameters<typeof contextMenuGroupAttributes>[0];
const result = contextMenuGroupAttributes(input);Signature
function contextMenuGroupAttributes(
options: ContextMenuGroupAttributeOptions = {},
): ContextMenuPrimitiveAttributes;contextMenuSeparatorAttributes#
Builds the context menu separator attributes record for the Context Menu primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { contextMenuSeparatorAttributes } from '@kovojs/headless-ui/context-menu';
declare const input: Parameters<typeof contextMenuSeparatorAttributes>[0];
const result = contextMenuSeparatorAttributes(input);Signature
function contextMenuSeparatorAttributes(
options: ContextMenuSeparatorAttributeOptions = {},
): ContextMenuPrimitiveAttributes;Supporting types#
ContextMenuPoint#
Public interface used by the Context Menu primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ContextMenuPoint } from '@kovojs/headless-ui/context-menu';
declare const value: ContextMenuPoint;Signature
interface ContextMenuPoint {
x: number;
y: number;
}ContextMenuItem#
Public interface used by the Context Menu primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ContextMenuItem } from '@kovojs/headless-ui/context-menu';
declare const value: ContextMenuItem;Signature
interface ContextMenuItem {
disabled?: boolean;
label?: string;
textValue?: string;
value: string;
}ContextMenuState#
State snapshot consumed by the Context Menu primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ContextMenuState } from '@kovojs/headless-ui/context-menu';
declare const value: ContextMenuState;Signature
interface ContextMenuState {
disabled?: boolean;
highlightedValue?: string;
items?: readonly ContextMenuItem[];
open?: boolean;
point?: ContextMenuPoint;
}ContextMenuRootAttributeOptions#
Options accepted by the Context Menu primitive context menu root attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ContextMenuRootAttributeOptions } from '@kovojs/headless-ui/context-menu';
declare const value: ContextMenuRootAttributeOptions;Signature
interface ContextMenuRootAttributeOptions extends ContextMenuState {
id?: string;
}ContextMenuTriggerAttributeOptions#
Options accepted by the Context Menu primitive context menu trigger attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ContextMenuTriggerAttributeOptions } from '@kovojs/headless-ui/context-menu';
declare const value: ContextMenuTriggerAttributeOptions;Signature
interface ContextMenuTriggerAttributeOptions extends ContextMenuState {
contentId?: string;
id?: string;
labelledBy?: string;
}ContextMenuContentAttributeOptions#
Options accepted by the Context Menu primitive context menu content attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ContextMenuContentAttributeOptions } from '@kovojs/headless-ui/context-menu';
declare const value: ContextMenuContentAttributeOptions;Signature
interface ContextMenuContentAttributeOptions extends ContextMenuState {
id?: string;
labelledBy?: string;
}ContextMenuItemAttributeOptions#
Options accepted by the Context Menu primitive context menu item attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ContextMenuItemAttributeOptions } from '@kovojs/headless-ui/context-menu';
declare const value: ContextMenuItemAttributeOptions;Signature
interface ContextMenuItemAttributeOptions extends ContextMenuState {
id?: string;
itemDisabled?: boolean;
itemLabel?: string;
itemValue: string;
}ContextMenuGroupAttributeOptions#
Options accepted by the Context Menu primitive context menu group attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ContextMenuGroupAttributeOptions } from '@kovojs/headless-ui/context-menu';
declare const value: ContextMenuGroupAttributeOptions;Signature
interface ContextMenuGroupAttributeOptions extends ContextMenuState {
id?: string;
labelledBy?: string;
}ContextMenuSeparatorAttributeOptions#
Options accepted by the Context Menu primitive context menu separator attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ContextMenuSeparatorAttributeOptions } from '@kovojs/headless-ui/context-menu';
declare const value: ContextMenuSeparatorAttributeOptions;Signature
interface ContextMenuSeparatorAttributeOptions {
id?: string;
}ContextMenuMoveResult#
Result returned by the Context Menu primitive context menu move.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ContextMenuMoveResult } from '@kovojs/headless-ui/context-menu';
declare const value: ContextMenuMoveResult;Signature
interface ContextMenuMoveResult {
highlightedIndex: number;
highlightedValue: string | undefined;
}ContextMenuTypeaheadOptions#
Options accepted by the Context Menu primitive context menu typeahead.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ContextMenuTypeaheadOptions } from '@kovojs/headless-ui/context-menu';
declare const value: ContextMenuTypeaheadOptions;Signature
interface ContextMenuTypeaheadOptions {
currentValue?: string;
loop?: boolean;
now: number;
state?: TypeaheadState;
timeoutMs?: number;
}ContextMenuTypeaheadResult#
Result returned by the Context Menu primitive context menu typeahead.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ContextMenuTypeaheadResult } from '@kovojs/headless-ui/context-menu';
declare const value: ContextMenuTypeaheadResult;Signature
interface ContextMenuTypeaheadResult extends ContextMenuMoveResult {
state: TypeaheadState;
}ContextMenuPrimitiveAttributes#
Serializable attribute record returned by Context Menu primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ContextMenuPrimitiveAttributes } from '@kovojs/headless-ui/context-menu';
declare const value: ContextMenuPrimitiveAttributes;Signature
type ContextMenuPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | number | string>>;ContextMenuFocusEvent#
Event shape consumed by the Context Menu primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ContextMenuFocusEvent } from '@kovojs/headless-ui/context-menu';
declare const value: ContextMenuFocusEvent;Signature
type ContextMenuFocusEvent = Event & {
readonly currentTarget?: {
ownerDocument?: {
getElementById?: (id: string) => unknown;
};
} | null;
readonly target?: {
ownerDocument?: {
getElementById?: (id: string) => unknown;
};
} | null;
};ContextMenuFocusOptions#
Options accepted by the Context Menu primitive context menu focus.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ContextMenuFocusOptions } from '@kovojs/headless-ui/context-menu';
declare const value: ContextMenuFocusOptions;Signature
interface ContextMenuFocusOptions {
defer?: boolean;
schedule?: (callback: () => void) => void;
}@kovojs/headless-ui/dialog#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/dialog.ts
Values#
dialogRootAttributes#
Builds the dialog root attributes record for the Dialog primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { dialogRootAttributes } from '@kovojs/headless-ui/dialog';
declare const input: Parameters<typeof dialogRootAttributes>[0];
const result = dialogRootAttributes(input);Signature
function dialogRootAttributes(state: DialogState): DialogPrimitiveAttributes;dialogTriggerAttributes#
Builds the dialog trigger attributes record for the Dialog primitive.
Emits aria-controls, aria-expanded, aria-haspopup.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { dialogTriggerAttributes } from '@kovojs/headless-ui/dialog';
declare const input: Parameters<typeof dialogTriggerAttributes>[0];
const result = dialogTriggerAttributes(input);Signature
function dialogTriggerAttributes(
options: DialogAttributeOptions,
): DialogPrimitiveAttributes;dialogContentAttributes#
Builds the dialog content attributes record for the Dialog primitive.
Emits aria-describedby, aria-labelledby, aria-modal.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { dialogContentAttributes } from '@kovojs/headless-ui/dialog';
declare const input: Parameters<typeof dialogContentAttributes>[0];
const result = dialogContentAttributes(input);Signature
function dialogContentAttributes(
options: DialogAttributeOptions,
): DialogPrimitiveAttributes;dialogCloseAttributes#
Builds the dialog close attributes record for the Dialog primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { dialogCloseAttributes } from '@kovojs/headless-ui/dialog';
declare const input: Parameters<typeof dialogCloseAttributes>[0];
const result = dialogCloseAttributes(input);Signature
function dialogCloseAttributes(options: DialogAttributeOptions): DialogPrimitiveAttributes;Supporting types#
DialogState#
State snapshot consumed by the Dialog primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { DialogState } from '@kovojs/headless-ui/dialog';
declare const value: DialogState;Signature
interface DialogState {
disabled?: boolean;
open: boolean;
}DialogAttributeOptions#
Options accepted by the Dialog primitive dialog attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { DialogAttributeOptions } from '@kovojs/headless-ui/dialog';
declare const value: DialogAttributeOptions;Signature
interface DialogAttributeOptions extends DialogState {
contentId?: string;
descriptionId?: string;
dismissible?: boolean;
titleId?: string;
}DialogPrimitiveAttributes#
Serializable attribute record returned by Dialog primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { DialogPrimitiveAttributes } from '@kovojs/headless-ui/dialog';
declare const value: DialogPrimitiveAttributes;Signature
type DialogPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | string>>;@kovojs/headless-ui/disclosure#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/disclosure.ts
Values#
disclosureRootAttributes#
Builds the disclosure root attributes record for the Disclosure primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { disclosureRootAttributes } from '@kovojs/headless-ui/disclosure';
declare const input: Parameters<typeof disclosureRootAttributes>[0];
const result = disclosureRootAttributes(input);Signature
function disclosureRootAttributes(state: DisclosureState): DisclosurePrimitiveAttributes;disclosureTriggerAttributes#
Builds the disclosure trigger attributes record for the Disclosure primitive.
Emits aria-controls, aria-expanded.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { disclosureTriggerAttributes } from '@kovojs/headless-ui/disclosure';
declare const input: Parameters<typeof disclosureTriggerAttributes>[0];
const result = disclosureTriggerAttributes(input);Signature
function disclosureTriggerAttributes(
options: DisclosureAttributeOptions,
): DisclosurePrimitiveAttributes;disclosureContentAttributes#
Builds the disclosure content attributes record for the Disclosure primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { disclosureContentAttributes } from '@kovojs/headless-ui/disclosure';
declare const input: Parameters<typeof disclosureContentAttributes>[0];
const result = disclosureContentAttributes(input);Signature
function disclosureContentAttributes(
options: DisclosureAttributeOptions,
): DisclosurePrimitiveAttributes;Supporting types#
DisclosureState#
State snapshot consumed by the Disclosure primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { DisclosureState } from '@kovojs/headless-ui/disclosure';
declare const value: DisclosureState;Signature
interface DisclosureState {
disabled?: boolean;
open: boolean;
}DisclosureAttributeOptions#
Options accepted by the Disclosure primitive disclosure attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { DisclosureAttributeOptions } from '@kovojs/headless-ui/disclosure';
declare const value: DisclosureAttributeOptions;Signature
interface DisclosureAttributeOptions extends DisclosureState {
contentId?: string;
}DisclosurePrimitiveAttributes#
Serializable attribute record returned by Disclosure primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { DisclosurePrimitiveAttributes } from '@kovojs/headless-ui/disclosure';
declare const value: DisclosurePrimitiveAttributes;Signature
type DisclosurePrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | string>>;@kovojs/headless-ui/dropdown-menu#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/dropdown-menu.ts
Values#
dropdownMenuRootAttributes#
Builds the dropdown menu root attributes record for the Dropdown Menu primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { dropdownMenuRootAttributes } from '@kovojs/headless-ui/dropdown-menu';
declare const input: Parameters<typeof dropdownMenuRootAttributes>[0];
const result = dropdownMenuRootAttributes(input);Signature
function dropdownMenuRootAttributes(
options: DropdownMenuRootAttributeOptions = {},
): DropdownMenuPrimitiveAttributes;dropdownMenuTriggerAttributes#
Builds the dropdown menu trigger attributes record for the Dropdown Menu primitive.
Emits aria-controls, aria-expanded, aria-haspopup, aria-labelledby.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { dropdownMenuTriggerAttributes } from '@kovojs/headless-ui/dropdown-menu';
declare const input: Parameters<typeof dropdownMenuTriggerAttributes>[0];
const result = dropdownMenuTriggerAttributes(input);Signature
function dropdownMenuTriggerAttributes(
options: DropdownMenuTriggerAttributeOptions = {},
): DropdownMenuPrimitiveAttributes;dropdownMenuContentAttributes#
Builds the dropdown menu content attributes record for the Dropdown Menu primitive.
Emits aria-labelledby.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { dropdownMenuContentAttributes } from '@kovojs/headless-ui/dropdown-menu';
declare const input: Parameters<typeof dropdownMenuContentAttributes>[0];
const result = dropdownMenuContentAttributes(input);Signature
function dropdownMenuContentAttributes(
options: DropdownMenuContentAttributeOptions = {},
): DropdownMenuPrimitiveAttributes;dropdownMenuItemAttributes#
Builds the dropdown menu item attributes record for the Dropdown Menu primitive.
Emits aria-disabled.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { dropdownMenuItemAttributes } from '@kovojs/headless-ui/dropdown-menu';
declare const input: Parameters<typeof dropdownMenuItemAttributes>[0];
const result = dropdownMenuItemAttributes(input);Signature
function dropdownMenuItemAttributes(
options: DropdownMenuItemAttributeOptions,
): DropdownMenuPrimitiveAttributes;dropdownMenuGroupAttributes#
Builds the dropdown menu group attributes record for the Dropdown Menu primitive.
Emits aria-labelledby.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { dropdownMenuGroupAttributes } from '@kovojs/headless-ui/dropdown-menu';
declare const input: Parameters<typeof dropdownMenuGroupAttributes>[0];
const result = dropdownMenuGroupAttributes(input);Signature
function dropdownMenuGroupAttributes(
options: DropdownMenuGroupAttributeOptions = {},
): DropdownMenuPrimitiveAttributes;dropdownMenuSeparatorAttributes#
Builds the dropdown menu separator attributes record for the Dropdown Menu primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { dropdownMenuSeparatorAttributes } from '@kovojs/headless-ui/dropdown-menu';
declare const input: Parameters<typeof dropdownMenuSeparatorAttributes>[0];
const result = dropdownMenuSeparatorAttributes(input);Signature
function dropdownMenuSeparatorAttributes(
options: DropdownMenuSeparatorAttributeOptions = {},
): DropdownMenuPrimitiveAttributes;Supporting types#
DropdownMenuItem#
Public interface used by the Dropdown Menu primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { DropdownMenuItem } from '@kovojs/headless-ui/dropdown-menu';
declare const value: DropdownMenuItem;Signature
interface DropdownMenuItem {
disabled?: boolean;
label?: string;
textValue?: string;
value: string;
}DropdownMenuState#
State snapshot consumed by the Dropdown Menu primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { DropdownMenuState } from '@kovojs/headless-ui/dropdown-menu';
declare const value: DropdownMenuState;Signature
interface DropdownMenuState {
disabled?: boolean;
highlightedValue?: string;
items?: readonly DropdownMenuItem[];
open?: boolean;
}DropdownMenuRootAttributeOptions#
Options accepted by the Dropdown Menu primitive dropdown menu root attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { DropdownMenuRootAttributeOptions } from '@kovojs/headless-ui/dropdown-menu';
declare const value: DropdownMenuRootAttributeOptions;Signature
interface DropdownMenuRootAttributeOptions extends DropdownMenuState {
id?: string;
}DropdownMenuTriggerAttributeOptions#
Options accepted by the Dropdown Menu primitive dropdown menu trigger attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { DropdownMenuTriggerAttributeOptions } from '@kovojs/headless-ui/dropdown-menu';
declare const value: DropdownMenuTriggerAttributeOptions;Signature
interface DropdownMenuTriggerAttributeOptions extends DropdownMenuState {
contentId?: string;
id?: string;
labelledBy?: string;
}DropdownMenuContentAttributeOptions#
Options accepted by the Dropdown Menu primitive dropdown menu content attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { DropdownMenuContentAttributeOptions } from '@kovojs/headless-ui/dropdown-menu';
declare const value: DropdownMenuContentAttributeOptions;Signature
interface DropdownMenuContentAttributeOptions extends DropdownMenuState {
id?: string;
labelledBy?: string;
}DropdownMenuItemAttributeOptions#
Options accepted by the Dropdown Menu primitive dropdown menu item attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { DropdownMenuItemAttributeOptions } from '@kovojs/headless-ui/dropdown-menu';
declare const value: DropdownMenuItemAttributeOptions;Signature
interface DropdownMenuItemAttributeOptions extends DropdownMenuState {
id?: string;
itemDisabled?: boolean;
itemLabel?: string;
itemValue: string;
}DropdownMenuGroupAttributeOptions#
Options accepted by the Dropdown Menu primitive dropdown menu group attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { DropdownMenuGroupAttributeOptions } from '@kovojs/headless-ui/dropdown-menu';
declare const value: DropdownMenuGroupAttributeOptions;Signature
interface DropdownMenuGroupAttributeOptions extends DropdownMenuState {
id?: string;
labelledBy?: string;
}DropdownMenuSeparatorAttributeOptions#
Options accepted by the Dropdown Menu primitive dropdown menu separator attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { DropdownMenuSeparatorAttributeOptions } from '@kovojs/headless-ui/dropdown-menu';
declare const value: DropdownMenuSeparatorAttributeOptions;Signature
interface DropdownMenuSeparatorAttributeOptions {
id?: string;
}DropdownMenuMoveResult#
Result returned by the Dropdown Menu primitive dropdown menu move.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { DropdownMenuMoveResult } from '@kovojs/headless-ui/dropdown-menu';
declare const value: DropdownMenuMoveResult;Signature
interface DropdownMenuMoveResult {
highlightedIndex: number;
highlightedValue: string | undefined;
}DropdownMenuTypeaheadOptions#
Options accepted by the Dropdown Menu primitive dropdown menu typeahead.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { DropdownMenuTypeaheadOptions } from '@kovojs/headless-ui/dropdown-menu';
declare const value: DropdownMenuTypeaheadOptions;Signature
interface DropdownMenuTypeaheadOptions {
currentValue?: string;
loop?: boolean;
now: number;
state?: TypeaheadState;
timeoutMs?: number;
}DropdownMenuTypeaheadResult#
Result returned by the Dropdown Menu primitive dropdown menu typeahead.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { DropdownMenuTypeaheadResult } from '@kovojs/headless-ui/dropdown-menu';
declare const value: DropdownMenuTypeaheadResult;Signature
interface DropdownMenuTypeaheadResult extends DropdownMenuMoveResult {
state: TypeaheadState;
}DropdownMenuPrimitiveAttributes#
Serializable attribute record returned by Dropdown Menu primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { DropdownMenuPrimitiveAttributes } from '@kovojs/headless-ui/dropdown-menu';
declare const value: DropdownMenuPrimitiveAttributes;Signature
type DropdownMenuPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | number | string>>;DropdownMenuFocusEvent#
Event shape consumed by the Dropdown Menu primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { DropdownMenuFocusEvent } from '@kovojs/headless-ui/dropdown-menu';
declare const value: DropdownMenuFocusEvent;Signature
type DropdownMenuFocusEvent = Event & {
readonly currentTarget?: {
ownerDocument?: {
getElementById?: (id: string) => unknown;
};
} | null;
readonly target?: {
ownerDocument?: {
getElementById?: (id: string) => unknown;
};
} | null;
};DropdownMenuFocusOptions#
Options accepted by the Dropdown Menu primitive dropdown menu focus.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { DropdownMenuFocusOptions } from '@kovojs/headless-ui/dropdown-menu';
declare const value: DropdownMenuFocusOptions;Signature
interface DropdownMenuFocusOptions {
defer?: boolean;
schedule?: (callback: () => void) => void;
}@kovojs/headless-ui/field#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/field.ts
Values#
fieldRootAttributes#
Builds the field root attributes record for the Field primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { fieldRootAttributes } from '@kovojs/headless-ui/field';
declare const input: Parameters<typeof fieldRootAttributes>[0];
const result = fieldRootAttributes(input);Signature
function fieldRootAttributes(options: FieldAttributeOptions = {}): FieldPrimitiveAttributes;fieldLabelAttributes#
Builds the field label attributes record for the Field primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { fieldLabelAttributes } from '@kovojs/headless-ui/field';
declare const input: Parameters<typeof fieldLabelAttributes>[0];
const result = fieldLabelAttributes(input);Signature
function fieldLabelAttributes(
options: FieldLabelAttributeOptions = {},
): FieldPrimitiveAttributes;fieldControlAttributes#
Builds the field control attributes record for the Field primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { fieldControlAttributes } from '@kovojs/headless-ui/field';
declare const input: Parameters<typeof fieldControlAttributes>[0];
const result = fieldControlAttributes(input);Signature
function fieldControlAttributes(
options: FieldControlAttributeOptions = {},
): FieldPrimitiveAttributes;fieldDescriptionAttributes#
Builds the field description attributes record for the Field primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { fieldDescriptionAttributes } from '@kovojs/headless-ui/field';
declare const input: Parameters<typeof fieldDescriptionAttributes>[0];
const result = fieldDescriptionAttributes(input);Signature
function fieldDescriptionAttributes(
options: FieldMessageAttributeOptions = {},
): FieldPrimitiveAttributes;fieldErrorAttributes#
Builds the field error attributes record for the Field primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { fieldErrorAttributes } from '@kovojs/headless-ui/field';
declare const input: Parameters<typeof fieldErrorAttributes>[0];
const result = fieldErrorAttributes(input);Signature
function fieldErrorAttributes(
options: FieldMessageAttributeOptions = {},
): FieldPrimitiveAttributes;fieldsetRootAttributes#
Builds the fieldset root attributes record for the Field primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { fieldsetRootAttributes } from '@kovojs/headless-ui/field';
declare const input: Parameters<typeof fieldsetRootAttributes>[0];
const result = fieldsetRootAttributes(input);Signature
function fieldsetRootAttributes(
options: FieldsetAttributeOptions = {},
): FieldPrimitiveAttributes;fieldsetLegendAttributes#
Builds the fieldset legend attributes record for the Field primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { fieldsetLegendAttributes } from '@kovojs/headless-ui/field';
declare const input: Parameters<typeof fieldsetLegendAttributes>[0];
const result = fieldsetLegendAttributes(input);Signature
function fieldsetLegendAttributes(
options: FieldAttributeOptions = {},
): FieldPrimitiveAttributes;Supporting types#
FieldAttributeOptions#
Options accepted by the Field primitive field attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { FieldAttributeOptions } from '@kovojs/headless-ui/field';
declare const value: FieldAttributeOptions;Signature
interface FieldAttributeOptions {
id?: string;
disabled?: boolean;
invalid?: boolean;
required?: boolean;
}FieldControlAttributeOptions#
Options accepted by the Field primitive field control attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { FieldControlAttributeOptions } from '@kovojs/headless-ui/field';
declare const value: FieldControlAttributeOptions;Signature
interface FieldControlAttributeOptions extends FieldAttributeOptions {
autoComplete?: string;
descriptionId?: string;
errorId?: string;
form?: string;
inputMode?: string;
maxLength?: number;
minLength?: number;
name?: string;
pattern?: string;
}FieldLabelAttributeOptions#
Options accepted by the Field primitive field label attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { FieldLabelAttributeOptions } from '@kovojs/headless-ui/field';
declare const value: FieldLabelAttributeOptions;Signature
interface FieldLabelAttributeOptions extends FieldAttributeOptions {
controlId?: string;
}FieldMessageAttributeOptions#
Options accepted by the Field primitive field message attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { FieldMessageAttributeOptions } from '@kovojs/headless-ui/field';
declare const value: FieldMessageAttributeOptions;Signature
interface FieldMessageAttributeOptions extends FieldAttributeOptions {
visible?: boolean;
}FieldsetAttributeOptions#
Options accepted by the Field primitive fieldset attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { FieldsetAttributeOptions } from '@kovojs/headless-ui/field';
declare const value: FieldsetAttributeOptions;Signature
interface FieldsetAttributeOptions extends FieldAttributeOptions {
descriptionId?: string;
errorId?: string;
form?: string;
name?: string;
}FieldPrimitiveAttributes#
Serializable attribute record returned by Field primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { FieldPrimitiveAttributes } from '@kovojs/headless-ui/field';
declare const value: FieldPrimitiveAttributes;Signature
type FieldPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | number | string>>;@kovojs/headless-ui/hover-card#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/hover-card.ts
Values#
hoverCardRootAttributes#
Builds the hover card root attributes record for the Hover Card primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { hoverCardRootAttributes } from '@kovojs/headless-ui/hover-card';
declare const input: Parameters<typeof hoverCardRootAttributes>[0];
const result = hoverCardRootAttributes(input);Signature
function hoverCardRootAttributes(state: HoverCardState): HoverCardPrimitiveAttributes;hoverCardTriggerAttributes#
Builds the hover card trigger attributes record for the Hover Card primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { hoverCardTriggerAttributes } from '@kovojs/headless-ui/hover-card';
declare const input: Parameters<typeof hoverCardTriggerAttributes>[0];
const result = hoverCardTriggerAttributes(input);Signature
function hoverCardTriggerAttributes(
options: HoverCardAttributeOptions,
): HoverCardPrimitiveAttributes;hoverCardContentAttributes#
Builds the hover card content attributes record for the Hover Card primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { hoverCardContentAttributes } from '@kovojs/headless-ui/hover-card';
declare const input: Parameters<typeof hoverCardContentAttributes>[0];
const result = hoverCardContentAttributes(input);Signature
function hoverCardContentAttributes(
options: HoverCardAttributeOptions,
): HoverCardPrimitiveAttributes;Supporting types#
HoverCardState#
State snapshot consumed by the Hover Card primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { HoverCardState } from '@kovojs/headless-ui/hover-card';
declare const value: HoverCardState;Signature
interface HoverCardState {
disabled?: boolean;
open: boolean;
}HoverCardAttributeOptions#
Options accepted by the Hover Card primitive hover card attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { HoverCardAttributeOptions } from '@kovojs/headless-ui/hover-card';
declare const value: HoverCardAttributeOptions;Signature
interface HoverCardAttributeOptions extends HoverCardState {
contentId?: string;
}HoverCardPrimitiveAttributes#
Serializable attribute record returned by Hover Card primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { HoverCardPrimitiveAttributes } from '@kovojs/headless-ui/hover-card';
declare const value: HoverCardPrimitiveAttributes;Signature
type HoverCardPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | string>>;@kovojs/headless-ui/menubar#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/menubar.ts
Values#
menubarRootAttributes#
Builds the menubar root attributes record for the Menubar primitive.
Emits aria-describedby, aria-disabled, aria-label, aria-labelledby, aria-orientation.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { menubarRootAttributes } from '@kovojs/headless-ui/menubar';
declare const input: Parameters<typeof menubarRootAttributes>[0];
const result = menubarRootAttributes(input);Signature
function menubarRootAttributes(
options: MenubarRootAttributeOptions = {},
): MenubarPrimitiveAttributes;menubarItemAttributes#
Builds the menubar item attributes record for the Menubar primitive.
Emits aria-controls, aria-disabled, aria-expanded, aria-haspopup.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { menubarItemAttributes } from '@kovojs/headless-ui/menubar';
declare const input: Parameters<typeof menubarItemAttributes>[0];
const result = menubarItemAttributes(input);Signature
function menubarItemAttributes(
options: MenubarItemAttributeOptions,
): MenubarPrimitiveAttributes;menubarSubmenuAttributes#
Builds the menubar submenu attributes record for the Menubar primitive.
Emits aria-labelledby.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { menubarSubmenuAttributes } from '@kovojs/headless-ui/menubar';
declare const input: Parameters<typeof menubarSubmenuAttributes>[0];
const result = menubarSubmenuAttributes(input);Signature
function menubarSubmenuAttributes(
options: MenubarSubmenuAttributeOptions,
): MenubarPrimitiveAttributes;menubarGroupAttributes#
Builds the menubar group attributes record for the Menubar primitive.
Emits aria-labelledby.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { menubarGroupAttributes } from '@kovojs/headless-ui/menubar';
declare const input: Parameters<typeof menubarGroupAttributes>[0];
const result = menubarGroupAttributes(input);Signature
function menubarGroupAttributes(
options: MenubarGroupAttributeOptions = {},
): MenubarPrimitiveAttributes;menubarSeparatorAttributes#
Builds the menubar separator attributes record for the Menubar primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { menubarSeparatorAttributes } from '@kovojs/headless-ui/menubar';
declare const input: Parameters<typeof menubarSeparatorAttributes>[0];
const result = menubarSeparatorAttributes(input);Signature
function menubarSeparatorAttributes(
options: MenubarSeparatorAttributeOptions = {},
): MenubarPrimitiveAttributes;Supporting types#
MenubarItem#
Public interface used by the Menubar primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { MenubarItem } from '@kovojs/headless-ui/menubar';
declare const value: MenubarItem;Signature
interface MenubarItem {
disabled?: boolean;
hasPopup?: boolean;
label?: string;
parentValue?: string;
textValue?: string;
value: string;
}MenubarState#
State snapshot consumed by the Menubar primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { MenubarState } from '@kovojs/headless-ui/menubar';
declare const value: MenubarState;Signature
interface MenubarState {
activeValue?: string;
dir?: TextDirection;
disabled?: boolean;
items?: readonly MenubarItem[];
loop?: boolean;
openValue?: string | undefined;
orientation?: CollectionOrientation;
}MenubarRootAttributeOptions#
Options accepted by the Menubar primitive menubar root attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { MenubarRootAttributeOptions } from '@kovojs/headless-ui/menubar';
declare const value: MenubarRootAttributeOptions;Signature
interface MenubarRootAttributeOptions extends MenubarState {
descriptionId?: string;
id?: string;
label?: string;
labelledBy?: string;
}MenubarItemAttributeOptions#
Options accepted by the Menubar primitive menubar item attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { MenubarItemAttributeOptions } from '@kovojs/headless-ui/menubar';
declare const value: MenubarItemAttributeOptions;Signature
interface MenubarItemAttributeOptions extends MenubarState {
contentId?: string;
id?: string;
itemDisabled?: boolean;
itemLabel?: string;
itemParentValue?: string;
itemValue: string;
}MenubarSubmenuAttributeOptions#
Options accepted by the Menubar primitive menubar submenu attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { MenubarSubmenuAttributeOptions } from '@kovojs/headless-ui/menubar';
declare const value: MenubarSubmenuAttributeOptions;Signature
interface MenubarSubmenuAttributeOptions extends MenubarState {
id?: string;
labelledBy?: string;
value: string;
}MenubarGroupAttributeOptions#
Options accepted by the Menubar primitive menubar group attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { MenubarGroupAttributeOptions } from '@kovojs/headless-ui/menubar';
declare const value: MenubarGroupAttributeOptions;Signature
interface MenubarGroupAttributeOptions extends MenubarState {
id?: string;
labelledBy?: string;
}MenubarSeparatorAttributeOptions#
Options accepted by the Menubar primitive menubar separator attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { MenubarSeparatorAttributeOptions } from '@kovojs/headless-ui/menubar';
declare const value: MenubarSeparatorAttributeOptions;Signature
interface MenubarSeparatorAttributeOptions {
id?: string;
}MenubarMoveOptions#
Options accepted by the Menubar primitive menubar move.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { MenubarMoveOptions } from '@kovojs/headless-ui/menubar';
declare const value: MenubarMoveOptions;Signature
interface MenubarMoveOptions {
loop?: boolean;
parentValue?: string;
}MenubarMoveResult#
Result returned by the Menubar primitive menubar move.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { MenubarMoveResult } from '@kovojs/headless-ui/menubar';
declare const value: MenubarMoveResult;Signature
interface MenubarMoveResult {
activeIndex: number;
activeValue: string | undefined;
parentValue: string | undefined;
}MenubarTypeaheadOptions#
Options accepted by the Menubar primitive menubar typeahead.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { MenubarTypeaheadOptions } from '@kovojs/headless-ui/menubar';
declare const value: MenubarTypeaheadOptions;Signature
interface MenubarTypeaheadOptions extends MenubarMoveOptions {
currentValue?: string;
now: number;
state?: TypeaheadState;
timeoutMs?: number;
}MenubarTypeaheadResult#
Result returned by the Menubar primitive menubar typeahead.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { MenubarTypeaheadResult } from '@kovojs/headless-ui/menubar';
declare const value: MenubarTypeaheadResult;Signature
interface MenubarTypeaheadResult extends MenubarMoveResult {
state: TypeaheadState;
}MenubarPrimitiveAttributes#
Serializable attribute record returned by Menubar primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { MenubarPrimitiveAttributes } from '@kovojs/headless-ui/menubar';
declare const value: MenubarPrimitiveAttributes;Signature
type MenubarPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | number | string>>;MenubarFocusEvent#
Event shape consumed by the Menubar primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { MenubarFocusEvent } from '@kovojs/headless-ui/menubar';
declare const value: MenubarFocusEvent;Signature
type MenubarFocusEvent = Event & {
readonly currentTarget?: {
ownerDocument?: {
getElementById?: (id: string) => unknown;
};
} | null;
readonly target?: {
ownerDocument?: {
getElementById?: (id: string) => unknown;
};
} | null;
};MenubarFocusOptions#
Options accepted by the Menubar primitive menubar focus.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { MenubarFocusOptions } from '@kovojs/headless-ui/menubar';
declare const value: MenubarFocusOptions;Signature
interface MenubarFocusOptions {
defer?: boolean;
schedule?: (callback: () => void) => void;
}@kovojs/headless-ui/meter#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/meter.ts
Values#
meterRootAttributes#
Builds the meter root attributes record for the Meter primitive.
Emits aria-valuetext, data-high, data-low, data-max, data-min, data-optimum, data-state, data-value.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { meterRootAttributes } from '@kovojs/headless-ui/meter';
declare const input: Parameters<typeof meterRootAttributes>[0];
const result = meterRootAttributes(input);Signature
function meterRootAttributes(options: MeterAttributeOptions = {}): MeterPrimitiveAttributes;Supporting types#
MeterDataState#
State snapshot consumed by the Meter primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { MeterDataState } from '@kovojs/headless-ui/meter';
declare const value: MeterDataState;Signature
type MeterDataState = 'even-less-good' | 'optimum' | 'suboptimum';MeterAttributeOptions#
Options accepted by the Meter primitive meter attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { MeterAttributeOptions } from '@kovojs/headless-ui/meter';
declare const value: MeterAttributeOptions;Signature
interface MeterAttributeOptions {
high?: number;
low?: number;
max?: number;
min?: number;
optimum?: number;
value?: number;
valueText?: string;
}MeterComputedState#
State snapshot consumed by the Meter primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { MeterComputedState } from '@kovojs/headless-ui/meter';
declare const value: MeterComputedState;Signature
interface MeterComputedState {
high: number;
low: number;
max: number;
min: number;
optimum: number;
state: MeterDataState;
value: number;
valueRatio: number;
}MeterPrimitiveAttributes#
Serializable attribute record returned by Meter primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { MeterPrimitiveAttributes } from '@kovojs/headless-ui/meter';
declare const value: MeterPrimitiveAttributes;Signature
type MeterPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, number | string>>;@kovojs/headless-ui/navigation-menu#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/navigation-menu.ts
Values#
navigationMenuRootAttributes#
Builds the navigation menu root attributes record for the Navigation Menu primitive.
Emits aria-describedby, aria-disabled, aria-label, aria-labelledby, aria-orientation.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { navigationMenuRootAttributes } from '@kovojs/headless-ui/navigation-menu';
declare const input: Parameters<typeof navigationMenuRootAttributes>[0];
const result = navigationMenuRootAttributes(input);Signature
function navigationMenuRootAttributes(
options: NavigationMenuRootAttributeOptions = {},
): NavigationMenuPrimitiveAttributes;navigationMenuListAttributes#
Builds the navigation menu list attributes record for the Navigation Menu primitive.
Emits aria-labelledby.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { navigationMenuListAttributes } from '@kovojs/headless-ui/navigation-menu';
declare const input: Parameters<typeof navigationMenuListAttributes>[0];
const result = navigationMenuListAttributes(input);Signature
function navigationMenuListAttributes(
options: NavigationMenuListAttributeOptions = {},
): NavigationMenuPrimitiveAttributes;navigationMenuItemAttributes#
Builds the navigation menu item attributes record for the Navigation Menu primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { navigationMenuItemAttributes } from '@kovojs/headless-ui/navigation-menu';
declare const input: Parameters<typeof navigationMenuItemAttributes>[0];
const result = navigationMenuItemAttributes(input);Signature
function navigationMenuItemAttributes(
options: NavigationMenuItemAttributeOptions,
): NavigationMenuPrimitiveAttributes;navigationMenuTriggerAttributes#
Builds the navigation menu trigger attributes record for the Navigation Menu primitive.
Emits aria-controls, aria-expanded, aria-haspopup.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { navigationMenuTriggerAttributes } from '@kovojs/headless-ui/navigation-menu';
declare const input: Parameters<typeof navigationMenuTriggerAttributes>[0];
const result = navigationMenuTriggerAttributes(input);Signature
function navigationMenuTriggerAttributes(
options: NavigationMenuTriggerAttributeOptions,
): NavigationMenuPrimitiveAttributes;navigationMenuContentAttributes#
Builds the navigation menu content attributes record for the Navigation Menu primitive.
Emits aria-labelledby.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { navigationMenuContentAttributes } from '@kovojs/headless-ui/navigation-menu';
declare const input: Parameters<typeof navigationMenuContentAttributes>[0];
const result = navigationMenuContentAttributes(input);Signature
function navigationMenuContentAttributes(
options: NavigationMenuContentAttributeOptions,
): NavigationMenuPrimitiveAttributes;navigationMenuLinkAttributes#
Builds the navigation menu link attributes record for the Navigation Menu primitive.
Emits aria-disabled.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { navigationMenuLinkAttributes } from '@kovojs/headless-ui/navigation-menu';
declare const input: Parameters<typeof navigationMenuLinkAttributes>[0];
const result = navigationMenuLinkAttributes(input);Signature
function navigationMenuLinkAttributes(
options: NavigationMenuLinkAttributeOptions,
): NavigationMenuPrimitiveAttributes;navigationMenuViewportAttributes#
Builds the navigation menu viewport attributes record for the Navigation Menu primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { navigationMenuViewportAttributes } from '@kovojs/headless-ui/navigation-menu';
declare const input: Parameters<typeof navigationMenuViewportAttributes>[0];
const result = navigationMenuViewportAttributes(input);Signature
function navigationMenuViewportAttributes(
options: NavigationMenuViewportAttributeOptions = {},
): NavigationMenuPrimitiveAttributes;navigationMenuIndicatorAttributes#
Builds the navigation menu indicator attributes record for the Navigation Menu primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { navigationMenuIndicatorAttributes } from '@kovojs/headless-ui/navigation-menu';
declare const input: Parameters<typeof navigationMenuIndicatorAttributes>[0];
const result = navigationMenuIndicatorAttributes(input);Signature
function navigationMenuIndicatorAttributes(
options: NavigationMenuIndicatorAttributeOptions = {},
): NavigationMenuPrimitiveAttributes;Supporting types#
NavigationMenuItem#
Public interface used by the Navigation Menu primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { NavigationMenuItem } from '@kovojs/headless-ui/navigation-menu';
declare const value: NavigationMenuItem;Signature
interface NavigationMenuItem {
disabled?: boolean;
hasContent?: boolean;
label?: string;
textValue?: string;
value: string;
}NavigationMenuState#
State snapshot consumed by the Navigation Menu primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { NavigationMenuState } from '@kovojs/headless-ui/navigation-menu';
declare const value: NavigationMenuState;Signature
interface NavigationMenuState {
activeValue?: string;
dir?: TextDirection;
disabled?: boolean;
items?: readonly NavigationMenuItem[];
loop?: boolean;
openValue?: string | undefined;
orientation?: CollectionOrientation;
}NavigationMenuRootAttributeOptions#
Options accepted by the Navigation Menu primitive navigation menu root attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { NavigationMenuRootAttributeOptions } from '@kovojs/headless-ui/navigation-menu';
declare const value: NavigationMenuRootAttributeOptions;Signature
interface NavigationMenuRootAttributeOptions extends NavigationMenuState {
descriptionId?: string;
id?: string;
label?: string;
labelledBy?: string;
}NavigationMenuListAttributeOptions#
Options accepted by the Navigation Menu primitive navigation menu list attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { NavigationMenuListAttributeOptions } from '@kovojs/headless-ui/navigation-menu';
declare const value: NavigationMenuListAttributeOptions;Signature
interface NavigationMenuListAttributeOptions extends NavigationMenuState {
id?: string;
labelledBy?: string;
}NavigationMenuItemAttributeOptions#
Options accepted by the Navigation Menu primitive navigation menu item attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { NavigationMenuItemAttributeOptions } from '@kovojs/headless-ui/navigation-menu';
declare const value: NavigationMenuItemAttributeOptions;Signature
interface NavigationMenuItemAttributeOptions extends NavigationMenuState {
id?: string;
itemDisabled?: boolean;
itemValue: string;
}NavigationMenuTriggerAttributeOptions#
Options accepted by the Navigation Menu primitive navigation menu trigger attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { NavigationMenuTriggerAttributeOptions } from '@kovojs/headless-ui/navigation-menu';
declare const value: NavigationMenuTriggerAttributeOptions;Signature
interface NavigationMenuTriggerAttributeOptions extends NavigationMenuState {
contentId?: string;
id?: string;
itemDisabled?: boolean;
itemLabel?: string;
itemValue: string;
}NavigationMenuContentAttributeOptions#
Options accepted by the Navigation Menu primitive navigation menu content attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { NavigationMenuContentAttributeOptions } from '@kovojs/headless-ui/navigation-menu';
declare const value: NavigationMenuContentAttributeOptions;Signature
interface NavigationMenuContentAttributeOptions extends NavigationMenuState {
id?: string;
labelledBy?: string;
value: string;
}NavigationMenuLinkAttributeOptions#
Options accepted by the Navigation Menu primitive navigation menu link attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { NavigationMenuLinkAttributeOptions } from '@kovojs/headless-ui/navigation-menu';
declare const value: NavigationMenuLinkAttributeOptions;Signature
interface NavigationMenuLinkAttributeOptions extends NavigationMenuState {
href?: string;
id?: string;
itemDisabled?: boolean;
itemLabel?: string;
itemValue: string;
}NavigationMenuViewportAttributeOptions#
Options accepted by the Navigation Menu primitive navigation menu viewport attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { NavigationMenuViewportAttributeOptions } from '@kovojs/headless-ui/navigation-menu';
declare const value: NavigationMenuViewportAttributeOptions;Signature
interface NavigationMenuViewportAttributeOptions extends NavigationMenuState {
id?: string;
}NavigationMenuIndicatorAttributeOptions#
Options accepted by the Navigation Menu primitive navigation menu indicator attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { NavigationMenuIndicatorAttributeOptions } from '@kovojs/headless-ui/navigation-menu';
declare const value: NavigationMenuIndicatorAttributeOptions;Signature
interface NavigationMenuIndicatorAttributeOptions extends NavigationMenuState {
id?: string;
}NavigationMenuMoveOptions#
Options accepted by the Navigation Menu primitive navigation menu move.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { NavigationMenuMoveOptions } from '@kovojs/headless-ui/navigation-menu';
declare const value: NavigationMenuMoveOptions;Signature
interface NavigationMenuMoveOptions {
loop?: boolean;
}NavigationMenuMoveResult#
Result returned by the Navigation Menu primitive navigation menu move.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { NavigationMenuMoveResult } from '@kovojs/headless-ui/navigation-menu';
declare const value: NavigationMenuMoveResult;Signature
interface NavigationMenuMoveResult {
activeIndex: number;
activeValue: string | undefined;
}NavigationMenuTypeaheadOptions#
Options accepted by the Navigation Menu primitive navigation menu typeahead.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { NavigationMenuTypeaheadOptions } from '@kovojs/headless-ui/navigation-menu';
declare const value: NavigationMenuTypeaheadOptions;Signature
interface NavigationMenuTypeaheadOptions extends NavigationMenuMoveOptions {
currentValue?: string;
now: number;
state?: TypeaheadState;
timeoutMs?: number;
}NavigationMenuTypeaheadResult#
Result returned by the Navigation Menu primitive navigation menu typeahead.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { NavigationMenuTypeaheadResult } from '@kovojs/headless-ui/navigation-menu';
declare const value: NavigationMenuTypeaheadResult;Signature
interface NavigationMenuTypeaheadResult extends NavigationMenuMoveResult {
state: TypeaheadState;
}NavigationMenuPrimitiveAttributes#
Serializable attribute record returned by Navigation Menu primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { NavigationMenuPrimitiveAttributes } from '@kovojs/headless-ui/navigation-menu';
declare const value: NavigationMenuPrimitiveAttributes;Signature
type NavigationMenuPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | number | string>>;NavigationMenuFocusEvent#
Event shape consumed by the Navigation Menu primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { NavigationMenuFocusEvent } from '@kovojs/headless-ui/navigation-menu';
declare const value: NavigationMenuFocusEvent;Signature
type NavigationMenuFocusEvent = Event & {
readonly currentTarget?: {
ownerDocument?: {
getElementById?: (id: string) => unknown;
};
} | null;
readonly target?: {
ownerDocument?: {
getElementById?: (id: string) => unknown;
};
} | null;
};NavigationMenuFocusOptions#
Options accepted by the Navigation Menu primitive navigation menu focus.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { NavigationMenuFocusOptions } from '@kovojs/headless-ui/navigation-menu';
declare const value: NavigationMenuFocusOptions;Signature
interface NavigationMenuFocusOptions {
defer?: boolean;
schedule?: (callback: () => void) => void;
}@kovojs/headless-ui/number-field#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/number-field.ts
Values#
numberFieldRootAttributes#
Builds the number field root attributes record for the Number Field primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { numberFieldRootAttributes } from '@kovojs/headless-ui/number-field';
declare const input: Parameters<typeof numberFieldRootAttributes>[0];
const result = numberFieldRootAttributes(input);Signature
function numberFieldRootAttributes(
options: NumberFieldRootAttributeOptions = {},
): NumberFieldPrimitiveAttributes;numberFieldInputAttributes#
Builds the number field input attributes record for the Number Field primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { numberFieldInputAttributes } from '@kovojs/headless-ui/number-field';
declare const input: Parameters<typeof numberFieldInputAttributes>[0];
const result = numberFieldInputAttributes(input);Signature
function numberFieldInputAttributes(
options: NumberFieldInputAttributeOptions = {},
): NumberFieldPrimitiveAttributes;numberFieldIncrementAttributes#
Builds the number field increment attributes record for the Number Field primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { numberFieldIncrementAttributes } from '@kovojs/headless-ui/number-field';
declare const input: Parameters<typeof numberFieldIncrementAttributes>[0];
const result = numberFieldIncrementAttributes(input);Signature
function numberFieldIncrementAttributes(
options: NumberFieldButtonAttributeOptions = {},
): NumberFieldPrimitiveAttributes;numberFieldDecrementAttributes#
Builds the number field decrement attributes record for the Number Field primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { numberFieldDecrementAttributes } from '@kovojs/headless-ui/number-field';
declare const input: Parameters<typeof numberFieldDecrementAttributes>[0];
const result = numberFieldDecrementAttributes(input);Signature
function numberFieldDecrementAttributes(
options: NumberFieldButtonAttributeOptions = {},
): NumberFieldPrimitiveAttributes;numberFieldValueFromString#
Computes number field value from string for the Number Field primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { numberFieldValueFromString } from '@kovojs/headless-ui/number-field';
declare const input: Parameters<typeof numberFieldValueFromString>[0];
const result = numberFieldValueFromString(input);Signature
function numberFieldValueFromString(value: string): NumberFieldValue;Supporting types#
NumberFieldValue#
Public type used by the Number Field primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { NumberFieldValue } from '@kovojs/headless-ui/number-field';
declare const value: NumberFieldValue;Signature
type NumberFieldValue = number | undefined;NumberFieldState#
State snapshot consumed by the Number Field primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { NumberFieldState } from '@kovojs/headless-ui/number-field';
declare const value: NumberFieldState;Signature
interface NumberFieldState {
disabled?: boolean;
invalid?: boolean;
largeStep?: number;
max?: number;
min?: number;
name?: string;
required?: boolean;
smallStep?: number;
step?: number;
value?: NumberFieldValue;
}NumberFieldRootAttributeOptions#
Options accepted by the Number Field primitive number field root attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { NumberFieldRootAttributeOptions } from '@kovojs/headless-ui/number-field';
declare const value: NumberFieldRootAttributeOptions;Signature
interface NumberFieldRootAttributeOptions extends NumberFieldState {
id?: string;
}NumberFieldInputAttributeOptions#
Options accepted by the Number Field primitive number field input attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { NumberFieldInputAttributeOptions } from '@kovojs/headless-ui/number-field';
declare const value: NumberFieldInputAttributeOptions;Signature
interface NumberFieldInputAttributeOptions extends NumberFieldState {
descriptionId?: string;
errorId?: string;
form?: string;
id?: string;
label?: string;
labelledBy?: string;
}NumberFieldButtonAttributeOptions#
Options accepted by the Number Field primitive number field button attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { NumberFieldButtonAttributeOptions } from '@kovojs/headless-ui/number-field';
declare const value: NumberFieldButtonAttributeOptions;Signature
interface NumberFieldButtonAttributeOptions extends NumberFieldState {
id?: string;
inputId?: string;
label?: string;
}NumberFieldPrimitiveAttributes#
Serializable attribute record returned by Number Field primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { NumberFieldPrimitiveAttributes } from '@kovojs/headless-ui/number-field';
declare const value: NumberFieldPrimitiveAttributes;Signature
type NumberFieldPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | number | string>>;@kovojs/headless-ui/otp-field#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/otp-field.ts
Values#
otpFieldRootAttributes#
Builds the otp field root attributes record for the Otp Field primitive.
Emits aria-labelledby.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { otpFieldRootAttributes } from '@kovojs/headless-ui/otp-field';
declare const input: Parameters<typeof otpFieldRootAttributes>[0];
const result = otpFieldRootAttributes(input);Signature
function otpFieldRootAttributes(
options: OtpFieldRootAttributeOptions = {},
): OtpFieldPrimitiveAttributes;otpFieldHiddenInputAttributes#
Builds the otp field hidden input attributes record for the Otp Field primitive.
Emits aria-hidden, data-slot.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { otpFieldHiddenInputAttributes } from '@kovojs/headless-ui/otp-field';
declare const input: Parameters<typeof otpFieldHiddenInputAttributes>[0];
const result = otpFieldHiddenInputAttributes(input);Signature
function otpFieldHiddenInputAttributes(
options: OtpFieldHiddenInputAttributeOptions = {},
): OtpFieldPrimitiveAttributes;otpFieldInputAttributes#
Builds the otp field input attributes record for the Otp Field primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { otpFieldInputAttributes } from '@kovojs/headless-ui/otp-field';
declare const input: Parameters<typeof otpFieldInputAttributes>[0];
const result = otpFieldInputAttributes(input);Signature
function otpFieldInputAttributes(
options: OtpFieldInputAttributeOptions,
): OtpFieldPrimitiveAttributes;Supporting types#
OtpFieldInputMode#
Public type used by the Otp Field primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { OtpFieldInputMode } from '@kovojs/headless-ui/otp-field';
declare const value: OtpFieldInputMode;Signature
type OtpFieldInputMode =
| 'decimal'
| 'email'
| 'none'
| 'numeric'
| 'search'
| 'tel'
| 'text'
| 'url';OtpFieldState#
State snapshot consumed by the Otp Field primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { OtpFieldState } from '@kovojs/headless-ui/otp-field';
declare const value: OtpFieldState;Signature
interface OtpFieldState {
disabled?: boolean;
form?: string;
inputMode?: OtpFieldInputMode;
invalid?: boolean;
length?: number;
name?: string;
pattern?: string;
required?: boolean;
value?: string;
}OtpFieldRootAttributeOptions#
Options accepted by the Otp Field primitive otp field root attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { OtpFieldRootAttributeOptions } from '@kovojs/headless-ui/otp-field';
declare const value: OtpFieldRootAttributeOptions;Signature
interface OtpFieldRootAttributeOptions extends OtpFieldState {
descriptionId?: string;
errorId?: string;
id?: string;
labelledBy?: string;
}OtpFieldHiddenInputAttributeOptions#
Options accepted by the Otp Field primitive otp field hidden input attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { OtpFieldHiddenInputAttributeOptions } from '@kovojs/headless-ui/otp-field';
declare const value: OtpFieldHiddenInputAttributeOptions;Signature
interface OtpFieldHiddenInputAttributeOptions extends OtpFieldState {
id?: string;
}OtpFieldInputAttributeOptions#
Options accepted by the Otp Field primitive otp field input attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { OtpFieldInputAttributeOptions } from '@kovojs/headless-ui/otp-field';
declare const value: OtpFieldInputAttributeOptions;Signature
interface OtpFieldInputAttributeOptions extends OtpFieldState {
id?: string;
label?: string;
labelledBy?: string;
slotIndex: number;
}OtpFieldMoveResult#
Result returned by the Otp Field primitive otp field move.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { OtpFieldMoveResult } from '@kovojs/headless-ui/otp-field';
declare const value: OtpFieldMoveResult;Signature
interface OtpFieldMoveResult {
focusIndex: number;
}OtpFieldPrimitiveAttributes#
Serializable attribute record returned by Otp Field primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { OtpFieldPrimitiveAttributes } from '@kovojs/headless-ui/otp-field';
declare const value: OtpFieldPrimitiveAttributes;Signature
type OtpFieldPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | number | string>>;@kovojs/headless-ui/popover#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/popover.ts
Values#
popoverRootAttributes#
Builds the popover root attributes record for the Popover primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { popoverRootAttributes } from '@kovojs/headless-ui/popover';
declare const input: Parameters<typeof popoverRootAttributes>[0];
const result = popoverRootAttributes(input);Signature
function popoverRootAttributes(state: PopoverState): PopoverPrimitiveAttributes;popoverTriggerAttributes#
Builds the popover trigger attributes record for the Popover primitive.
Emits aria-controls, aria-expanded.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { popoverTriggerAttributes } from '@kovojs/headless-ui/popover';
declare const input: Parameters<typeof popoverTriggerAttributes>[0];
const result = popoverTriggerAttributes(input);Signature
function popoverTriggerAttributes(
options: PopoverAttributeOptions,
): PopoverPrimitiveAttributes;popoverContentAttributes#
Builds the popover content attributes record for the Popover primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { popoverContentAttributes } from '@kovojs/headless-ui/popover';
declare const input: Parameters<typeof popoverContentAttributes>[0];
const result = popoverContentAttributes(input);Signature
function popoverContentAttributes(
options: PopoverAttributeOptions,
): PopoverPrimitiveAttributes;Supporting types#
PopoverState#
State snapshot consumed by the Popover primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { PopoverState } from '@kovojs/headless-ui/popover';
declare const value: PopoverState;Signature
interface PopoverState {
disabled?: boolean;
open: boolean;
}PopoverAttributeOptions#
Options accepted by the Popover primitive popover attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { PopoverAttributeOptions } from '@kovojs/headless-ui/popover';
declare const value: PopoverAttributeOptions;Signature
interface PopoverAttributeOptions extends PopoverState {
contentId?: string;
}PopoverPrimitiveAttributes#
Serializable attribute record returned by Popover primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { PopoverPrimitiveAttributes } from '@kovojs/headless-ui/popover';
declare const value: PopoverPrimitiveAttributes;Signature
type PopoverPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | string>>;@kovojs/headless-ui/progress#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/progress.ts
Values#
progressRootAttributes#
Builds the progress root attributes record for the Progress primitive.
Emits aria-valuetext, data-max, data-state, data-value.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { progressRootAttributes } from '@kovojs/headless-ui/progress';
declare const input: Parameters<typeof progressRootAttributes>[0];
const result = progressRootAttributes(input);Signature
function progressRootAttributes(
options: ProgressAttributeOptions = {},
): ProgressPrimitiveAttributes;Supporting types#
ProgressDataState#
State snapshot consumed by the Progress primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ProgressDataState } from '@kovojs/headless-ui/progress';
declare const value: ProgressDataState;Signature
type ProgressDataState = 'complete' | 'indeterminate' | 'loading';ProgressAttributeOptions#
Options accepted by the Progress primitive progress attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ProgressAttributeOptions } from '@kovojs/headless-ui/progress';
declare const value: ProgressAttributeOptions;Signature
interface ProgressAttributeOptions {
max?: number;
value?: number | null;
valueText?: string;
}ProgressComputedState#
State snapshot consumed by the Progress primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ProgressComputedState } from '@kovojs/headless-ui/progress';
declare const value: ProgressComputedState;Signature
interface ProgressComputedState {
max: number;
state: ProgressDataState;
value: number | null;
valueRatio: number | null;
}ProgressPrimitiveAttributes#
Serializable attribute record returned by Progress primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ProgressPrimitiveAttributes } from '@kovojs/headless-ui/progress';
declare const value: ProgressPrimitiveAttributes;Signature
type ProgressPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, number | string>>;@kovojs/headless-ui/radio-group#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/radio-group.ts
Values#
radioGroupRootAttributes#
Builds the radio group root attributes record for the Radio Group primitive.
Emits aria-labelledby.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { radioGroupRootAttributes } from '@kovojs/headless-ui/radio-group';
declare const input: Parameters<typeof radioGroupRootAttributes>[0];
const result = radioGroupRootAttributes(input);Signature
function radioGroupRootAttributes(
options: RadioGroupRootAttributeOptions = {},
): RadioGroupPrimitiveAttributes;radioGroupItemAttributes#
Builds the radio group item attributes record for the Radio Group primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { radioGroupItemAttributes } from '@kovojs/headless-ui/radio-group';
declare const input: Parameters<typeof radioGroupItemAttributes>[0];
const result = radioGroupItemAttributes(input);Signature
function radioGroupItemAttributes(
options: RadioGroupItemAttributeOptions,
): RadioGroupPrimitiveAttributes;radioGroupRadioAttributes#
Builds the radio group radio attributes record for the Radio Group primitive.
Emits aria-checked.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { radioGroupRadioAttributes } from '@kovojs/headless-ui/radio-group';
declare const input: Parameters<typeof radioGroupRadioAttributes>[0];
const result = radioGroupRadioAttributes(input);Signature
function radioGroupRadioAttributes(
options: RadioGroupRadioAttributeOptions,
): RadioGroupPrimitiveAttributes;radioGroupLabelAttributes#
Builds the radio group label attributes record for the Radio Group primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { radioGroupLabelAttributes } from '@kovojs/headless-ui/radio-group';
declare const input: Parameters<typeof radioGroupLabelAttributes>[0];
const result = radioGroupLabelAttributes(input);Signature
function radioGroupLabelAttributes(
options: RadioGroupLabelAttributeOptions,
): RadioGroupPrimitiveAttributes;Supporting types#
RadioGroupItem#
Public interface used by the Radio Group primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { RadioGroupItem } from '@kovojs/headless-ui/radio-group';
declare const value: RadioGroupItem;Signature
interface RadioGroupItem {
disabled?: boolean;
value: string;
}RadioGroupState#
State snapshot consumed by the Radio Group primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { RadioGroupState } from '@kovojs/headless-ui/radio-group';
declare const value: RadioGroupState;Signature
interface RadioGroupState {
dir?: TextDirection;
disabled?: boolean;
form?: string;
invalid?: boolean;
items?: readonly RadioGroupItem[];
loop?: boolean;
name?: string;
orientation?: CollectionOrientation;
required?: boolean;
value?: string;
}RadioGroupRootAttributeOptions#
Options accepted by the Radio Group primitive radio group root attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { RadioGroupRootAttributeOptions } from '@kovojs/headless-ui/radio-group';
declare const value: RadioGroupRootAttributeOptions;Signature
interface RadioGroupRootAttributeOptions extends RadioGroupState {
descriptionId?: string;
errorId?: string;
id?: string;
labelledBy?: string;
}RadioGroupItemAttributeOptions#
Options accepted by the Radio Group primitive radio group item attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { RadioGroupItemAttributeOptions } from '@kovojs/headless-ui/radio-group';
declare const value: RadioGroupItemAttributeOptions;Signature
interface RadioGroupItemAttributeOptions extends RadioGroupState {
id?: string;
itemDisabled?: boolean;
itemValue: string;
}RadioGroupRadioAttributeOptions#
Options accepted by the Radio Group primitive radio group radio attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { RadioGroupRadioAttributeOptions } from '@kovojs/headless-ui/radio-group';
declare const value: RadioGroupRadioAttributeOptions;Signature
interface RadioGroupRadioAttributeOptions extends RadioGroupItemAttributeOptions {
controlId?: string;
}RadioGroupLabelAttributeOptions#
Options accepted by the Radio Group primitive radio group label attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { RadioGroupLabelAttributeOptions } from '@kovojs/headless-ui/radio-group';
declare const value: RadioGroupLabelAttributeOptions;Signature
interface RadioGroupLabelAttributeOptions extends RadioGroupItemAttributeOptions {
controlId?: string;
}RadioGroupMoveResult#
Result returned by the Radio Group primitive radio group move.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { RadioGroupMoveResult } from '@kovojs/headless-ui/radio-group';
declare const value: RadioGroupMoveResult;Signature
interface RadioGroupMoveResult {
index: number;
value: string | undefined;
}RadioGroupPrimitiveAttributes#
Serializable attribute record returned by Radio Group primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { RadioGroupPrimitiveAttributes } from '@kovojs/headless-ui/radio-group';
declare const value: RadioGroupPrimitiveAttributes;Signature
type RadioGroupPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | number | string>>;@kovojs/headless-ui/scroll-area#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/scroll-area.ts
Values#
scrollAreaRootAttributes#
Builds the scroll area root attributes record for the Scroll Area primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { scrollAreaRootAttributes } from '@kovojs/headless-ui/scroll-area';
declare const input: Parameters<typeof scrollAreaRootAttributes>[0];
const result = scrollAreaRootAttributes(input);Signature
function scrollAreaRootAttributes(
options: ScrollAreaRootAttributeOptions = {},
): ScrollAreaPrimitiveAttributes;scrollAreaViewportAttributes#
Builds the scroll area viewport attributes record for the Scroll Area primitive.
Emits aria-describedby, aria-disabled, aria-label, aria-labelledby.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { scrollAreaViewportAttributes } from '@kovojs/headless-ui/scroll-area';
declare const input: Parameters<typeof scrollAreaViewportAttributes>[0];
const result = scrollAreaViewportAttributes(input);Signature
function scrollAreaViewportAttributes(
options: ScrollAreaViewportAttributeOptions = {},
): ScrollAreaPrimitiveAttributes;scrollAreaScrollbarAttributes#
Builds the scroll area scrollbar attributes record for the Scroll Area primitive.
Emits aria-hidden, hidden.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { scrollAreaScrollbarAttributes } from '@kovojs/headless-ui/scroll-area';
declare const input: Parameters<typeof scrollAreaScrollbarAttributes>[0];
const result = scrollAreaScrollbarAttributes(input);Signature
function scrollAreaScrollbarAttributes(
options: ScrollAreaScrollbarAttributeOptions = {},
): ScrollAreaPrimitiveAttributes;scrollAreaThumbAttributes#
Builds the scroll area thumb attributes record for the Scroll Area primitive.
Emits aria-hidden, hidden.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { scrollAreaThumbAttributes } from '@kovojs/headless-ui/scroll-area';
declare const input: Parameters<typeof scrollAreaThumbAttributes>[0];
const result = scrollAreaThumbAttributes(input);Signature
function scrollAreaThumbAttributes(
options: ScrollAreaThumbAttributeOptions = {},
): ScrollAreaPrimitiveAttributes;scrollAreaCornerAttributes#
Builds the scroll area corner attributes record for the Scroll Area primitive.
Emits aria-hidden, hidden.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { scrollAreaCornerAttributes } from '@kovojs/headless-ui/scroll-area';
declare const input: Parameters<typeof scrollAreaCornerAttributes>[0];
const result = scrollAreaCornerAttributes(input);Signature
function scrollAreaCornerAttributes(
options: ScrollAreaCornerAttributeOptions = {},
): ScrollAreaPrimitiveAttributes;Supporting types#
ScrollAreaOrientation#
Public type used by the Scroll Area primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ScrollAreaOrientation } from '@kovojs/headless-ui/scroll-area';
declare const value: ScrollAreaOrientation;Signature
type ScrollAreaOrientation = 'horizontal' | 'vertical';ScrollAreaScrollPosition#
Public type used by the Scroll Area primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ScrollAreaScrollPosition } from '@kovojs/headless-ui/scroll-area';
declare const value: ScrollAreaScrollPosition;Signature
type ScrollAreaScrollPosition = 'end' | 'middle' | 'none' | 'start';ScrollAreaScrollbars#
Public type used by the Scroll Area primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ScrollAreaScrollbars } from '@kovojs/headless-ui/scroll-area';
declare const value: ScrollAreaScrollbars;Signature
type ScrollAreaScrollbars = 'both' | 'horizontal' | 'none' | 'vertical';ScrollAreaVisibilityState#
State snapshot consumed by the Scroll Area primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ScrollAreaVisibilityState } from '@kovojs/headless-ui/scroll-area';
declare const value: ScrollAreaVisibilityState;Signature
type ScrollAreaVisibilityState = 'hidden' | 'visible';ScrollAreaState#
State snapshot consumed by the Scroll Area primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ScrollAreaState } from '@kovojs/headless-ui/scroll-area';
declare const value: ScrollAreaState;Signature
interface ScrollAreaState {
disabled?: boolean;
dir?: TextDirection;
hasOverflowX?: boolean;
hasOverflowY?: boolean;
hovering?: boolean;
scrolling?: boolean;
scrollbars?: ScrollAreaScrollbars;
}ScrollAreaRootAttributeOptions#
Options accepted by the Scroll Area primitive scroll area root attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ScrollAreaRootAttributeOptions } from '@kovojs/headless-ui/scroll-area';
declare const value: ScrollAreaRootAttributeOptions;Signature
interface ScrollAreaRootAttributeOptions extends ScrollAreaState {
id?: string;
}ScrollAreaViewportAttributeOptions#
Options accepted by the Scroll Area primitive scroll area viewport attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ScrollAreaViewportAttributeOptions } from '@kovojs/headless-ui/scroll-area';
declare const value: ScrollAreaViewportAttributeOptions;Signature
interface ScrollAreaViewportAttributeOptions extends ScrollAreaState {
descriptionId?: string;
id?: string;
label?: string;
labelledBy?: string;
scrollX?: ScrollAreaScrollPosition;
scrollY?: ScrollAreaScrollPosition;
}ScrollAreaScrollbarAttributeOptions#
Options accepted by the Scroll Area primitive scroll area scrollbar attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ScrollAreaScrollbarAttributeOptions } from '@kovojs/headless-ui/scroll-area';
declare const value: ScrollAreaScrollbarAttributeOptions;Signature
interface ScrollAreaScrollbarAttributeOptions extends ScrollAreaState {
forceMount?: boolean;
id?: string;
orientation?: ScrollAreaOrientation;
scrollPosition?: ScrollAreaScrollPosition;
visible?: boolean;
}ScrollAreaThumbAttributeOptions#
Options accepted by the Scroll Area primitive scroll area thumb attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ScrollAreaThumbAttributeOptions } from '@kovojs/headless-ui/scroll-area';
declare const value: ScrollAreaThumbAttributeOptions;Signature
interface ScrollAreaThumbAttributeOptions extends ScrollAreaScrollbarAttributeOptions {}ScrollAreaCornerAttributeOptions#
Options accepted by the Scroll Area primitive scroll area corner attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ScrollAreaCornerAttributeOptions } from '@kovojs/headless-ui/scroll-area';
declare const value: ScrollAreaCornerAttributeOptions;Signature
interface ScrollAreaCornerAttributeOptions extends ScrollAreaState {
forceMount?: boolean;
id?: string;
visible?: boolean;
}ScrollAreaPrimitiveAttributes#
Serializable attribute record returned by Scroll Area primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ScrollAreaPrimitiveAttributes } from '@kovojs/headless-ui/scroll-area';
declare const value: ScrollAreaPrimitiveAttributes;Signature
type ScrollAreaPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | number | string>>;ScrollAreaViewportTarget#
Public interface used by the Scroll Area primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ScrollAreaViewportTarget } from '@kovojs/headless-ui/scroll-area';
declare const value: ScrollAreaViewportTarget;Signature
interface ScrollAreaViewportTarget {
readonly clientHeight: number;
readonly clientWidth: number;
readonly scrollHeight: number;
readonly scrollLeft: number;
readonly scrollTop: number;
readonly scrollWidth: number;
}ScrollAreaPointerTarget#
Public interface used by the Scroll Area primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ScrollAreaPointerTarget } from '@kovojs/headless-ui/scroll-area';
declare const value: ScrollAreaPointerTarget;Signature
interface ScrollAreaPointerTarget {
readonly clientHeight?: number;
readonly clientWidth?: number;
readonly parentElement?: ScrollAreaPointerTarget | null;
readonly getBoundingClientRect?: () => {
readonly height: number;
readonly left: number;
readonly top: number;
readonly width: number;
};
}ScrollAreaThumbGeometryOptions#
Options accepted by the Scroll Area primitive scroll area thumb geometry.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ScrollAreaThumbGeometryOptions } from '@kovojs/headless-ui/scroll-area';
declare const value: ScrollAreaThumbGeometryOptions;Signature
interface ScrollAreaThumbGeometryOptions extends ScrollAreaState {
orientation?: ScrollAreaOrientation;
}ScrollAreaViewportComputedState#
State snapshot consumed by the Scroll Area primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ScrollAreaViewportComputedState } from '@kovojs/headless-ui/scroll-area';
declare const value: ScrollAreaViewportComputedState;Signature
interface ScrollAreaViewportComputedState {
readonly cornerVisible: boolean;
readonly horizontalVisible: boolean;
readonly maxScrollLeft: number;
readonly maxScrollTop: number;
readonly scrollLeft: number;
readonly scrollTop: number;
readonly scrollX: ScrollAreaScrollPosition;
readonly scrollXRatio: number;
readonly scrollY: ScrollAreaScrollPosition;
readonly scrollYRatio: number;
readonly verticalVisible: boolean;
}ScrollAreaViewportScrollResult#
Result returned by the Scroll Area primitive scroll area viewport scroll.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ScrollAreaViewportScrollResult } from '@kovojs/headless-ui/scroll-area';
declare const value: ScrollAreaViewportScrollResult;Signature
type ScrollAreaViewportScrollResult = ScrollAreaViewportComputedState;ScrollAreaThumbGeometry#
Public interface used by the Scroll Area primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ScrollAreaThumbGeometry } from '@kovojs/headless-ui/scroll-area';
declare const value: ScrollAreaThumbGeometry;Signature
interface ScrollAreaThumbGeometry {
readonly offsetRatio: number;
readonly scrollPosition: ScrollAreaScrollPosition;
readonly sizeRatio: number;
readonly visible: boolean;
}ScrollAreaThumbDragStart#
Public interface used by the Scroll Area primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ScrollAreaThumbDragStart } from '@kovojs/headless-ui/scroll-area';
declare const value: ScrollAreaThumbDragStart;Signature
interface ScrollAreaThumbDragStart {
readonly pointerStart: number;
readonly scrollStart: number;
readonly thumbSize: number;
readonly trackSize: number;
}ScrollAreaThumbDragOptions#
Options accepted by the Scroll Area primitive scroll area thumb drag.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ScrollAreaThumbDragOptions } from '@kovojs/headless-ui/scroll-area';
declare const value: ScrollAreaThumbDragOptions;Signature
interface ScrollAreaThumbDragOptions extends ScrollAreaState {
orientation?: ScrollAreaOrientation;
pointerStart: number;
scrollStart: number;
thumbSize: number;
trackSize: number;
}ScrollAreaScrollToTrigger#
Public interface used by the Scroll Area primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ScrollAreaScrollToTrigger } from '@kovojs/headless-ui/scroll-area';
declare const value: ScrollAreaScrollToTrigger;Signature
interface ScrollAreaScrollToTrigger {
getAttribute(name: string): string | null;
readonly ownerDocument?: {
getElementById(id: string): ScrollAreaScrollToViewport | null;
} | null;
}ScrollAreaScrollToViewport#
Public interface used by the Scroll Area primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ScrollAreaScrollToViewport } from '@kovojs/headless-ui/scroll-area';
declare const value: ScrollAreaScrollToViewport;Signature
interface ScrollAreaScrollToViewport {
scrollTop: number;
readonly scrollHeight: number;
}ScrollAreaScrollToResult#
Result returned by the Scroll Area primitive scroll area scroll to.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ScrollAreaScrollToResult } from '@kovojs/headless-ui/scroll-area';
declare const value: ScrollAreaScrollToResult;Signature
interface ScrollAreaScrollToResult {
scrollTop: number;
scrollY: 'end' | 'start';
}@kovojs/headless-ui/separator#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/separator.ts
Values#
separatorRootAttributes#
Builds the separator root attributes record for the Separator primitive.
Emits aria-orientation.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { separatorRootAttributes } from '@kovojs/headless-ui/separator';
declare const input: Parameters<typeof separatorRootAttributes>[0];
const result = separatorRootAttributes(input);Signature
function separatorRootAttributes(
options: SeparatorAttributeOptions = {},
): SeparatorPrimitiveAttributes;Supporting types#
SeparatorOrientation#
Public type used by the Separator primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SeparatorOrientation } from '@kovojs/headless-ui/separator';
declare const value: SeparatorOrientation;Signature
type SeparatorOrientation = 'horizontal' | 'vertical';SeparatorAttributeOptions#
Options accepted by the Separator primitive separator attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SeparatorAttributeOptions } from '@kovojs/headless-ui/separator';
declare const value: SeparatorAttributeOptions;Signature
interface SeparatorAttributeOptions {
decorative?: boolean;
orientation?: SeparatorOrientation;
}SeparatorPrimitiveAttributes#
Serializable attribute record returned by Separator primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SeparatorPrimitiveAttributes } from '@kovojs/headless-ui/separator';
declare const value: SeparatorPrimitiveAttributes;Signature
type SeparatorPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, string>>;@kovojs/headless-ui/select#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/select.ts
Values#
selectValueText#
Computes the select value text transition for the Select primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { selectValueText } from '@kovojs/headless-ui/select';
declare const input: Parameters<typeof selectValueText>[0];
const result = selectValueText(input);Signature
function selectValueText(state: SelectState): string;selectRootAttributes#
Builds the select root attributes record for the Select primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { selectRootAttributes } from '@kovojs/headless-ui/select';
declare const input: Parameters<typeof selectRootAttributes>[0];
const result = selectRootAttributes(input);Signature
function selectRootAttributes(
options: SelectRootAttributeOptions = {},
): SelectPrimitiveAttributes;selectTriggerAttributes#
Builds the select trigger attributes record for the Select primitive.
Emits aria-activedescendant, aria-controls, aria-expanded, aria-haspopup, aria-labelledby.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { selectTriggerAttributes } from '@kovojs/headless-ui/select';
declare const input: Parameters<typeof selectTriggerAttributes>[0];
const result = selectTriggerAttributes(input);Signature
function selectTriggerAttributes(
options: SelectTriggerAttributeOptions = {},
): SelectPrimitiveAttributes;selectHiddenInputAttributes#
Builds the select hidden input attributes record for the Select primitive.
Emits hidden.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { selectHiddenInputAttributes } from '@kovojs/headless-ui/select';
declare const input: Parameters<typeof selectHiddenInputAttributes>[0];
const result = selectHiddenInputAttributes(input);Signature
function selectHiddenInputAttributes(
options: SelectHiddenInputAttributeOptions = {},
): SelectPrimitiveAttributes;selectContentAttributes#
Builds the select content attributes record for the Select primitive.
Emits aria-labelledby.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { selectContentAttributes } from '@kovojs/headless-ui/select';
declare const input: Parameters<typeof selectContentAttributes>[0];
const result = selectContentAttributes(input);Signature
function selectContentAttributes(
options: SelectContentAttributeOptions = {},
): SelectPrimitiveAttributes;selectItemAttributes#
Builds the select item attributes record for the Select primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { selectItemAttributes } from '@kovojs/headless-ui/select';
declare const input: Parameters<typeof selectItemAttributes>[0];
const result = selectItemAttributes(input);Signature
function selectItemAttributes(
options: SelectItemAttributeOptions,
): SelectPrimitiveAttributes;selectValueAttributes#
Builds the select value attributes record for the Select primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { selectValueAttributes } from '@kovojs/headless-ui/select';
declare const input: Parameters<typeof selectValueAttributes>[0];
const result = selectValueAttributes(input);Signature
function selectValueAttributes(
options: SelectValueAttributeOptions = {},
): SelectPrimitiveAttributes;Supporting types#
SelectItem#
Public interface used by the Select primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SelectItem } from '@kovojs/headless-ui/select';
const value: SelectItem = { label: 'Standard', value: 'standard' };Signature
interface SelectItem {
disabled?: boolean;
id?: string;
label?: string;
textValue?: string;
value: string;
}SelectState#
State snapshot consumed by the Select primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SelectState } from '@kovojs/headless-ui/select';
const value: SelectState = {
items: [{ label: 'Standard', value: 'standard' }],
listboxId: 'shipping-speed-listbox',
name: 'shippingSpeed',
open: true,
value: 'standard',
};Signature
interface SelectState {
disabled?: boolean;
form?: string;
highlightedValue?: string;
invalid?: boolean;
items?: readonly SelectItem[];
listboxId?: string;
name?: string;
open?: boolean;
placeholder?: string;
required?: boolean;
value?: string;
}SelectRootAttributeOptions#
Options accepted by the Select primitive select root attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SelectRootAttributeOptions } from '@kovojs/headless-ui/select';
const value: SelectRootAttributeOptions = {
id: 'shipping-speed',
items: [{ label: 'Standard', value: 'standard' }],
value: 'standard',
};Signature
interface SelectRootAttributeOptions extends SelectState {
id?: string;
}SelectTriggerAttributeOptions#
Options accepted by the Select primitive select trigger attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SelectTriggerAttributeOptions } from '@kovojs/headless-ui/select';
const value: SelectTriggerAttributeOptions = {
id: 'shipping-speed-trigger',
items: [{ label: 'Standard', value: 'standard' }],
labelledBy: 'shipping-speed-label',
value: 'standard',
};Signature
interface SelectTriggerAttributeOptions extends SelectState {
descriptionId?: string;
errorId?: string;
id?: string;
labelledBy?: string;
}SelectHiddenInputAttributeOptions#
Options accepted by the Select primitive select hidden input attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SelectHiddenInputAttributeOptions } from '@kovojs/headless-ui/select';
const value: SelectHiddenInputAttributeOptions = {
name: 'shippingSpeed',
required: true,
value: 'standard',
};Signature
interface SelectHiddenInputAttributeOptions extends SelectState {}SelectContentAttributeOptions#
Options accepted by the Select primitive select content attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SelectContentAttributeOptions } from '@kovojs/headless-ui/select';
const value: SelectContentAttributeOptions = {
id: 'shipping-speed-listbox',
labelledBy: 'shipping-speed-label',
open: true,
};Signature
interface SelectContentAttributeOptions extends SelectState {
id?: string;
labelledBy?: string;
}SelectItemAttributeOptions#
Options accepted by the Select primitive select item attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SelectItemAttributeOptions } from '@kovojs/headless-ui/select';
const value: SelectItemAttributeOptions = {
itemLabel: 'Standard',
itemValue: 'standard',
value: 'standard',
};Signature
interface SelectItemAttributeOptions extends SelectState {
id?: string;
itemDisabled?: boolean;
itemLabel?: string;
itemValue: string;
}SelectValueAttributeOptions#
Options accepted by the Select primitive select value attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SelectValueAttributeOptions } from '@kovojs/headless-ui/select';
const value: SelectValueAttributeOptions = {
placeholder: 'Choose a speed',
value: 'standard',
};Signature
interface SelectValueAttributeOptions extends SelectState {
id?: string;
}SelectMoveResult#
Result returned by the Select primitive select move.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SelectMoveResult } from '@kovojs/headless-ui/select';
declare const value: SelectMoveResult;Signature
interface SelectMoveResult {
highlightedIndex: number;
highlightedValue: string | undefined;
}SelectTypeaheadOptions#
Options accepted by the Select primitive select typeahead.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SelectTypeaheadOptions } from '@kovojs/headless-ui/select';
declare const value: SelectTypeaheadOptions;Signature
interface SelectTypeaheadOptions {
currentValue?: string;
loop?: boolean;
now: number;
state?: TypeaheadState;
timeoutMs?: number;
}SelectTypeaheadResult#
Result returned by the Select primitive select typeahead.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SelectTypeaheadResult } from '@kovojs/headless-ui/select';
declare const value: SelectTypeaheadResult;Signature
interface SelectTypeaheadResult {
matchIndex: number;
state: TypeaheadState;
value: string | undefined;
}SelectPrimitiveAttributes#
Serializable attribute record returned by Select primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SelectPrimitiveAttributes } from '@kovojs/headless-ui/select';
declare const value: SelectPrimitiveAttributes;Signature
type SelectPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | number | string>>;@kovojs/headless-ui/slider#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/slider.ts
Values#
sliderRootAttributes#
Builds the slider root attributes record for the Slider primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { sliderRootAttributes } from '@kovojs/headless-ui/slider';
declare const input: Parameters<typeof sliderRootAttributes>[0];
const result = sliderRootAttributes(input);Signature
function sliderRootAttributes(
options: SliderRootAttributeOptions = {},
): SliderPrimitiveAttributes;sliderInputAttributes#
Builds the slider input attributes record for the Slider primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { sliderInputAttributes } from '@kovojs/headless-ui/slider';
declare const input: Parameters<typeof sliderInputAttributes>[0];
const result = sliderInputAttributes(input);Signature
function sliderInputAttributes(
options: SliderInputAttributeOptions = {},
): SliderPrimitiveAttributes;sliderHiddenInputAttributes#
Builds the slider hidden input attributes record for the Slider primitive.
Emits hidden.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { sliderHiddenInputAttributes } from '@kovojs/headless-ui/slider';
declare const input: Parameters<typeof sliderHiddenInputAttributes>[0];
const result = sliderHiddenInputAttributes(input);Signature
function sliderHiddenInputAttributes(
options: SliderHiddenInputAttributeOptions = {},
): SliderPrimitiveAttributes;sliderTrackAttributes#
Builds the slider track attributes record for the Slider primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { sliderTrackAttributes } from '@kovojs/headless-ui/slider';
declare const input: Parameters<typeof sliderTrackAttributes>[0];
const result = sliderTrackAttributes(input);Signature
function sliderTrackAttributes(
options: SliderPartAttributeOptions = {},
): SliderPrimitiveAttributes;sliderRangeAttributes#
Builds the slider range attributes record for the Slider primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { sliderRangeAttributes } from '@kovojs/headless-ui/slider';
declare const input: Parameters<typeof sliderRangeAttributes>[0];
const result = sliderRangeAttributes(input);Signature
function sliderRangeAttributes(
options: SliderPartAttributeOptions = {},
): SliderPrimitiveAttributes;sliderThumbAttributes#
Builds the slider thumb attributes record for the Slider primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { sliderThumbAttributes } from '@kovojs/headless-ui/slider';
declare const input: Parameters<typeof sliderThumbAttributes>[0];
const result = sliderThumbAttributes(input);Signature
function sliderThumbAttributes(
options: SliderThumbAttributeOptions = {},
): SliderPrimitiveAttributes;sliderValueFromString#
Computes slider value from string for the Slider primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { sliderValueFromString } from '@kovojs/headless-ui/slider';
declare const input: Parameters<typeof sliderValueFromString>[0];
declare const state: Parameters<typeof sliderValueFromString>[1];
const result = sliderValueFromString(input, state);Signature
function sliderValueFromString(value: string, state: SliderState = {}): number;Supporting types#
SliderOrientation#
Public type used by the Slider primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SliderOrientation } from '@kovojs/headless-ui/slider';
declare const value: SliderOrientation;Signature
type SliderOrientation = 'horizontal' | 'vertical';SliderState#
State snapshot consumed by the Slider primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SliderState } from '@kovojs/headless-ui/slider';
declare const value: SliderState;Signature
interface SliderState {
disabled?: boolean;
invalid?: boolean;
largeStep?: number;
max?: number;
min?: number;
name?: string;
orientation?: SliderOrientation;
required?: boolean;
step?: number;
value?: number;
}SliderRootAttributeOptions#
Options accepted by the Slider primitive slider root attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SliderRootAttributeOptions } from '@kovojs/headless-ui/slider';
declare const value: SliderRootAttributeOptions;Signature
interface SliderRootAttributeOptions extends SliderState {
id?: string;
}SliderInputAttributeOptions#
Options accepted by the Slider primitive slider input attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SliderInputAttributeOptions } from '@kovojs/headless-ui/slider';
declare const value: SliderInputAttributeOptions;Signature
interface SliderInputAttributeOptions extends SliderState {
descriptionId?: string;
errorId?: string;
form?: string;
id?: string;
label?: string;
labelledBy?: string;
valueText?: string;
}SliderHiddenInputAttributeOptions#
Options accepted by the Slider primitive slider hidden input attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SliderHiddenInputAttributeOptions } from '@kovojs/headless-ui/slider';
declare const value: SliderHiddenInputAttributeOptions;Signature
interface SliderHiddenInputAttributeOptions extends SliderState {
form?: string;
}SliderPartAttributeOptions#
Options accepted by the Slider primitive slider part attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SliderPartAttributeOptions } from '@kovojs/headless-ui/slider';
declare const value: SliderPartAttributeOptions;Signature
interface SliderPartAttributeOptions extends SliderState {
id?: string;
}SliderThumbAttributeOptions#
Options accepted by the Slider primitive slider thumb attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SliderThumbAttributeOptions } from '@kovojs/headless-ui/slider';
declare const value: SliderThumbAttributeOptions;Signature
interface SliderThumbAttributeOptions extends SliderPartAttributeOptions {
descriptionId?: string;
errorId?: string;
label?: string;
labelledBy?: string;
valueText?: string;
}SliderComputedState#
State snapshot consumed by the Slider primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SliderComputedState } from '@kovojs/headless-ui/slider';
declare const value: SliderComputedState;Signature
interface SliderComputedState {
max: number;
min: number;
orientation: SliderOrientation;
step: number;
value: number;
valueRatio: number;
}SliderPrimitiveAttributes#
Serializable attribute record returned by Slider primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SliderPrimitiveAttributes } from '@kovojs/headless-ui/slider';
declare const value: SliderPrimitiveAttributes;Signature
type SliderPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | number | string>>;SliderPointerTarget#
Public interface used by the Slider primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SliderPointerTarget } from '@kovojs/headless-ui/slider';
declare const value: SliderPointerTarget;Signature
interface SliderPointerTarget {
readonly clientHeight?: number;
readonly clientWidth?: number;
readonly getBoundingClientRect?: () => {
readonly height: number;
readonly left: number;
readonly top: number;
readonly width: number;
};
readonly parentElement?: SliderPointerTarget | null;
}SliderPointerDragStart#
Public interface used by the Slider primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SliderPointerDragStart } from '@kovojs/headless-ui/slider';
declare const value: SliderPointerDragStart;Signature
interface SliderPointerDragStart {
readonly pointerStart: number;
readonly valueStart: number;
}@kovojs/headless-ui/switch#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/switch.ts
Values#
switchRootAttributes#
Builds the switch root attributes record for the Switch primitive.
Emits aria-checked.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { switchRootAttributes } from '@kovojs/headless-ui/switch';
declare const input: Parameters<typeof switchRootAttributes>[0];
const result = switchRootAttributes(input);Signature
function switchRootAttributes(state: SwitchState): SwitchPrimitiveAttributes;Supporting types#
SwitchState#
State snapshot consumed by the Switch primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SwitchState } from '@kovojs/headless-ui/switch';
declare const value: SwitchState;Signature
interface SwitchState {
checked: boolean;
disabled?: boolean;
form?: string;
name?: string;
required?: boolean;
value?: string;
}SwitchPrimitiveAttributes#
Serializable attribute record returned by Switch primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { SwitchPrimitiveAttributes } from '@kovojs/headless-ui/switch';
declare const value: SwitchPrimitiveAttributes;Signature
type SwitchPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | string>>;@kovojs/headless-ui/tabs#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/tabs.ts
Values#
tabsRootAttributes#
Builds the tabs root attributes record for the Tabs primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { tabsRootAttributes } from '@kovojs/headless-ui/tabs';
declare const input: Parameters<typeof tabsRootAttributes>[0];
const result = tabsRootAttributes(input);Signature
function tabsRootAttributes(
options: TabsRootAttributeOptions = {},
): TabsPrimitiveAttributes;tabsListAttributes#
Builds the tabs list attributes record for the Tabs primitive.
Emits aria-describedby, aria-disabled, aria-label, aria-labelledby, aria-orientation.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { tabsListAttributes } from '@kovojs/headless-ui/tabs';
declare const input: Parameters<typeof tabsListAttributes>[0];
const result = tabsListAttributes(input);Signature
function tabsListAttributes(
options: TabsListAttributeOptions = {},
): TabsPrimitiveAttributes;tabsTriggerAttributes#
Builds the tabs trigger attributes record for the Tabs primitive.
Emits aria-controls, aria-selected.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { tabsTriggerAttributes } from '@kovojs/headless-ui/tabs';
declare const input: Parameters<typeof tabsTriggerAttributes>[0];
const result = tabsTriggerAttributes(input);Signature
function tabsTriggerAttributes(
options: TabsTriggerAttributeOptions,
): TabsPrimitiveAttributes;tabsPanelAttributes#
Builds the tabs panel attributes record for the Tabs primitive.
Emits aria-labelledby.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { tabsPanelAttributes } from '@kovojs/headless-ui/tabs';
declare const input: Parameters<typeof tabsPanelAttributes>[0];
const result = tabsPanelAttributes(input);Signature
function tabsPanelAttributes(options: TabsPanelAttributeOptions): TabsPrimitiveAttributes;Supporting types#
TabsActivationMode#
Public type used by the Tabs primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { TabsActivationMode } from '@kovojs/headless-ui/tabs';
declare const value: TabsActivationMode;Signature
type TabsActivationMode = 'automatic' | 'manual';TabsItem#
Public interface used by the Tabs primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { TabsItem } from '@kovojs/headless-ui/tabs';
declare const value: TabsItem;Signature
interface TabsItem {
disabled?: boolean;
value: string;
}TabsState#
State snapshot consumed by the Tabs primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { TabsState } from '@kovojs/headless-ui/tabs';
declare const value: TabsState;Signature
interface TabsState {
activationMode?: TabsActivationMode;
activeValue?: string;
dir?: TextDirection;
disabled?: boolean;
items?: readonly TabsItem[];
loop?: boolean;
orientation?: CollectionOrientation;
value?: string;
}TabsRootAttributeOptions#
Options accepted by the Tabs primitive tabs root attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { TabsRootAttributeOptions } from '@kovojs/headless-ui/tabs';
declare const value: TabsRootAttributeOptions;Signature
interface TabsRootAttributeOptions extends TabsState {
id?: string;
}TabsListAttributeOptions#
Options accepted by the Tabs primitive tabs list attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { TabsListAttributeOptions } from '@kovojs/headless-ui/tabs';
declare const value: TabsListAttributeOptions;Signature
interface TabsListAttributeOptions extends TabsState {
descriptionId?: string;
id?: string;
label?: string;
labelledBy?: string;
}TabsTriggerAttributeOptions#
Options accepted by the Tabs primitive tabs trigger attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { TabsTriggerAttributeOptions } from '@kovojs/headless-ui/tabs';
declare const value: TabsTriggerAttributeOptions;Signature
interface TabsTriggerAttributeOptions extends TabsState {
id?: string;
itemDisabled?: boolean;
itemValue: string;
panelId?: string;
}TabsPanelAttributeOptions#
Options accepted by the Tabs primitive tabs panel attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { TabsPanelAttributeOptions } from '@kovojs/headless-ui/tabs';
declare const value: TabsPanelAttributeOptions;Signature
interface TabsPanelAttributeOptions extends TabsState {
id?: string;
itemDisabled?: boolean;
itemValue: string;
triggerId?: string;
}TabsMoveResult#
Result returned by the Tabs primitive tabs move.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { TabsMoveResult } from '@kovojs/headless-ui/tabs';
declare const value: TabsMoveResult;Signature
interface TabsMoveResult {
index: number;
value: string | undefined;
}TabsPrimitiveAttributes#
Serializable attribute record returned by Tabs primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { TabsPrimitiveAttributes } from '@kovojs/headless-ui/tabs';
declare const value: TabsPrimitiveAttributes;Signature
type TabsPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | number | string>>;@kovojs/headless-ui/toast#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/toast.ts
Values#
toastShowEventName#
Public value used by the Toast primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { toastShowEventName } from '@kovojs/headless-ui/toast';
const value = toastShowEventName;Signature
const toastShowEventName = 'toast:show' as const;toastDismissEventName#
Public value used by the Toast primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { toastDismissEventName } from '@kovojs/headless-ui/toast';
const value = toastDismissEventName;Signature
const toastDismissEventName = 'toast:dismiss' as const;toastShowEvent#
Event shape consumed by the Toast primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { toastShowEvent } from '@kovojs/headless-ui/toast';
const value = toastShowEvent;Signature
const toastShowEvent = Object.freeze({
name: toastShowEventName,
}) as ToastShowEventDefinition;toastDismissEvent#
Event shape consumed by the Toast primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { toastDismissEvent } from '@kovojs/headless-ui/toast';
const value = toastDismissEvent;Signature
const toastDismissEvent = Object.freeze({
name: toastDismissEventName,
}) as ToastDismissEventDefinition;toastEvents#
Public value used by the Toast primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { toastEvents } from '@kovojs/headless-ui/toast';
const value = toastEvents;Signature
const toastEvents = Object.freeze([toastShowEvent, toastDismissEvent] as const);toastShowPayload#
Computes toast show payload for the Toast primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { toastShowPayload } from '@kovojs/headless-ui/toast';
declare const input: Parameters<typeof toastShowPayload>[0];
const result = toastShowPayload(input);Signature
function toastShowPayload(input: ToastShowPayload): ToastShowPayload;toastDismissPayload#
Computes toast dismiss payload for the Toast primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { toastDismissPayload } from '@kovojs/headless-ui/toast';
declare const input: Parameters<typeof toastDismissPayload>[0];
const result = toastDismissPayload(input);Signature
function toastDismissPayload(input: ToastDismissPayload): ToastDismissPayload;toastViewportAttributes#
Builds the toast viewport attributes record for the Toast primitive.
Emits aria-label, data-placement.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { toastViewportAttributes } from '@kovojs/headless-ui/toast';
declare const input: Parameters<typeof toastViewportAttributes>[0];
const result = toastViewportAttributes(input);Signature
function toastViewportAttributes(
options: ToastViewportAttributeOptions = {},
): ToastPrimitiveAttributes;toastRootAttributes#
Builds the toast root attributes record for the Toast primitive.
Emits aria-atomic, aria-describedby, aria-labelledby, aria-live.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { toastRootAttributes } from '@kovojs/headless-ui/toast';
declare const input: Parameters<typeof toastRootAttributes>[0];
const result = toastRootAttributes(input);Signature
function toastRootAttributes(options: ToastRootAttributeOptions): ToastPrimitiveAttributes;toastTitleAttributes#
Builds the toast title attributes record for the Toast primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { toastTitleAttributes } from '@kovojs/headless-ui/toast';
declare const input: Parameters<typeof toastTitleAttributes>[0];
const result = toastTitleAttributes(input);Signature
function toastTitleAttributes(
options: ToastPartAttributeOptions = {},
): ToastPrimitiveAttributes;toastDescriptionAttributes#
Builds the toast description attributes record for the Toast primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { toastDescriptionAttributes } from '@kovojs/headless-ui/toast';
declare const input: Parameters<typeof toastDescriptionAttributes>[0];
const result = toastDescriptionAttributes(input);Signature
function toastDescriptionAttributes(
options: ToastPartAttributeOptions = {},
): ToastPrimitiveAttributes;toastActionAttributes#
Builds the toast action attributes record for the Toast primitive.
Emits data-action.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { toastActionAttributes } from '@kovojs/headless-ui/toast';
declare const input: Parameters<typeof toastActionAttributes>[0];
const result = toastActionAttributes(input);Signature
function toastActionAttributes(
options: ToastActionAttributeOptions,
): ToastPrimitiveAttributes;toastCloseAttributes#
Builds the toast close attributes record for the Toast primitive.
Emits data-dismiss.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { toastCloseAttributes } from '@kovojs/headless-ui/toast';
declare const input: Parameters<typeof toastCloseAttributes>[0];
const result = toastCloseAttributes(input);Signature
function toastCloseAttributes(options: ToastState): ToastPrimitiveAttributes;normalizeToastDuration#
Computes normalize toast duration for the Toast primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { normalizeToastDuration } from '@kovojs/headless-ui/toast';
declare const input: Parameters<typeof normalizeToastDuration>[0];
const result = normalizeToastDuration(input);Signature
function normalizeToastDuration(durationMs: number): number;Supporting types#
ToastPlacement#
Public type used by the Toast primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToastPlacement } from '@kovojs/headless-ui/toast';
declare const value: ToastPlacement;Signature
type ToastPlacement =
| 'bottom-center'
| 'bottom-end'
| 'bottom-start'
| 'top-center'
| 'top-end'
| 'top-start';ToastPoliteness#
Public type used by the Toast primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToastPoliteness } from '@kovojs/headless-ui/toast';
declare const value: ToastPoliteness;Signature
type ToastPoliteness = 'assertive' | 'polite';ToastVariant#
Public type used by the Toast primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToastVariant } from '@kovojs/headless-ui/toast';
declare const value: ToastVariant;Signature
type ToastVariant = 'default' | 'error' | 'info' | 'success' | 'warning';ToastChangeReason#
Reason token reported by the Toast primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToastChangeReason } from '@kovojs/headless-ui/toast';
declare const value: ToastChangeReason;Signature
type ToastChangeReason =
| 'action-click'
| 'close-click'
| 'escape-key'
| 'programmatic'
| 'timeout';ToastShowPayload#
Public interface used by the Toast primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToastShowPayload } from '@kovojs/headless-ui/toast';
declare const value: ToastShowPayload;Signature
interface ToastShowPayload {
actionLabel?: string;
actionValue?: string;
description?: string;
durationMs?: number;
id?: string;
politeness?: ToastPoliteness;
title?: string;
variant?: ToastVariant;
}ToastDismissPayload#
Public interface used by the Toast primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToastDismissPayload } from '@kovojs/headless-ui/toast';
declare const value: ToastDismissPayload;Signature
interface ToastDismissPayload {
id: string;
reason?: ToastChangeReason;
}ToastEventDefinition#
Public interface used by the Toast primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToastEventDefinition } from '@kovojs/headless-ui/toast';
declare const value: ToastEventDefinition<'show', { message: string }>;Signature
interface ToastEventDefinition<Name extends string, Payload> {
name: Name;
payload?: Payload;
serverFactKeys?: readonly string[];
}ToastShowEventDefinition#
Public type used by the Toast primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToastShowEventDefinition } from '@kovojs/headless-ui/toast';
declare const value: ToastShowEventDefinition;Signature
type ToastShowEventDefinition = ToastEventDefinition<
typeof toastShowEventName,
ToastShowPayload
>;ToastDismissEventDefinition#
Public type used by the Toast primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToastDismissEventDefinition } from '@kovojs/headless-ui/toast';
declare const value: ToastDismissEventDefinition;Signature
type ToastDismissEventDefinition = ToastEventDefinition<
typeof toastDismissEventName,
ToastDismissPayload
>;ToastState#
State snapshot consumed by the Toast primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToastState } from '@kovojs/headless-ui/toast';
declare const value: ToastState;Signature
interface ToastState {
disabled?: boolean;
id: string;
open?: boolean;
}ToastViewportAttributeOptions#
Options accepted by the Toast primitive toast viewport attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToastViewportAttributeOptions } from '@kovojs/headless-ui/toast';
declare const value: ToastViewportAttributeOptions;Signature
interface ToastViewportAttributeOptions {
disabled?: boolean;
id?: string;
label?: string;
placement?: ToastPlacement;
}ToastRootAttributeOptions#
Options accepted by the Toast primitive toast root attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToastRootAttributeOptions } from '@kovojs/headless-ui/toast';
declare const value: ToastRootAttributeOptions;Signature
interface ToastRootAttributeOptions extends ToastState {
descriptionId?: string;
politeness?: ToastPoliteness;
titleId?: string;
variant?: ToastVariant;
}ToastPartAttributeOptions#
Options accepted by the Toast primitive toast part attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToastPartAttributeOptions } from '@kovojs/headless-ui/toast';
declare const value: ToastPartAttributeOptions;Signature
interface ToastPartAttributeOptions {
id?: string;
}ToastActionAttributeOptions#
Options accepted by the Toast primitive toast action attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToastActionAttributeOptions } from '@kovojs/headless-ui/toast';
declare const value: ToastActionAttributeOptions;Signature
interface ToastActionAttributeOptions extends ToastState {
actionValue?: string;
dismissOnAction?: boolean;
variant?: ToastVariant;
}ToastChangeValue#
Public type used by the Toast primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToastChangeValue } from '@kovojs/headless-ui/toast';
declare const value: ToastChangeValue;Signature
type ToastChangeValue = Readonly<{
id: string;
open: boolean;
}>;ToastPrimitiveAttributes#
Serializable attribute record returned by Toast primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToastPrimitiveAttributes } from '@kovojs/headless-ui/toast';
declare const value: ToastPrimitiveAttributes;Signature
type ToastPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | number | string>>;@kovojs/headless-ui/toggle#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/toggle.ts
Values#
toggleRootAttributes#
Builds the toggle root attributes record for the Toggle primitive.
Emits aria-pressed.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { toggleRootAttributes } from '@kovojs/headless-ui/toggle';
declare const input: Parameters<typeof toggleRootAttributes>[0];
const result = toggleRootAttributes(input);Signature
function toggleRootAttributes(state: ToggleState): TogglePrimitiveAttributes;Supporting types#
ToggleState#
State snapshot consumed by the Toggle primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToggleState } from '@kovojs/headless-ui/toggle';
declare const value: ToggleState;Signature
interface ToggleState {
disabled?: boolean;
pressed: boolean;
}TogglePrimitiveAttributes#
Serializable attribute record returned by Toggle primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { TogglePrimitiveAttributes } from '@kovojs/headless-ui/toggle';
declare const value: TogglePrimitiveAttributes;Signature
type TogglePrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | string>>;@kovojs/headless-ui/toggle-group#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/toggle-group.ts
Values#
toggleGroupRootAttributes#
Builds the toggle group root attributes record for the Toggle Group primitive.
Emits aria-describedby, aria-disabled, aria-labelledby.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { toggleGroupRootAttributes } from '@kovojs/headless-ui/toggle-group';
declare const input: Parameters<typeof toggleGroupRootAttributes>[0];
const result = toggleGroupRootAttributes(input);Signature
function toggleGroupRootAttributes(
options: ToggleGroupRootAttributeOptions = {},
): ToggleGroupPrimitiveAttributes;toggleGroupItemAttributes#
Builds the toggle group item attributes record for the Toggle Group primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { toggleGroupItemAttributes } from '@kovojs/headless-ui/toggle-group';
declare const input: Parameters<typeof toggleGroupItemAttributes>[0];
const result = toggleGroupItemAttributes(input);Signature
function toggleGroupItemAttributes(
options: ToggleGroupItemAttributeOptions,
): ToggleGroupPrimitiveAttributes;toggleGroupButtonAttributes#
Builds the toggle group button attributes record for the Toggle Group primitive.
Emits aria-pressed.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { toggleGroupButtonAttributes } from '@kovojs/headless-ui/toggle-group';
declare const input: Parameters<typeof toggleGroupButtonAttributes>[0];
const result = toggleGroupButtonAttributes(input);Signature
function toggleGroupButtonAttributes(
options: ToggleGroupItemAttributeOptions,
): ToggleGroupPrimitiveAttributes;Supporting types#
ToggleGroupType#
Public type used by the Toggle Group primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToggleGroupType } from '@kovojs/headless-ui/toggle-group';
declare const value: ToggleGroupType;Signature
type ToggleGroupType = 'multiple' | 'single';ToggleGroupValue#
Public type used by the Toggle Group primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToggleGroupValue } from '@kovojs/headless-ui/toggle-group';
declare const value: ToggleGroupValue;Signature
type ToggleGroupValue = readonly string[] | string | undefined;ToggleGroupItem#
Public interface used by the Toggle Group primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToggleGroupItem } from '@kovojs/headless-ui/toggle-group';
declare const value: ToggleGroupItem;Signature
interface ToggleGroupItem {
disabled?: boolean;
value: string;
}ToggleGroupState#
State snapshot consumed by the Toggle Group primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToggleGroupState } from '@kovojs/headless-ui/toggle-group';
declare const value: ToggleGroupState;Signature
interface ToggleGroupState {
activeValue?: string;
collapsible?: boolean;
dir?: TextDirection;
disabled?: boolean;
items?: readonly ToggleGroupItem[];
loop?: boolean;
orientation?: CollectionOrientation;
type?: ToggleGroupType;
value?: ToggleGroupValue;
}ToggleGroupRootAttributeOptions#
Options accepted by the Toggle Group primitive toggle group root attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToggleGroupRootAttributeOptions } from '@kovojs/headless-ui/toggle-group';
declare const value: ToggleGroupRootAttributeOptions;Signature
interface ToggleGroupRootAttributeOptions extends ToggleGroupState {
descriptionId?: string;
id?: string;
labelledBy?: string;
}ToggleGroupItemAttributeOptions#
Options accepted by the Toggle Group primitive toggle group item attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToggleGroupItemAttributeOptions } from '@kovojs/headless-ui/toggle-group';
declare const value: ToggleGroupItemAttributeOptions;Signature
interface ToggleGroupItemAttributeOptions extends ToggleGroupState {
id?: string;
itemDisabled?: boolean;
itemValue: string;
}ToggleGroupMoveResult#
Result returned by the Toggle Group primitive toggle group move.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToggleGroupMoveResult } from '@kovojs/headless-ui/toggle-group';
declare const value: ToggleGroupMoveResult;Signature
interface ToggleGroupMoveResult {
index: number;
value: string | undefined;
}ToggleGroupPrimitiveAttributes#
Serializable attribute record returned by Toggle Group primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToggleGroupPrimitiveAttributes } from '@kovojs/headless-ui/toggle-group';
declare const value: ToggleGroupPrimitiveAttributes;Signature
type ToggleGroupPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | number | string>>;@kovojs/headless-ui/toolbar#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/toolbar.ts
Values#
toolbarRootAttributes#
Builds the toolbar root attributes record for the Toolbar primitive.
Emits aria-describedby, aria-disabled, aria-label, aria-labelledby, aria-orientation.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { toolbarRootAttributes } from '@kovojs/headless-ui/toolbar';
declare const input: Parameters<typeof toolbarRootAttributes>[0];
const result = toolbarRootAttributes(input);Signature
function toolbarRootAttributes(
options: ToolbarRootAttributeOptions = {},
): ToolbarPrimitiveAttributes;toolbarItemAttributes#
Builds the toolbar item attributes record for the Toolbar primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { toolbarItemAttributes } from '@kovojs/headless-ui/toolbar';
declare const input: Parameters<typeof toolbarItemAttributes>[0];
const result = toolbarItemAttributes(input);Signature
function toolbarItemAttributes(
options: ToolbarItemAttributeOptions,
): ToolbarPrimitiveAttributes;toolbarButtonAttributes#
Builds the toolbar button attributes record for the Toolbar primitive.
Emits aria-pressed, data-pressed.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { toolbarButtonAttributes } from '@kovojs/headless-ui/toolbar';
declare const input: Parameters<typeof toolbarButtonAttributes>[0];
const result = toolbarButtonAttributes(input);Signature
function toolbarButtonAttributes(
options: ToolbarButtonAttributeOptions,
): ToolbarPrimitiveAttributes;Supporting types#
ToolbarOrientation#
Public type used by the Toolbar primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToolbarOrientation } from '@kovojs/headless-ui/toolbar';
declare const value: ToolbarOrientation;Signature
type ToolbarOrientation = 'horizontal' | 'vertical';ToolbarItem#
Public interface used by the Toolbar primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToolbarItem } from '@kovojs/headless-ui/toolbar';
declare const value: ToolbarItem;Signature
interface ToolbarItem {
disabled?: boolean;
value: string;
}ToolbarState#
State snapshot consumed by the Toolbar primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToolbarState } from '@kovojs/headless-ui/toolbar';
declare const value: ToolbarState;Signature
interface ToolbarState {
activeValue?: string;
dir?: TextDirection;
disabled?: boolean;
items?: readonly ToolbarItem[];
loop?: boolean;
orientation?: ToolbarOrientation;
}ToolbarRootAttributeOptions#
Options accepted by the Toolbar primitive toolbar root attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToolbarRootAttributeOptions } from '@kovojs/headless-ui/toolbar';
declare const value: ToolbarRootAttributeOptions;Signature
interface ToolbarRootAttributeOptions extends ToolbarState {
descriptionId?: string;
id?: string;
label?: string;
labelledBy?: string;
}ToolbarItemAttributeOptions#
Options accepted by the Toolbar primitive toolbar item attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToolbarItemAttributeOptions } from '@kovojs/headless-ui/toolbar';
declare const value: ToolbarItemAttributeOptions;Signature
interface ToolbarItemAttributeOptions extends ToolbarState {
id?: string;
itemDisabled?: boolean;
itemValue: string;
}ToolbarButtonAttributeOptions#
Options accepted by the Toolbar primitive toolbar button attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToolbarButtonAttributeOptions } from '@kovojs/headless-ui/toolbar';
declare const value: ToolbarButtonAttributeOptions;Signature
interface ToolbarButtonAttributeOptions extends ToolbarItemAttributeOptions {
pressed?: boolean;
}ToolbarMoveResult#
Result returned by the Toolbar primitive toolbar move.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToolbarMoveResult } from '@kovojs/headless-ui/toolbar';
declare const value: ToolbarMoveResult;Signature
interface ToolbarMoveResult {
index: number;
value: string | undefined;
}ToolbarPrimitiveAttributes#
Serializable attribute record returned by Toolbar primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { ToolbarPrimitiveAttributes } from '@kovojs/headless-ui/toolbar';
declare const value: ToolbarPrimitiveAttributes;Signature
type ToolbarPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | number | string>>;@kovojs/headless-ui/tooltip#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/public/tooltip.ts
Values#
tooltipRootAttributes#
Builds the tooltip root attributes record for the Tooltip primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { tooltipRootAttributes } from '@kovojs/headless-ui/tooltip';
declare const input: Parameters<typeof tooltipRootAttributes>[0];
const result = tooltipRootAttributes(input);Signature
function tooltipRootAttributes(state: TooltipState): TooltipPrimitiveAttributes;tooltipTriggerAttributes#
Builds the tooltip trigger attributes record for the Tooltip primitive.
Emits aria-describedby.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { tooltipTriggerAttributes } from '@kovojs/headless-ui/tooltip';
declare const input: Parameters<typeof tooltipTriggerAttributes>[0];
const result = tooltipTriggerAttributes(input);Signature
function tooltipTriggerAttributes(
options: TooltipAttributeOptions,
): TooltipPrimitiveAttributes;tooltipContentAttributes#
Builds the tooltip content attributes record for the Tooltip primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import { tooltipContentAttributes } from '@kovojs/headless-ui/tooltip';
declare const input: Parameters<typeof tooltipContentAttributes>[0];
const result = tooltipContentAttributes(input);Signature
function tooltipContentAttributes(
options: TooltipAttributeOptions,
): TooltipPrimitiveAttributes;Supporting types#
TooltipState#
State snapshot consumed by the Tooltip primitive.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { TooltipState } from '@kovojs/headless-ui/tooltip';
declare const value: TooltipState;Signature
interface TooltipState {
disabled?: boolean;
open: boolean;
}TooltipAttributeOptions#
Options accepted by the Tooltip primitive tooltip attribute.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { TooltipAttributeOptions } from '@kovojs/headless-ui/tooltip';
declare const value: TooltipAttributeOptions;Signature
interface TooltipAttributeOptions extends TooltipState {
contentId?: string;
}TooltipPrimitiveAttributes#
Serializable attribute record returned by Tooltip primitive builders.
SPEC.md §4.6 defines primitive attribute records and merge ownership.
Copyable example
import type { TooltipPrimitiveAttributes } from '@kovojs/headless-ui/tooltip';
declare const value: TooltipPrimitiveAttributes;Signature
type TooltipPrimitiveAttributes = PrimitiveDataAttributes &
Readonly<Record<string, boolean | string>>;@kovojs/headless-ui/types#
Task: Headless primitive behavior: ARIA/data attribute builders, render-input types, and primitive event helpers for styled and copied components.
Source: packages/headless-ui/src/types.ts
Supporting types#
CollectionOrientation#
Orientation model used by roving-focus and keyboard navigation helpers.
Signature
type CollectionOrientation = 'both' | 'horizontal' | 'vertical';DialogInvokerEvent#
Minimal event shape accepted by dialog invoker-backed trigger and close handlers.
Signature
interface DialogInvokerEvent {
currentTarget?: unknown;
defaultPrevented?: boolean;
preventDefault?: () => void;
target?: unknown;
}NavigationIntent#
Logical navigation intent derived from keyboard input.
Signature
type NavigationIntent = 'first' | 'last' | 'next' | 'previous';PrimitiveChangeDetail#
Cancelable change event detail shared by headless primitives with author-provided change hooks.
Signature
interface PrimitiveChangeDetail<Reason extends string, Value = unknown> {
readonly defaultPrevented: boolean;
readonly reason: Reason;
readonly value: Value;
preventDefault(): void;
}PrimitiveDataAttributes#
Data attributes emitted by headless primitive attribute helpers.
Signature
type PrimitiveDataAttributes = Readonly<Record<`data-${string}`, string>>;TextDirection#
Text direction used to interpret horizontal arrow-key navigation.
Signature
type TextDirection = 'ltr' | 'rtl';TypeaheadState#
Buffered typeahead search state shared by collection primitives.
Signature
interface TypeaheadState {
readonly buffer: string;
readonly updatedAt: number;
}