mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 20:05:06 +03:00
* add Admonition to Design System * added notices about FormLabel * Update label.mdx
33 lines
750 B
Plaintext
33 lines
750 B
Plaintext
---
|
|
title: Label
|
|
description: Renders an accessible label associated with controls.
|
|
component: true
|
|
links:
|
|
doc: https://www.radix-ui.com/docs/primitives/components/label
|
|
api: https://www.radix-ui.com/docs/primitives/components/label#api-reference
|
|
source:
|
|
radix: true
|
|
shadcn: true
|
|
---
|
|
|
|
<ComponentPreview name="label-demo" peekCode wide />
|
|
|
|
<Admonition
|
|
variant="warning"
|
|
title="Do not use this Label component in a Form"
|
|
>
|
|
|
|
Please use [FormLabel](/design-system/docs/components/form#anatomy) if you are using [Form](/design-system/docs/components/form) based components.
|
|
|
|
</Admonition>
|
|
|
|
## Usage
|
|
|
|
```tsx
|
|
import { Label_Shadcn_ } from '@/components/ui/label'
|
|
```
|
|
|
|
```tsx
|
|
<Label_Shadcn_ htmlFor="email">Your email address</Label_Shadcn_>
|
|
```
|