# Label · JGuang UI

> Renders an accessible label associated with controls.

- Page: https://jiguang132.com/systems/jguang-ui/docs/components/base/label
- Based on: shadcn/ui documentation (MIT) @ bc0705384b51252af26dcc65425b216bf5eb063c

> Example `label-demo`: interactive preview on https://jiguang132.com/systems/jguang-ui/docs/components/base/label


  For form fields, use the [Field](/systems/jguang-ui/docs/components/base/field) component which
  includes built-in label, description, and error handling.


## Installation


  

**Command**


  

**Manual**


```text
Use the JGuang UI Registry URL provided on /systems/jguang-ui#install.
```


### Install the following dependencies:


```bash
npm install @base-ui/react
```


### Copy and paste the following code into your project.


[View complete source: components/ui/label.tsx](/r/jguang-ui/base/label.json)


### Update the import paths to match your project setup.


## Usage

```tsx
import { Label } from "@/components/ui/label"
```

```tsx
<Label htmlFor="email">Your email address</Label>
```

## Label in Field

For form fields, use the [Field](/systems/jguang-ui/docs/components/base/field) component which
includes built-in `FieldLabel`, `FieldDescription`, and `FieldError` components.

```tsx
<Field>
  <FieldLabel htmlFor="email">Your email address</FieldLabel>
  <Input id="email" />
</Field>
```


> Example `field-demo`: interactive preview on https://jiguang132.com/systems/jguang-ui/docs/components/base/label


## RTL

To enable RTL support in JGuang UI, see the [RTL configuration guide](/systems/jguang-ui/docs/rtl).


> Example `label-rtl`: interactive preview on https://jiguang132.com/systems/jguang-ui/docs/components/base/label


## API Reference

See the [Base UI Label](https://base-ui.com/react/components/label#api-reference) documentation for more information.

---

Index of all JGuang resources: https://jiguang132.com/llms.txt
