Label

Renders an accessible label associated with form controls.

Installation

CLI

Install the component using the StarUI CLI:

star add label

Examples

With Input

Label associated with a text input via the for attribute

Enter your email address.

Composed Content

Labels with icons, badges, and required indicators as children

Disabled State

Label automatically dims when its associated input is disabled

API Reference

Props

Prop Type Default Description
fr str | None None ID of the associated form control (sets 'for' attribute)
cls str '' Additional CSS classes for spacing/layout