components/ui/ExpandableText

ExpandableText component displays a text paragraph that can be truncated to a maximum number of lines with an option to expand and collapse. Shows a "Show More" / "Show Less" toggle button when the text exceeds the specified number of lines.
Description:
  • ExpandableText component displays a text paragraph that can be truncated to a maximum number of lines with an option to expand and collapse. Shows a "Show More" / "Show Less" toggle button when the text exceeds the specified number of lines.
Source:
Parameters:
Name Type Description
props object Component props.
Properties
Name Type Attributes Default Description
value string <optional>
"" The text content to display.
maxLines number <optional>
3 Maximum number of visible lines before truncation.
className string <optional>
"" Additional CSS classes to apply to the paragraph.
Returns:
A paragraph with expandable/collapsible text.
Type
JSX.Element