Centered Card Sign-in
A centred login card with email, a toggleable password field and a submit button.
3 frameworksBeginner
A gradient logo badge centred above the login card, deriving its initial from the brand prop.
<!--
A boxed logo badge sits above the card and centres over it. The logo is a
gradient square with the brand initial - no external asset - and it is
aria-hidden because the brand name is written out just beneath it, so a screen
reader is not made to read the same brand twice.
-->
<div class="mx-auto w-full max-w-sm">
<div class="flex flex-col items-center">
<span aria-hidden="true" class="grid h-12 w-12 place-items-center rounded-xl bg-gradient-to-br from-blue-600 to-indigo-600 text-lg font-bold text-white shadow-sm">A</span>
<h1 class="mt-3 text-lg font-bold tracking-tight text-gray-900 dark:text-gray-100">Sign in to Adysre</h1>
</div>
<form class="mt-6 space-y-4 rounded-2xl border border-gray-200 bg-white p-6 shadow-sm sm:p-8 dark:border-gray-800 dark:bg-gray-950" action="#" method="post">
<div>
<label for="boxed-email" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Email</label>
<input id="boxed-email" name="email" type="email" autocomplete="email" required placeholder="you@company.com" class="mt-1.5 w-full rounded-lg border border-gray-300 bg-white px-3.5 py-2.5 text-sm text-gray-900 placeholder:text-gray-500 focus-visible:border-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100 dark:placeholder:text-gray-400 dark:focus-visible:ring-blue-400" />
</div>
<div>
<label for="boxed-password" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Password</label>
<input id="boxed-password" name="password" type="password" autocomplete="current-password" required placeholder="••••••••" class="mt-1.5 w-full rounded-lg border border-gray-300 bg-white px-3.5 py-2.5 text-sm text-gray-900 placeholder:text-gray-500 focus-visible:border-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100 dark:placeholder:text-gray-400 dark:focus-visible:ring-blue-400" />
</div>
<button type="submit" class="w-full rounded-lg bg-blue-600 px-5 py-2.5 text-sm font-semibold text-white transition-colors hover:bg-blue-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 focus-visible:ring-offset-2 focus-visible:ring-offset-white motion-reduce:transition-none dark:focus-visible:ring-blue-400 dark:focus-visible:ring-offset-gray-950">Sign in</button>
</form>
</div>| Prop | Type | Default | Description |
|---|---|---|---|
brand | string | 'Adysre' | Brand |
onSubmit | (data: { email: string; password: string }) => void | - | Called with the form's values when it is submitted. |
className | string | - | Additional classes merged onto the root element. |
The badge is a CSS gradient square with the brand initial - no external asset - and is `aria-hidden` because the brand name is written just beneath it, so a screen reader is not made to read the brand twice.