Skip to content
VenusUI
Get started

Sign-in Form

A centered sign-in card with password show/hide that you connect to your auth provider.

Preview

Installation

npx shadcn@latest add @venusui/login-01

Run this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.

Files added to your project

Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.

  • @/components/ui/password-input.tsxfrom password-input
  • @/components/login-01.tsx

Also adds the shadcn button component if your project doesn't have it yet.

Usage

The code behind the preview above.

login-01-demo.tsx

import { Login01 } from "@/components/login-01"

export default function Login01Demo() {
  return <Login01 />
}

API reference

PropTypeDefaultDescription
onSubmit(credentials: { email: string; password: string }) => Promise<void> | void—Signs the user in. Throw an Error with a message to show it. Without it, submitting says the form isn’t connected.

Only the prop above.

Requirements

  • shadcn button and VenusUI password-input. The CLI installs both.

Customization

  • Connect it to Supabase, Auth.js or your own API in onSubmit, and redirect on success.
  • Never log or store passwords yourself; let your auth provider handle them.

Accessibility

  • Labelled fields with correct autocomplete values; errors are announced through a status region.

Troubleshooting

Submitting says the form isn’t connected.
Pass an onSubmit handler. The block never pretends to sign anyone in.
Unknown registry "@venusui"
Your shadcn CLI couldn’t find the namespace in the shadcn registry index. Use the latest CLI (npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.
No components.json found
Run npx shadcn@latest init in your project first.