Copy to clipboard
Installation
Copy to clipboard
npx bearnie add input
npx bearnie add input
bunx bearnie add input
bunx bearnie add input
pnpm dlx bearnie add input
pnpm dlx bearnie add input
yarn dlx bearnie add input
yarn dlx bearnie add input
Copy to clipboard
import Input from "@/components/ui/input/Input.astro";
import Label from "@/components/ui/label/Label.astro";
Usage
import { Input } from "@/components/ui/input"
<Input type="email" placeholder="Email" />
Examples
With label
Copy to clipboard
Password
Copy to clipboard
Disabled
Copy to clipboard
With left icon
Copy to clipboard
With right icon
Copy to clipboard
With button
Copy to clipboard
File
Copy to clipboard
Anatomy
Input- A single form input element
Props
Input
| Prop | Type | Default | Description |
|---|---|---|---|
| type | text | email | password | search | tel | url | number | text | Input type |
| placeholder | string | - | Placeholder text |
| disabled | boolean | false | Disables the input |
| required | boolean | false | Makes the field required |
| name | string | - | Form field name |
| id | string | - | Element ID |
| value | string | - | Input value |
| class | string | - | Additional CSS classes |