Components / Field Navigator

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

Target above

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

NameTypeDefaultDescription
targetIdstring | nullElement to point at. Hidden while it is on screen.
labelstringWhat to do there, e.g. Add signature.
preview"up" | "down"Documentation only: render in place, pointing this way.

Hooks

NameTypeDefaultDescription
scrollToField(id: string) => voidScroll a field into view and focus its control.
useTargetDirection(id: string | null) => "up" | "down" | nullWhere 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.