SSO first
Single sign-on leads; email is the fallback under an "or" divider.
Last updated
---
/**
* SSO first: Single sign-on leads; email is the fallback under an "or" divider.
*
* @page log-in
*/
import { Orbit, KeyRound } from '@lucide/astro'
import AuthShell from '@/components/apogee/sections/AuthShell/AuthShell.astro'
import FeaturedIcon from '@/components/apogee/FeaturedIcon/FeaturedIcon.astro'
import Input from '@/components/apogee/Input/Input.astro'
import Button from '@/components/apogee/Button/Button.astro'
import Divider from '@/components/apogee/Divider/Divider.astro'
import Link from '@/components/apogee/Link/Link.astro'
---
<AuthShell heading="Log in to your account" description="Welcome back! Choose how you sign in." pattern="grid">
<FeaturedIcon slot="brand" theme="solid" color="primary" size="large"><Orbit /></FeaturedIcon>
<div class="flex flex-col gap-6">
<Button href="#" variant="outline" color="neutral" size="large" fullWidth>
<KeyRound slot="start" aria-hidden="true" />
Continue with SSO
</Button>
<Divider>or</Divider>
<form method="post" class="flex flex-col gap-4">
<Input label="Email" type="email" name="email" placeholder="Enter your email" autocomplete="email" required />
<Button type="submit" size="large" fullWidth>Continue with email</Button>
</form>
</div>
<p slot="footer" class="text-neutral-faded">
Don't have an account? <Link href="#" underline="hover" class="font-semibold">Sign up</Link>
</p>
</AuthShell>
Show codeHide code
---
/**
* SSO first: Single sign-on leads; email is the fallback under an "or" divider.
*
* @page log-in
*/
import { Orbit, KeyRound } from '@lucide/astro'
import AuthShell from '@/components/apogee/sections/AuthShell/AuthShell.astro'
import FeaturedIcon from '@/components/apogee/FeaturedIcon/FeaturedIcon.astro'
import Input from '@/components/apogee/Input/Input.astro'
import Button from '@/components/apogee/Button/Button.astro'
import Divider from '@/components/apogee/Divider/Divider.astro'
import Link from '@/components/apogee/Link/Link.astro'
---
<AuthShell heading="Log in to your account" description="Welcome back! Choose how you sign in." pattern="grid">
<FeaturedIcon slot="brand" theme="solid" color="primary" size="large"><Orbit /></FeaturedIcon>
<div class="flex flex-col gap-6">
<Button href="#" variant="outline" color="neutral" size="large" fullWidth>
<KeyRound slot="start" aria-hidden="true" />
Continue with SSO
</Button>
<Divider>or</Divider>
<form method="post" class="flex flex-col gap-4">
<Input label="Email" type="email" name="email" placeholder="Enter your email" autocomplete="email" required />
<Button type="submit" size="large" fullWidth>Continue with email</Button>
</form>
</div>
<p slot="footer" class="text-neutral-faded">
Don't have an account? <Link href="#" underline="hover" class="font-semibold">Sign up</Link>
</p>
</AuthShell>Add
npx @ava-ui/apogee add log-in/sso-first
This copies the page to src/components/apogee/pages/log-in/ with everything it uses: AuthShell, Button, Divider, Input, Link, FeaturedIcon. Render it from one of your routes, or use Copy code above.
Accessibility
- The page heading is the
h1; the form fields carry visible labels andautocompletehints, so password managers fill them. - The SSO button is a link to your identity provider; swap its
hreffor your own.
Related
Auth shellThe frame of a log in, sign up or recovery page; brand mark, heading and your form, centred, in a card, beside a panel, or beside a step sidebar.
DividerA separator between content, horizontal or vertical.
ButtonTriggers an action. Renders a <button>, or an <a> when href is set. Hue, fill and height are three separate props.
InputA labeled text field with hint/error messaging, wired for accessibility — plus a pure-CSS floating label.