> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# Label

A short caption in the form label style, for controls that don't have a `label` input of their own.


## Installation

```bash
npx @blotch/dolan add label
```

```typescript
import { UiLabel } from '../components/ui/label';
```

## Usage

```typescript title="src/app/app.ts"
import { Component, signal } from '@angular/core';
import { LYNX_ELEMENTS } from '@blotch/angular-lynx';
import { UiLabel } from '../components/ui/label';
import { UiSwitch } from '../components/ui/switch';

@Component({
  selector: 'app-root',
  imports: [LYNX_ELEMENTS, UiLabel, UiSwitch],
  template: `
    <view class="flex flex-row items-center justify-between">
      <ui-label>Wi-Fi</ui-label>
      <ui-switch [(checked)]="wifi" />
    </view>
  `,
})
export class App {
  protected readonly wifi = signal(true);
}
```

- This example also uses [Switch](/dolan/switch.md).
- A label is text only. Tapping it doesn't toggle or focus the control next to it.
- [Input](/dolan/input.md), [Textarea](/dolan/textarea.md), [Select](/dolan/select.md), [Date Picker](/dolan/date-picker.md) and [Checkbox](/dolan/checkbox.md) draw their own label from a `label` input, in this label's size and weight.

### Disabled

```angular-html
<ui-label disabled>Airplane mode</ui-label>
```

A disabled label dims to match a disabled control.

## API

### UiLabel

| Input      | Type      | Default | Description                          |
| ---------- | --------- | ------- | ------------------------------------ |
| `disabled` | `boolean` | `false` | Dims the label.                      |
| `class`    | `string`  | `''`    | Extra Tailwind classes for the text. |

No outputs.

## Related

- [Checkbox](/dolan/checkbox.md), [Switch](/dolan/switch.md), [Radio Group](/dolan/radio-group.md) and [Select](/dolan/select.md): controls to label
- [Typography](/dolan/typography.md): other text styles
