Generated API snapshot
@askrjs/ui/label
Exports from the declarations published in @askrjs/ui. Signatures reflect the published artifact.
Exports
This entrypoint publishes 7 exports. Use the anchored symbol rows for direct links. Type-only exports are labeled separately from runtime values.
Labeltype
Label: { (props: LabelLabelProps): JSXElement; (props: LabelAsChildProps): JSXElement; }Renders the `label` part of `label`. Supports polymorphic rendering via `asChild`.
LABEL_A11Y_CONTRACTtype
LABEL_A11Y_CONTRACT: { readonly ELEMENT: "label"; readonly ASSOCIATION_ATTRIBUTE: "for"; readonly DATA_ATTRIBUTES: { readonly slot: "data-slot"; }; readonly NAME_SOURCE_PRIORITY: readonly ["aria-label", "textContent"]; readonly AS_CHILD: { readonly forwardsProps: true; readonly preservesChildElement: true; }; }Native label semantics for askr-ui Label.
LabelA11yContracttype
LabelA11yContract: typeof LABEL_A11Y_CONTRACTType of the Label A11y Contract object.
LabelAsChildPropstype
LabelAsChildProps: LabelOwnProps & {
asChild: true;
children: JSXElement;
ref?: Ref<Element>;
}Props for the `asChild` (polymorphic) rendering of Label.
asChild- asChild: true;
children- children: JSXElement;
ref- ref?: Ref<Element>;
LabelLabelPropstype
LabelLabelProps: Omit<Props, 'children'> & LabelOwnProps & {
asChild?: false;
htmlFor?: string;
ref?: Ref<HTMLLabelElement>;
}Props for Label Label.
asChild- asChild?: false | undefined;
children- children?: unknown;
htmlFor- htmlFor?: string | undefined;
ref- ref?: Ref<HTMLLabelElement>;
LabelOwnPropstype
LabelOwnProps: {
children?: unknown;
}Own props for Label, before merging with native element attributes.
children- children?: unknown;
LabelPropstype
LabelProps: LabelLabelProps | LabelAsChildPropsProps for Label.
asChild- asChild?: boolean | undefined;
children- children?: unknown;
ref- ref?: ((value: Element | null) => void) | { current: Element | null; } | ((value: HTMLLabelElement | null) => void) | { current: HTMLLabelElement | null; } | null | undefined;