IFFDAYIFFDAYDesign
Film and community

ExpandableText

Long text clamped to a few lines, with More to open the rest.

import { ExpandableText } from '@iffday/web/src/kit';

Example

Long text shows lines lines first, six by default, followed by More in red. When the text fits, More does not appear: the component measures the text once and again whenever its width changes. Opened, the link becomes Less.

Props

Clamp long text with record.club's inline MORE.

PropTypeDefault
children*ReactNode
linesnumber6
classNamestring''