Skip to components
DEVELOPER REFERENCE

HistoryReview API

Props, callbacks and methods. Select an underlined type to explore its fields, allowed values and callback arguments.

HistoryReview8 props3 callbacks0 methods

Preset and CSS

Set preset.className to attach your CSS class to the component's rendered surface. Explicit component props take precedence over preset options.

CSS parts in the example [data-part="author"] [data-part="comparison"] [data-part="comparison-control"] [data-part="comparison-label"] [data-part="root"] [data-part="versions"] [data-part="versions-label"]

Use styles.root and styles.parts in a theme and generate a CSS file with themeToCss. For other JSON-friendly component props, spread presetProps(preset) before explicit props. Parts and states depend on configuration; the gallery shows those visible in the current preview.

Props8

HistoryReview props
NameTypeDescription
labelRequiredstringAccessible title for the review.
versionsRequired
readonly HistoryVersion[]Inspect type
Versions in newest-first order.
currentIdOptionalstring | undefinedCurrent version ID. Defaults to the first version.
valueOptionalstring | undefinedControlled ID of the version being inspected.
openOptionalboolean | undefinedOmit for inline rendering or control modal visibility with a boolean.
labelsRequired
HistoryReviewLabelsInspect type
Localized review, comparison and restore strings.
presetOptional
ClassPreset | undefinedInspect type
Optional presentation preset.
classNameOptionalstring | undefinedAdditional root classes.

Events and callbacks3

HistoryReview events and callbacks
NameTypeDescription
onValueChangeOptional
((id: string) => void) | undefinedInspect type
Reports a selected version ID.
onCloseOptional
(() => void) | undefinedInspect type
Reports that the modal should close.
onRestoreOptional
((id: string) => void) | undefinedInspect type
Runs after confirming a restore. The host persists the resulting version.

Methods0

No component-specific imperative methods. Use props and callbacks to control this component.