Skip to content
Playground

Label

A native label with Zenos typography and disabled-state styling.

A native label with Zenos typography and disabled-state styling.

TSX
import { Label } from "@zentara-co/zenos-ui";

Use htmlFor with a matching control id, or wrap a native labelable control. Clicking either label moves focus to or activates its associated control.

Use standalone Label for a simple native association. Use Field.Label when the control also needs generated IDs, a description, an error, or inherited required, disabled, and invalid semantics.

Receives incident notifications.

Pass required to show the design-system asterisk, optional (or a custom string) for (Optional) copy, and tooltip with tooltipLabel for an info trigger that opens supporting text.

Standalone Label uses the same header layout and affordances as Field.Label. Pass required, optional, and tooltip on the label itself, and set disabled (or data-disabled) when the paired control is disabled so the asterisk, optional copy, and info trigger match field styling.

API

PropTypeDefaultDescription
htmlFor string — ID of the labelled form control.
required boolean — Shows a required asterisk after the label text.
optional boolean | string — Shows optional copy beside the label. true renders (Optional).
tooltip ReactNode — Tooltip content for the info trigger beside the label.
tooltipLabel string — Accessible name for the info trigger.
disabled boolean — Mutes the label and affordances to match a disabled control.
data-disabled boolean | string — Alternative disabled presentation hook when not using the disabled prop.
native props React.LabelHTMLAttributes<HTMLLabelElement> — Forwards native attributes, events, aria-*, data-*, className, style, and ref.

Unless narrowed above, each DOM-rendering part also accepts its underlying native or Base UI props, including className, style, aria-*, and data-*.

Label renders a native label. Keep its text concise and specific, and do not replace it with placeholder text. Every htmlFor must match one labelable control’s id. Wrapped controls preserve the browser’s native click behavior.