Input/input-types-

PreviousNext

A input/input-types- example

Docs
shadcnblocksblock

Preview

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

import { Link } from "lucide-react";

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

export const title = "URL Input";

const Example = () => (
  <div className="w-full max-w-sm space-y-2">
    <Label htmlFor="url-input">Website</Label>
    <div className="relative">
      <Link 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="url-input"
        placeholder="https://example.com"
        type="url"
      />
    </div>
    <p className="text-xs text-muted-foreground">Include https:// or http://</p>
  </div>
);

export default Example;

Installation

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

Usage

import { InputInputTypes7 } from "@/components/input-input-types-7"
<InputInputTypes7 />