Components / Sheet

Signer page kit

Sheet

One task at a time. Rises from the bottom on a phone, a centred dialog on wider screens.

  • 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.

Open it

Then try Escape or a tap outside. On a phone it rises from the bottom.

Review and sign

Mutual NDA, Example Labs

The signing page uses this for the signature on phones, and for the final review: the statement to agree to and the Sign button.

Long content

The content scrolls; the footer with the action stays in view.

Terms

Clause 1. Example text only, so the content scrolls while the footer with the action stays in view.

Clause 2. Example text only, so the content scrolls while the footer with the action stays in view.

Clause 3. Example text only, so the content scrolls while the footer with the action stays in view.

Clause 4. Example text only, so the content scrolls while the footer with the action stays in view.

Clause 5. Example text only, so the content scrolls while the footer with the action stays in view.

Clause 6. Example text only, so the content scrolls while the footer with the action stays in view.

Clause 7. Example text only, so the content scrolls while the footer with the action stays in view.

Clause 8. Example text only, so the content scrolls while the footer with the action stays in view.

Clause 9. Example text only, so the content scrolls while the footer with the action stays in view.

Clause 10. Example text only, so the content scrolls while the footer with the action stays in view.

Clause 11. Example text only, so the content scrolls while the footer with the action stays in view.

Clause 12. Example text only, so the content scrolls while the footer with the action stays in view.

Clause 13. Example text only, so the content scrolls while the footer with the action stays in view.

Clause 14. Example text only, so the content scrolls while the footer with the action stays in view.

useCompactLayout

Resize the window: true below 1024 px.

useCompactLayout(): false (1024 px or wider: a centred dialog)

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.

Sheet

NameTypeDefaultDescription
openbooleanShown as a modal dialog while true.
onClose() => voidEscape, the × button and a tap outside.
titleReactNodeHeading; also the dialog's name.
descriptionReactNodeOne line under the title.
footerReactNodeActions, kept visible while the content scrolls.

Hooks

NameTypeDefaultDescription
useCompactLayout(query?: string) => booleanTrue below 1024 px (or for the media query given).

Accessibility

  • Built on <dialog>: focus stays inside and returns when it closes, and the page behind is inert.
  • Escape, the × button and a tap outside close it. Mark an element data-autofocus to focus it on open.