# All files / src/components/organisms/showcases FormsShowcase.tsx

0% Statements 0/78
0% Branches 0/1
0% Functions 0/1
0% Lines 0/78

Press n or j to go to the next uncovered block, b, p or k for the previous block.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79

     import { Card } from '@/components/ui/card'
    import { Button } from '@/components/ui/button'
    import { Input } from '@/components/ui/input'
    import { Label } from '@/components/ui/label'
    import { Separator } from '@/components/ui/separator'
    import {
      Envelope,
      Lock,
      ArrowRight,
    } from '@phosphor-icons/react'

    export function FormsShowcase() {
      return (
        <section className="space-y-6">
          <div>
            <h2 className="text-3xl font-bold mb-2">Forms</h2>
            <p className="text-muted-foreground">
              Complete form layouts with validation and actions
            </p>
          </div>

          <Card className="p-6">
            <form className="space-y-6">
              <div>
                <h3 className="text-xl font-semibold mb-4">Create Account</h3>
                <p className="text-sm text-muted-foreground">
                  Fill in your details to get started
                </p>
              </div>

              <Separator />

              <div className="grid grid-cols-1 md:grid-cols-2 gap-4">
                <div className="space-y-2">
                  <Label htmlFor="firstName">First Name</Label>
                  <Input id="firstName" placeholder="John" />
                </div>
                <div className="space-y-2">
                  <Label htmlFor="lastName">Last Name</Label>
                  <Input id="lastName" placeholder="Doe" />
                </div>
              </div>

              <div className="space-y-2">
                <Label htmlFor="formEmail">Email</Label>
                <div className="relative">
                  <Envelope className="absolute left-3 top-1/2 -translate-y-1/2 h-5 w-5 text-muted-foreground" />
                  <Input id="formEmail" type="email" placeholder="john@example.com" className="pl-10" />
                </div>
              </div>

              <div className="space-y-2">
                <Label htmlFor="formPassword">Password</Label>
                <div className="relative">
                  <Lock className="absolute left-3 top-1/2 -translate-y-1/2 h-5 w-5 text-muted-foreground" />
                  <Input id="formPassword" type="password" placeholder="••••••••" className="pl-10" />
                </div>
                <p className="text-sm text-muted-foreground">
                  Must be at least 8 characters
                </p>
              </div>

              <Separator />

              <div className="flex items-center justify-between gap-4">
                <Button variant="outline" type="button">
                  Cancel
                </Button>
                <Button type="submit">
                  Create Account
                  <ArrowRight className="ml-2" />
                </Button>
              </div>
            </form>
          </Card>
        </section>
      )
    }