Askr documentation
Generated API snapshot

@askrjs/ui/label

Exports from the declarations published in @askrjs/ui. Signatures reflect the published artifact.

Exports

This entrypoint publishes 5 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.

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 | LabelAsChildProps

Props 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;