Velocity UI
Loading…
Menu

Overview

Practical, drop‑in examples you can copy into your app. Each example includes a live preview and the source code.

Use these as starting points and tailor them to your data and brand. All examples are light/dark ready and accessible.

Auth Form

Accessible email/password form with clear affordances.

Sign in

AuthForm.tsx
export function AuthForm(){
  return (
    <form className="space-y-3">
      <input className="w-full rounded-md border px-3 py-2" placeholder="Email" />
      <input className="w-full rounded-md border px-3 py-2" placeholder="Password" type="password" />
      <Button className="w-full">Continue</Button>
    </form>
  )
}

Pricing Card

Plan card with features list and primary action.

Pro
$24 / mo
  • Unlimited projects
  • Priority support
PricingCard.tsx
export function PricingCard(){
  return (
    <Card>
      <CardHeader>
        <CardTitle>Pro</CardTitle>
        <CardDescription>$24 / mo</CardDescription>
      </CardHeader>
      <CardContent>
        <ul className="text-xs list-disc pl-4">
          <li>Unlimited projects</li>
          <li>Priority support</li>
        </ul>
      </CardContent>
      <CardFooter><Button className="w-full">Start</Button></CardFooter>
    </Card>
  )
}

Dashboard Grid

Responsive grid of metric cards.

Revenue
Active Users
Conversion
Latency
DashboardGrid.tsx
export function DashboardGrid(){
  const items = ['Revenue','Active Users','Conversion','Latency']
  return (
    <div className="grid grid-cols-1 sm:grid-cols-2 gap-3">
      {items.map((k)=>(
        <Card key={k}>
          <CardHeader><CardTitle className="text-sm">{k}</CardTitle></CardHeader>
          <CardContent><div className="text-lg font-bold">—</div></CardContent>
        </Card>
      ))}
    </div>
  )
}

Checkout Actions

Primary and secondary actions for a checkout flow.

CheckoutActions.tsx
export function CheckoutActions(){
  return (
    <div className="flex gap-3">
      <Button variant="default">Pay Now</Button>
      <Button variant="secondary">Save for Later</Button>
      <Button variant="ghost">Apply Coupon</Button>
    </div>
  )
}

Troubleshooting

  • Ensure Tailwind classes exist in your build pipeline.
  • Replace placeholder metrics with real data from your API.
  • Test keyboard navigation and focus states before shipping.