Skip to main content
U.S. Flag

An official website of the United States government

Review

The review pattern is used for listing a summary of information entered by a user. Its content includes a heading, value, and edit link.

Examples

The Review component wraps up the styles and markup required to make a single reviewable row. They are designed to be used either alone, as a single row, or multiple rows can be combined together one after the other to present more information. The component can take text or HTML as row content.

Loading

Code

React

React Properties Documentation
NameTypeDefaultDescription
childrenrequiredReactNodeReview component's body content.
classNamestring
editAriaLabelstringOptional label to give screenreaders longer, more descriptive text to explain the context of an edit link.
editContentReactNodeAn optional node in place of the edit link. If this defined, no edit link will be shown.
editHrefstringHref for the edit link. If this is undefined, no edit link will be shown.
editTextReactNode
headingReactNode
headingLevelReviewHeadingLevel3Heading type to override default <h3>.
onEditClick(...args: any[]) => anyAn optional function that is executed on edit link click. The event and props.editHref value are passed to this function.

Styles

The following CSS variables can be overridden to customize Review patterns:

CSS variables for review
VariableDefault Core Theme Value
--review__border-colorhex value: #d9d9d9--color-border

Component maturity

For more information about how we tested and validated our work for each checklist item, read our component maturity documentation.

Accessibility

  • Color

    Meets AA color contrast standards for accessibility and color blindness.
    Complete
  • Forced Colors Mode (FCM)

    While using FCM the components text is legible and improves readability.
    Complete
  • WCAG 2.1 Level AA Conformance

    All Axe checks for WCAG AA compliance have passed.
    Complete
  • Screen readers

    VoiceOver, NVDA, and JAWS screen readers provide concise communication and interaction.
    Complete
  • Keyboard navigation

    Component is fully navigable with a keyboard.
    Complete

Code

  • Storybook

    Component has stories to cover all defined props.
    Complete
  • Responsive

    Component designed to work in all responsive breakpoints.
    Complete
  • Spanish translations

    Includes Spanish translations for default text content.
    Complete

Tokens

  • Code

    Tokens implemented in code.
    Complete
  • Design

    Tokens implemented in the Sketch.
    Complete