Files
shadcn-ui/apps/www/content/docs/components/input.mdx
2023-06-22 22:44:52 +04:00

58 lines
883 B
Plaintext

---
title: Input
description: Displays a form input field or a component that looks like an input field.
component: true
---
<ComponentPreview name="input-demo" className="[&_input]:max-w-xs" />
## Installation
<Steps>
### Command
```bash
npx shadcn-ui add input
```
### Usage
```tsx
import { Input } from "@/components/ui/input"
```
```tsx
<Input />
```
</Steps>
---
## Examples
### Default
<ComponentPreview name="input-demo" className="[&_input]:max-w-xs" />
### File
<ComponentPreview name="input-file" className="[&_input]:max-w-xs" />
### Disabled
<ComponentPreview name="input-disabled" className="[&_input]:max-w-xs" />
### With Label
<ComponentPreview name="input-with-label" className="[&_input]:max-w-xs" />
### With Button
<ComponentPreview name="input-with-button" className="[&_input]:max-w-xs" />
### Form
<ComponentPreview name="input-form" />