Skip to content
GetUrUI

Legal Pages

2 variantsNewPro
.md

Two policy pages with clearly marked sample text: a long-form document whose sticky contents follow your reading position, and a summary-first page with plain-language cards that jump to and flash the full section.

legaltermsprivacycookiespolicytable of contentsscrollspypage

Document with contents

Newdocument.tsx

Long-form terms with a sticky table of contents and scrollspy (IntersectionObserver), reading progress, copyable section links and a mobile contents menu.

$npx shadcn@latest add @geturui-pro/legal-pages-document
PropTypeDefaultDescription
eyebrow / title / effective / version / introstring—Header copy and badges.
sections{ id; title; body: (string | { list: string[] })[] }[]—Paragraphs and bullet lists per section.
sampleNoticebooleantrueShows the sample-text notice.
contactEmailstring—Linked in the contact section.
stickyOffsetnumber0Height of a fixed site header, so sticky contents sit below it.
classNamestring—Classes for the outer element.

Summary first

Newsummary-first.tsx

Plain-language summary cards above the full text; each jumps to and flashes its section. Switch policies with a blurred crossfade and expand what changed.

$npx shadcn@latest add @geturui-pro/legal-pages-summary-first
PropTypeDefaultDescription
title / descriptionstring—Header copy.
policies{ id; label; updated; changes?; summaries: { icon; title; text; section }[]; sections: { id; title; paragraphs }[] }[]—Policies; each summary points at a section id.
value / defaultValuestring—Active policy id (controlled / uncontrolled).
onValueChange(id: string) => void—Called when a policy is chosen.
sampleNoticebooleantrueShows the sample-text notice.
classNamestring—Classes for the outer element.

Install the whole set

Installs every legal pages variant at once. Each section above has its own command for a single variant.

Pro installs use your private registry token. Add the @geturui-pro registry once — setup guide. The command works after you get Pro.

$npx shadcn@latest add @geturui-pro/legal-pages

Accessibility

  • Contents links mark the section in view with aria-current="location"; jumping moves focus to the section heading.
  • Policy switcher is a tablist with arrow, Home and End keys; “What changed” is a disclosure with aria-expanded.
  • Smooth scrolling, gliding indicators and flashes are instant or faded under reduced motion.

Related