Skip to content
GitHub (opens in a new tab)

Sign in

Centered sign-in card: SSO, email and password, then a one-time code step.

Install

Not exported from agentic-ds-kit. add copies the source into your app (components/patterns/sign-in/) with this contract beside it. You own the copy: replace the demo data, rearrange or drop sections, and keep the must lines.

npx agentic-ds-kit add sign-in

Usage

import { SignInPattern } from "@/components/patterns/sign-in";

<SignInPattern productName="Northwind Billing" step={step} providers={[{ id: "sso", label: "Continue with company SSO", icon: "Lock" }]} onSubmit={(values) => signIn(values)} onVerifyCode={(code) => verify(code)} onProvider={(id) => sso(id)} onForgotPassword={() => {}} error={error} />

What a copy keeps

The contract’s must lines: the kit look and accessibility. Ask before breaking one.

  • Use kit components from agentic-ds-kit for anything the kit has; no local cousins (tables, dialogs, rows, rules, charts)
  • Semantic tokens only (agentic-ds-kit/tokens.css); no raw hex, no primitive --color-* ramps
  • One appearance="solid" mode="primary" Button per step (Sign in, then Verify); SSO buttons are outline-neutral, forgot and switch are ghost-neutral
  • Do not restyle kit components; change them through their props, slots, and tokens
  • Wrap every labeled input in Field (label, hint, and error wiring)
  • Render inside a main landmark (wrap the pattern, or your page content, in <main>); header and nav chrome, if any, use AppHeader / SideNav (or other header / nav landmarks) and nav stays reachable on small screens
  • Submit is a type=submit Button inside the form (Enter submits), not a Card footer action
  • Providers render above the email form, separated by Divider label="or use email"

Defaults you can change

  • A full page on surface.page with no app chrome (no AppHeader or SideNav); put it in your own layout if you prefer
  • Presentational: pass callbacks (onSubmit, onVerifyCode, onProvider, …); wire your own auth, never store credentials in the component
  • A 400 wide card; size sm below --grid-breakpoint-sm with Forgot password moved under Sign in
  • "Stay signed in 30 days" instead of Remember me, and an invite line instead of a Sign up footer

Built from

  • Component
    →

    Card

    Framed tile with optional header, body, and footer actions.

  • Component
    →

    Field

    One labeled control with optional hint and an error or success message.

  • Component
    →

    InputOTP

    One-time code / PIN as separate slots.

  • Component
    →

    Alert

    Inline status banner that stays on the page.