Comparación entre la versión Astro (Saastro) y React (shadcn/ui)
🚀 saastro/ui (Astro)
⚛️ shadcn/ui (React)
Installation
Usage
---
import { Input } from "@/components/ui-saastro/input"
---
<Input type="email" placeholder="Email" />
Examples
Default
<Input placeholder="Email" />
With Label
---
import { Input } from "@/components/ui-saastro/input"
import { Label } from "@/components/ui-saastro/label"
---
<div class="grid w-full max-w-sm items-center gap-1.5">
<Label for="email">Email</Label>
<Input type="email" id="email" placeholder="Email" />
</div>
File Input
<Input type="file" />
Disabled
<Input disabled placeholder="Disabled" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
type | string | "text" | The input type |
placeholder | string | - | Placeholder text |
disabled | boolean | false | Whether the input is disabled |
class | string | - | Additional CSS classes |
Accessibility
- Uses native
<input>element for built-in accessibility - Associate with
<Label>using matchingidandforattributes - Supports all standard input types
- Use
aria-invalidfor validation states