@eds/show-more
v4.2.0
ShowMore
Truncate long content with an optional expand/collapse toggle.Prop | Required | Description | Type |
---|---|---|---|
children | ✅ | The content to be displayed and truncated | string | number | false | true | ReactElement<any, string | JSXElementConstructor<any>> | ReactPortal | { key?: string | number; ref?: null; props?: { children?: boolean | ReactChild | ReactPortal | StrictReactFragment; }; } | (boolean | ReactChild | ReactPortal | StrictReactFragment)[] |
maxHeight | — | Maximum height of the content (when collapsed) | string | numberSupports responsive prop syntax |
aria-labelledby | — | ID of visible text (outside the hidden content) that names the content. Prefer this when you have a heading or other visible text that describes the content. | string |
aria-label | — | Accessible name for the toggle that describes the content it reveals. Use this when you don't have visible text that can be referenced. | string |