Skip to content

No.375 · Authentication

Consent Sign-in

A split OAuth sign-in with a drifting constellation, hand-drawn dividers, and providers that unlock only after consent.

The prompt

Copy this text

Automatic copying is unavailable. Copy the selected text using your device’s copy command.

The design brief behind this component — reuse it to regenerate, remix, or explain it.

Design a two-panel sign-in page on a warm near-black canvas. The left 45% is an atmospheric panel: a deep night backdrop (a dark veil over a warm city-glow gradient — swap in a photograph if you have one), a canvas constellation of 20 amber nodes drifting slowly (speed 0.12, gentle damping, bouncing off the edges) connected by lines whose opacity fades with distance (link radius ~12% of the width), rendered at ~30fps and paused offscreen. Over it: a mono "back to home" link, a large headline whose last phrase is an italic serif, a muted lead, and a mono uppercase brand line at the bottom. Between the panels, instead of a straight border, draw a tall hand-drawn squiggle (an SVG path with preserveAspectRatio="none") that sketches itself in on mount. The right side centres a 26rem form, bracketed top and bottom by short hand-drawn wavy rules that also draw in (380ms, ease-out-expo): a mono "Sign in" eyebrow, a 600-weight title, a muted subtitle, three full-width OAuth provider buttons (brand marks + label, hairline border, 6px radius), and a consent checkbox with an amber inline link. The providers stay disabled at 45% opacity with a not-allowed cursor until the consent box is ticked; once enabled they gain an amber border on hover and focus. The checkbox is a real input with a custom 20px box that fills amber and fades in a check. On narrow containers the left panel disappears and the back link moves above the form. Implementation requirements: Use React and TypeScript. Keep the component self-contained, with uniquely scoped CSS and no animation libraries. Include required imports, styles and font setup in the result. Interaction: Tick consent to enable the provider buttons; hover/focus an enabled provider for the amber border. The constellation drifts on its own. Motion: Sketch rules draw on mount (380ms; the tall divider 900ms). Canvas at ~30fps, paused offscreen and in hidden tabs. Buttons/checkbox 200ms. Accessibility: Page <h1>, a labelled form, real <button>s that are truly disabled until consent (with a visually hidden hint linked via aria-describedby), and a native checkbox. Decorative canvas and rules are aria-hidden. Reduced motion skips the canvas and shows rules drawn. Responsive behavior: Container queries: split layout from 48rem; below that a single centred column with the back link on top. Touch: Nothing is hover-dependent. Preserve keyboard access, visible focus and reduced-motion behavior. Keep fictional demo data and simulated service calls in a separate usage example; expose callbacks for real actions and recover from rejected requests. Keep usage-example links inside the demo: use local buttons or prevent navigation. Demonstration links must not navigate to Vitrine routes or open other pages; preserve real URL support in the reusable component itself. Verify the result at narrow and wide viewport sizes, with keyboard input and reduced motion enabled.

Notes

Interaction
Tick consent to enable the provider buttons; hover/focus an enabled provider for the amber border. The constellation drifts on its own.
Motion
Sketch rules draw on mount (380ms; the tall divider 900ms). Canvas at ~30fps, paused offscreen and in hidden tabs. Buttons/checkbox 200ms.
Accessibility
Page <h1>, a labelled form, real <button>s that are truly disabled until consent (with a visually hidden hint linked via aria-describedby), and a native checkbox. Decorative canvas and rules are aria-hidden. Reduced motion skips the canvas and shows rules drawn.
Responsive
Container queries: split layout from 48rem; below that a single centred column with the back link on top.
On touch
Nothing is hover-dependent.