Displays a form input field or a component that looks like an input field.
<script lang="ts"> import { Input } from "$lib/components/ui/input/index.js"; </script> <Input type="email" placeholder="email" class="max-w-xs" />
npx shadcn-svelte@latest add input
<script lang="ts"> import { Input } from "$lib/components/ui/input"; </script> <Input />
<script lang="ts"> import { Input } from "$lib/components/ui/input/index.js"; </script> <Input disabled type="email" placeholder="email" class="max-w-xs" />
<script lang="ts"> import { Input } from "$lib/components/ui/input/index.js"; </script> <Input disabled type="email" placeholder="email" class="max-w-sm" />
<script lang="ts"> import { Input } from "$lib/components/ui/input/index.js"; import { Label } from "$lib/components/ui/label/index.js"; </script> <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>
<script lang="ts"> import { Input } from "$lib/components/ui/input/index.js"; import { Label } from "$lib/components/ui/label/index.js"; </script> <div class="flex w-full max-w-sm flex-col gap-1.5"> <Label for="email">Email</Label> <Input type="email" id="email" placeholder="email" /> </div>
<script lang="ts"> import { Input } from "$lib/components/ui/input/index.js"; import { Label } from "$lib/components/ui/label/index.js"; </script> <div class="grid w-full max-w-sm items-center gap-1.5"> <Label for="email-2">Email</Label> <Input type="email" id="email-2" placeholder="Email" /> <p class="text-sm text-muted-foreground">Enter your email address.</p> </div>
<script lang="ts"> import { Input } from "$lib/components/ui/input/index.js"; import { Label } from "$lib/components/ui/label/index.js"; </script> <div class="flex w-full max-w-sm flex-col gap-1.5"> <Label for="email-2">Email</Label> <Input type="email" id="email-2" placeholder="Email" /> <p class="text-sm text-muted-foreground">Enter your email address.</p> </div>
<script lang="ts"> import { Button } from "$lib/components/ui/button/index.js"; import { Input } from "$lib/components/ui/input/index.js"; </script> <form class="flex w-full max-w-sm items-center space-x-2"> <Input type="email" placeholder="email" /> <Button type="submit">Subscribe</Button> </form>
<script lang="ts"> import { Input } from "$lib/components/ui/input/index.js"; import { Label } from "$lib/components/ui/label/index.js"; </script> <div class="grid w-full max-w-sm items-center gap-1.5"> <Label for="picture">Picture</Label> <Input id="picture" type="file" /> </div>
On This Page