Signer page kit
Field Navigator
Floats over a long document and points to the next thing to do. Hides while the target is on screen.
- 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.
Target below
tsx
import { FieldNavigator } from "@/components/signing";
// In a real page pass the field's id as targetId: the arrow follows it and the button hides while it is on screen.
export function Example() {
return <FieldNavigator targetId={null} label="Fill in: Job title" preview="down" />;
}
Target above
tsx
import { FieldNavigator } from "@/components/signing";
export function Example() {
return <FieldNavigator targetId={null} label="Add signature" preview="up" />;
}
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.
FieldNavigator
| Name | Type | Default | Description |
|---|---|---|---|
| targetId | string | null | Element to point at. Hidden while it is on screen. | |
| label | string | What to do there, e.g. Add signature. | |
| preview | "up" | "down" | Documentation only: render in place, pointing this way. |
Hooks
| Name | Type | Default | Description |
|---|---|---|---|
| scrollToField | (id: string) => void | Scroll a field into view and focus its control. | |
| useTargetDirection | (id: string | null) => "up" | "down" | null | Where an element is relative to the screen; null while it is visible. |
Accessibility
- A button: it scrolls to the field and focuses its control, without smooth scrolling when reduced motion is on.
- Hidden means gone for everyone: it is inert, so not focusable and not announced.