@redrob-labs/ui v1.0.2 · Redrob Group Design System 2026

LegalDoc

Publishing · src/components/LegalDoc/LegalDoc.tsx

A policy or terms document: summary, numbered sections, and what has changed.

history is the reason this component exists rather than a page of prose. A policy that silently changes is one somebody agreed to under different terms, so the revisions are part of the document and not a changelog somewhere else. "Last changed" and "In force from" are separate fields for the same reason: the gap between them is when a reader can still object.

The default labels are plain words - "Last changed", "In force from", "What has changed" - because a document nobody can read has consent in name only.

Section numbers are rendered, not typed into the titles, so they cannot drift out of order.

Import

import { LegalDoc } from '@redrob-labs/ui';

Rendered

The design system's own preview case, run against this package's build. The parity gate compares this rendering to the reference bundle's.

Props

PropTypeNotes
title React.ReactNode
entity React.ReactNode The legal entity bound by this.
updated React.ReactNode
updatedLabel string
effective React.ReactNode
effectiveLabel string
summary React.ReactNode The document in a few sentences, above the document.
sections LegalSection[]
contentsLabel string
history LegalRevision[] Past revisions, newest first.
historyLabel React.ReactNode
contact React.ReactNode
className string

Exported types

LegalSection, LegalRevision