# Soft tray sign-in card

> A warm sign-in card for a rentals app that sits in a soft tray, with a turning dot halo, a door mark that draws itself and a button that rolls through its states.

- Kind: Plan
- Page: https://ownlyplans.com/bhaskar/soft-tray-sign-in-card/
- Licence: All rights reserved (view and build only)

## Steps

### 1. Build the tray, card and fields

Lay out the cream page, the card resting in its tray, the title and the two inset fields with icons.

Prompt:

```text
Create a single-file HTML sign-in page for a home rentals app called "Keyhaven", plain HTML, CSS and JavaScript. Warm off-white page (#f4f1ec). Centre a 400px tray (#ebe6de, 30px corners, 6px padding, a soft outer shadow and a light inner edge) holding a cream card (#fffdfa, 24px corners, hairline ring and a small drop shadow); the bottom of the tray shows "New to Keyhaven? Create an account". In the card: a 52px clay tile (gradient #e08a5f to #c65f3b, 16px corners, inner highlight) with a white house-and-keyhole line icon; the title "Welcome home" in Instrument Serif 34px with "home" in clay italic; a muted line "Sign in to see your saved homes, viewings and offers."; then a form with an email well and a password well (46px, 13px corners, #f3efe9 with a soft inset shadow, a 16px icon on the left, visually hidden labels, required fields). On focus a well turns white with a clay ring. Add a row with a custom "Keep me signed in" checkbox and a clay "Forgot password?" link, a 48px near-black "Sign in" button, a dashed "or continue with" rule and three equal white buttons with the Google, Facebook and Apple marks, each with an aria-label.
```

Done when: The card sits in its tray with the tile, title, both fields, the checkbox row, the button and the three provider buttons.

### 2. Add the turning dot halo

Draw rings of small dots on a canvas behind the tile that unwind into place and keep turning.

Prompt:

```text
Put a canvas behind the tile (132 x 112px, sized for devicePixelRatio). Draw six rings of 1px dots from radius 34 to 64 in steps of 6, with the dot count about 0.62 times the radius and each ring a little fainter than the one inside it (warm brown at 55% fading out). Alternate the turning direction ring by ring. On load, ease each ring from 35% of its radius out to full size while it unwinds from an extra 2.2 radians of rotation, then keep it turning slowly (0.12 radians a second). On windows shorter than 640px, scale the halo to 75% and tighten the gaps.
```

Done when: Dotted rings bloom out around the tile and keep turning slowly in alternating directions.

### 3. Intro, show/hide and the rolling button

Bring everything in from one animation loop, wire the password toggle and roll the button through its states.

Uses: keyhaven-sign-in.html

Prompt:

```text
Drive all motion from one requestAnimationFrame loop that starts when fonts are ready. The tray rises 26px and fades in over 0.8 s. The tile springs in at 0.35 s with a damped spring (scale 0 to 1 with a little overshoot, unrotating from -14 degrees), then its two paths draw in with stroke-dashoffset. Every row (title, line, fields, checkbox row, button, rule, providers, tray footer) rises 10px and un-blurs from 5px, 65ms apart. The eye button toggles the password between hidden and shown, switches its icon and sets aria-pressed and aria-label ("Show password" / "Hide password"). On submit, let the browser validate (report errors if any); otherwise stack three labels in the button (Sign in; spinner + Signing in…; check + Welcome back) and ease between them with translateY, turn the button green on success, disable it while busy, and keep a visually hidden live copy of the label. Put the real calls in onSubmit({ email, password }) and onProvider(name). With prefers-reduced-motion, keep the fades and drop the travel and turning.
```

Done when: The card floats in, the mark draws itself, the eye reveals the password, and pressing Sign in rolls to Signing in… and then a green Welcome back.

## Files

- keyhaven-sign-in.html: https://ownlyplans.com/bhaskar/soft-tray-sign-in-card/keyhaven-sign-in/ (The finished file. Open it in a browser. Put your auth calls in onSubmit and onProvider at the top of the script.)

## About

A single-file email and password sign-in page in plain HTML, CSS and JavaScript. A cream card rests in a slightly darker tray that holds the sign-up line. Above the title, rings of tiny dots unwind into place and keep turning in opposite directions around a clay-coloured tile, which springs in and draws its house-and-keyhole mark. Every row rises and un-blurs on a stagger. The fields sit in soft inset wells with icons, the password has a real show/hide toggle, and there is a "Keep me signed in" checkbox and a forgot-password link. The sign-in button rolls its label from Sign in to a spinner and Signing in, then turns green with Welcome back. Google, Facebook and Apple buttons sit under a dashed rule. The demo brand is Keyhaven; put your auth calls in onSubmit and onProvider at the top of the script.

---
Also available as JSON: https://ownlyplans.com/bhaskar/soft-tray-sign-in-card/?format=json
MCP server: https://ownlyplans.com/mcp
