Sign-in buttons

Free

The sign-in stack: a full-width glass button per provider with its mark, then the email primary, each showing its own loading while its sign-in starts.

npx shadcn@latest add @pixilui/sign-in-buttons

Preview

The provider you pick waits on its promise; the others step back.
Show

When to use

Use it when

  • A sign-in or sign-up page or dialog with one or more identity providers and email.
  • Connecting an account inside settings, with the providers your app supports.

Use something else when

  • Connecting a tool to an agent (Linear, Slack): use a connection row or the dialog with scopes.
  • One provider and nothing else: a single Button is enough.

Installation

Terminal
npx shadcn@latest add @pixilui/sign-in-buttons

Adds sign-in-buttons.tsx with button.tsx, and installs clsx and tailwind-merge. First PixilUI item in this app? Add the registry once, as in Installation.

Usage

example.tsx
import { SignInButtons } from "@/components/pixilui/sign-in-buttons";

<SignInButtons providers={providers} onEmail={onEmail} />

Fills its container up to 320px (max-w-80); set a className to change the measure.

API reference

PropTypeDefault
providersRequiredSignInButtonsProvider[]–The providers, in order, each a full-width secondary.
emailLabelstring"Continue with email"The primary's label.
onEmail() => void | Promise<void>–Continues with email. Leave it out to show providers only. Return a promise to show loading.

Also takes every native <div> attribute, and a ref.

Keyboard

TabMoves through the providers, then the email button.
EnterStarts the focused sign-in; focus stays on it while it loads.
SpaceStarts the focused sign-in on release.

Accessibility

  • Native buttons; each label says what happens ("Continue with GitHub"), and the marks are aria-hidden.
  • While one sign-in runs, it is aria-busy and the others are aria-disabled, never disabled, so focus stays where it was.
  • data-provider names each button and data-pending the running one, for styling and tests.

Motion

  • The pressed button swaps its mark for the ring spinner, cross-fading in 200ms; the width holds, since it fills the stack.
  • Each press scales to .96 in 150ms ease-out.
  • Reduced motion: no press scale; the spinner slows to a still-readable turn.

PixilUI Pro opens Thu 10 Dec. The first 20 licenses are $99.