# SignIn

Supply UI 1.2.0. Layout.

The screen a private app shows to someone who is not signed in: a band in the ink colour with a fine grid, its `mark` (or `markSrc`, an image of it painted in the band's text colour, named by `markLabel`), a large heading in two lines (a quiet `lead` such as "Sign in to", then the app's name as `title`), and under it a panel in the page's colour with a line of `text`, the sign-in button as its children (one per account that can sign in, full width, one under the other) and a quiet `note`, such as where they will sign in. `error` says why the last try did not work. It sends people to the account that signs them in, like "Sign in with Google": an app never has a password form of its own. Centred in the space it is given

The screen a private app shows to someone who is not signed in: a band in the ink colour with a fine grid, the heading in two lines (a quiet `lead`, then the app's name), and under it a panel with a line of text and the button that sends them to the account that signs them in (like "Sign in with Google"). The app never has a password form of its own. It fills the space it is given, at least most of a screen.

## Options

| Option | Type | Default | What it does |
| --- | --- | --- | --- |
| `children` (needed) | `ReactNode` |  | The sign-in button, or buttons: one per account that can sign in. |
| `title` (needed) | `ReactNode` |  | The heading's second line, what signing in opens: the app's name. |
| `className` | `string` |  | More classes on the outer element, for layout around it (margins, grid placement), not to restyle it. |
| `error` | `ReactNode` |  | Why the last try did not work ("That sign-in ran out"), shown above the button. |
| `lead` | `ReactNode` |  | The heading's quiet first line, what signing in does: "Sign in to". |
| `mark` | `ReactNode` |  | The app's mark or logo, above the heading. |
| `markLabel` | `string` |  | The mark's name, read out. |
| `markSrc` | `string` |  | The address of the app's mark as an image, above the heading in the band's text colour: only its shape counts. |
| `note` | `ReactNode` |  | One quiet line under the button, such as where they will sign in. |
| `text` | `ReactNode` |  | One or two plain sentences in the panel: whose account to use, what happens next. |

## Without React

Classes: `section.ui-signin` > `h1.ui-signin-title` + `.ui-signin-panel` > `.ui-signin-actions`

## CSS parts

With the CSS in parts (`/ui/css/`), it needs: `components/sign-in.css`, besides the ones every page loads.

## Layout: notes

**States.** Layout follows the box it is in, not the window: `Split`, `Grid`, `AppShell` and the site parts stack when their box is narrow, at any width of the window.

**Do**
- Space with `gap` (`Stack`, `Row`, `Grid`), never with margins on children.
- Put the page's sections straight on the page, under their titles; a `Card` is one thing a person picks or acts on.
- Check every screen at 320, 375 and 768 px with the narrow check of rule 10.

**Don't**
- Don't give a box a fixed width, or a `min-height` together with an `aspect-ratio`.
- Don't nest a card in a card.
- Don't put two `<main>`s on a page: a screen shown inside another page takes `Main as="div"`.
