mirror of
https://github.com/supabase/supabase.git
synced 2026-10-18 23:59:08 +03:00
Update label.mdx
This commit is contained in:
1 parent
c6b4be141d
commit
ffc2682840
1 file changed
+3
-41
@@ -14,57 +14,19 @@ source:
|
||||
|
||||
<Admonition
|
||||
variant="warning"
|
||||
title="Do not use Label component a Form"
|
||||
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>
|
||||
|
||||
## Installation
|
||||
|
||||
<Tabs defaultValue="cli">
|
||||
|
||||
<TabsList>
|
||||
<TabsTrigger value="cli">CLI</TabsTrigger>
|
||||
<TabsTrigger value="manual">Manual</TabsTrigger>
|
||||
</TabsList>
|
||||
<TabsContent value="cli">
|
||||
|
||||
```bash
|
||||
npx shadcn-ui@latest add label
|
||||
```
|
||||
|
||||
</TabsContent>
|
||||
|
||||
<TabsContent value="manual">
|
||||
|
||||
<Steps>
|
||||
|
||||
<Step>Install the following dependencies:</Step>
|
||||
|
||||
```bash
|
||||
npm install @radix-ui/react-label
|
||||
```
|
||||
|
||||
<Step>Copy and paste the following code into your project.</Step>
|
||||
|
||||
<ComponentSource name="label" />
|
||||
|
||||
<Step>Update the import paths to match your project setup.</Step>
|
||||
|
||||
</Steps>
|
||||
|
||||
</TabsContent>
|
||||
|
||||
</Tabs>
|
||||
|
||||
## Usage
|
||||
|
||||
```tsx
|
||||
import { Label } from '@/components/ui/label'
|
||||
import { Label_Shadcn_ } from '@/components/ui/label'
|
||||
```
|
||||
|
||||
```tsx
|
||||
<Label htmlFor="email">Your email address</Label>
|
||||
<Label_Shadcn_ htmlFor="email">Your email address</Label_Shadcn_>
|
||||
```
|
||||
Reference in new issue
Block a user