# Show More A toggle button that switches between "Show more" and "Show less" labels with a caret icon. Used to expand and collapse content sections. ```tsx demo import { useState } from "react"; import { ShowMore } from "@tenstorrent/vesper/show-more"; export default function ShowMoreDemo() { const [expanded, setExpanded] = useState(false); return ( setExpanded(!expanded)} /> ); } ``` ## Options | Prop | Type | Description | Default | | ---------- | -------------------------------------- | ----------------------------------------------------------------------------------------- | ------- | | `expanded` | `boolean` | Whether the content is currently expanded. Controls the button label and `aria-expanded`. | `false` | | `disabled` | `boolean` | When `true`, renders the button in a disabled state and prevents interaction. | `false` | | `onClick` | `MouseEventHandler` | Callback fired when the show more/less button is clicked. | — | ## Examples ### Basic usage `ShowMore` is fully controlled: pass the current `expanded` state to set the button's label and caret direction, and use `onClick` to toggle the content you're revealing: ```tsx demo import { useState } from "react"; import { ShowMore } from "@tenstorrent/vesper/show-more"; import { Typography } from "@tenstorrent/vesper/typography"; export default function ShowMoreWithContent() { const [expanded, setExpanded] = useState(false); return (
{expanded && Additional content revealed here.} setExpanded(!expanded)} />
); } ``` ### Disabled Passing `disabled` prevents interaction: ```tsx demo import { ShowMore } from "@tenstorrent/vesper/show-more"; export default function DisabledShowMore() { return ; } ```