No Preview

Sorry, but you either have no stories or none are selected somehow.

If the problem persists, check the browser console, or the terminal you've run Storybook from.

Label

A label component provides a title or name to a component.


Default

Open in CodeSandbox
NameDescriptionDefaultControl
required

Displays and indicator that the label is for a required field. The required prop can be set to true to display an asterisk (*). Or it can be set to a string or jsx content to display a different indicator.

ReactNode | ({ as?: "span"; } & Pick<DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "key" | keyof HTMLAttributes<...>> & { ...; } & { ...; })
-
as
"label"
-
disabled
Renders the label as disabled
boolean
-
size
A label supports different sizes.
"small""medium""large"
-
strong
A label supports semibold/strong fontweight.
boolean
-

Stories

Size

Open in CodeSandbox

Strong

Open in CodeSandbox

Disabled

Open in CodeSandbox

Required

Open in CodeSandbox