For vue2 projects, use @94ai/common-ui
LLMs.md

nf-text-overflow ​

Multiline text folding with rich slots, responsive measurement and expand/collapse labels in eight languages.

Import the components below; see the package README for standalone installation.

Examples ​

Basic usage ​

Loading example…
Basic usage

More examples 2 ​

Loading example…
More examples 2

Props ​

Text props follow the library language when omitted; defaults below use this language.

ParameterDescriptionTypeOptionsDefault
rowsNumber of lines when collapsed.number | string—1
row-heightLine height in pixels.number | string—20
contentText to display; the default slot takes precedence.string—''
expand-textCustomize the “Expand” text.string—Expand
collapse-textCustomize the “Collapse” text.string—Collapse

Events ​

EventDescriptionPayload
click-actionFires on expand/collapse; includes the original mouse event and expanded state.({ event: MouseEvent, expanded: boolean })

Slots ​

ParameterDescriptionPayload
defaultCustom text or rich content, taking precedence over content.—

Methods ​

NameTypeDescription
init()voidSchedule a new overflow measurement.

Migration notes ​

The full text DOM is retained and clipped by height rather than truncating strings. No HTML is injected. Content, width and font changes trigger measurement; the toggle is keyboard accessible.