shadcn.io is not affiliated with official shadcn/ui
Card examples · Standard
Login Card for React
A login card with email and password fields, a forgot-password link, a social sign-in button and a sign-up link.
A login form is often the first thing people see. This React card holds the whole form: an email field, a password field with a Forgot your password link, a Login button, a Login with Google button, and a sign-up link in the footer. Use it for a sign-in page, or put it in a dialog for a login that doesn't leave the page.
Preview
Installation
FAQ
How are the labels tied to the fields?
Each label and input sit in a Field. FieldLabel points at its input with htmlFor, and the input has the matching id. Clicking a label focuses its field.
How do I submit the form?
Wrap the content in a form, make Login type="submit", and give the inputs a name and required. The demo has no form or handler, so the buttons do nothing yet.
Where is Forgot your password?
In a flex items-center justify-between row with the password label, above the input. It's a plain link: point its href at your reset page.
What are the two buttons?
Login, the default filled button, and Login with Google, variant="outline". Both are w-full. Add your provider's logo before the second label, or more outline buttons for more providers.
Related
- Standard CardA basic card with a title, a description
- Meeting Notes CardA card with meeting notes, a numbered
- Image CardA listing card with a full-width photo
- Standard DialogA share dialog with a read-only link, a
- Accordion Form with Icon SectionsA form split into personal, contact and
- Bottom-Sliding SheetA sheet that slides up from the bottom of