MindeesUI
ComponentsTypography

Read More

Collapsible text that clamps to a line count then reveals a tappable Read more or Show less toggle styled as an inline link.

ReadMore clamps its content to numberOfLines then appends a tappable toggle that expands and re-collapses the text. The toggle is a link-toned inline Text with a button accessibility role. Its expanded state is uncontrolled — defaultExpanded only sets the initial state.

Import

import { ReadMore } from '@mindees/ui';

Usage

<ReadMore numberOfLines={3}>{longBiography}</ReadMore>

Props

PropTypeDefaultDescription
numberOfLinesnumber3Lines shown while collapsed.
moreLabelstring'Read more'Toggle label shown when collapsed.
lessLabelstring'Show less'Toggle label shown when expanded.
defaultExpandedbooleanfalseStart expanded (initial state only).
childrenReact.ReactNodeText content to clamp and reveal.

Inherits all TextProps.

Accessibility

The toggle is an inline Text with accessibilityRole="button" and reports accessibilityState.expanded so screen readers announce whether the text is collapsed or expanded. The toggle labels ("Read more" / "Show less") describe the action clearly when activated.

On this page