Signer page kit
Buttons and inputs
The primitives everything else is made of: button classes, text inputs and the spinner. One primary button per view.
- In the signer page, not yet in the package
- AGPL-3.0-only
- Client only · no backend
Theme
The CSS variables this sets
:root {
--signing-accent: #3157e8;
--sig-accent: #3157e8;
--sig-accent-soft: color-mix(in oklab, #3157e8 14%, white);
--sig-radius: 8px;
--radius-control: 8px;
--radius-panel: 12px;
--font-sans: var(--font-inter), ui-sans-serif, system-ui, sans-serif;
}In the signer page kit, set the accent with accentProps(accent) on the element around the surface; it sets data-signing-accent and --signing-accent. The secure elements take the same values as a checked appearance object instead.
Busy, and not ready yet
aria-disabled keeps a button pressable, so a press can point to what is left.
tsx
import { Spinner } from "@/components/signing";
export function Example() {
return (
<>
<button className="btn-primary" aria-busy="true">
<Spinner /> Signing…
</button>
<button className="btn-primary" aria-disabled="true">
2 fields left
</button>
</>
);
}
Text inputs: filled, empty, disabled, error
Enter a whole email address.
tsx
export function Example() {
return (
<>
<label className="label" htmlFor="name">Full name</label>
<input id="name" className="input" defaultValue="Ada Example" />
<label className="label" htmlFor="email">Email</label>
<input id="email" className="input" placeholder="you@example.com" />
<label className="label" htmlFor="off">Disabled</label>
<input id="off" className="input" disabled defaultValue="Locked by the sender" />
<label className="label" htmlFor="bad">With an error</label>
<input id="bad" className="input" aria-invalid="true" aria-describedby="bad-error" defaultValue="ada@" />
<p id="bad-error">Enter a whole email address.</p>
</>
);
}
Installation
npx shadcn@latest add …
Not published yet
Not in the registry (packages/ui/registry.json) yet.
Props
className and children are left out: every component that takes them passes them on.
Spinner
| Name | Type | Default | Description |
|---|---|---|---|
| size | number | 16 | Inside a busy button, next to its label. |
Classes
| Name | Type | Default | Description |
|---|---|---|---|
| btn-primary | class | The one main action. aria-disabled keeps it pressable while it points to what is left. | |
| btn-secondary | class | Other actions. | |
| btn-ghost | class | Quiet actions such as Cancel. | |
| btn-danger | class | Decline and other actions that end something. | |
| input | class | Text input. 16 px on touch screens, so iOS does not zoom. | |
| label | class | Form label. |
Accessibility
- Buttons have a visible focus outline. A busy button keeps its label next to the spinner.