Auth
Sign in, sign up, reset and one-time codes
Sign in
Sign up
Forgot password
One-time code
Check your email
Enter the six-digit code we sent to you@example.com.
Use 123456 in the preview.
Didn't get a code?
Installation
npx shadcn@latest add @sudokw/primitives-buttonimport { Button } from "@gpuixui/primitives";npx shadcn@latest add @sudokw/components-cardimport { Card } from "@gpuixui/components";Usage
import { Button, Input, Label, Separator, Stack, Text } from "@gpuixui/primitives";
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from "@gpuixui/components/card";
export function SignInCard() {
return (
<Card variant="outline" style={{ width: 360 }}>
<CardHeader>
<CardTitle>Login to your account</CardTitle>
<CardDescription>Enter your email below to login to your account</CardDescription>
</CardHeader>
<CardContent>
<Stack direction="column" gap="md">
<Label>Email</Label>
<Input label="Email" placeholder="you@example.com" fullWidth />
<Label>Password</Label>
<Input label="Password" placeholder="••••••••" fullWidth />
<Button variant="primary" fullWidth onActivate={signIn}>
Sign in
</Button>
<Separator label="or continue with" />
<Button variant="secondary" fullWidth onActivate={signInWithGitHub}>
GitHub
</Button>
</Stack>
</CardContent>
<Text role="caption" tone="muted">
Don't have an account?
</Text>
</Card>
);
}Composition
| Part | Responsibility |
|---|---|
Card | the centred surface, variant="outline" |
CardHeader / CardTitle / CardDescription | the mark, the title and the sentence under it |
CardContent | the field column, the actions and the divider |
CardFooter | the route to the neighbouring card |
Label / Input | one named field |
Checkbox | the terms gate and the remembered session |
OTPField | the six code cells |
Separator | the "or continue with" divider |
Button | the primary action, the providers, the links and the resend control |
Text | the footer sentence and the inline note |
API reference
Each recipe adds its own callback set.
Recipes
| Member | Contract |
|---|---|
LoginPage | onSubmit, onProvider, pending, error |
SignupPage | onSubmit, pending, error |
ForgotPasswordPage | onSubmit, pending |
OtpPage | onSubmit, onResend |
SignInPage | the full page — navbar, form card and quote panel — over the same callbacks |
Keyboard
| Key | Contract |
|---|---|
Tab | walks fields, links, the primary action, both providers and the footer in order |
Enter | submits the focused form; the primary action carries the busy state |
Space | toggles the focused checkbox; the terms gate is submitted with the form |
Backspace | in an empty one-time-code cell, moves focus to the previous cell |
Tab from a code cell | leaves the group; the cells are one tab stop each, not a roving group |
Edit this page on GitHubapps/docs/content/docs/components/auth.mdx