Input/input-types-

PreviousNext

A input/input-types- example

Docs
shadcnblocksblock

Preview

Loading preview…
code/example/input/input-types-4.tsx
"use client";

import { Search } from "lucide-react";

import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";

export const title = "Search Input";

const Example = () => (
  <div className="w-full max-w-sm space-y-2">
    <Label htmlFor="search-input">Search</Label>
    <div className="relative">
      <Search className="absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2 text-muted-foreground" />
      <Input
        className="bg-background pl-9"
        id="search-input"
        placeholder="Search..."
        type="search"
      />
    </div>
  </div>
);

export default Example;

Installation

npx shadcn@latest add @shadcnblocks/input-input-types-4

Usage

import { InputInputTypes4 } from "@/components/input-input-types-4"
<InputInputTypes4 />