Show More
Expand or collapse a long list or block. The trigger owns aria-expanded; you own the content.
Default
Controlled. Toggle expanded and render the hidden rows yourself.
Expanded
Pass expanded to flip the chevron and the default Show Less label.
1
<ShowMore :expanded="true" />
No border
Drop the hairline when the trigger sits on a card or already-divided stack.
1
<ShowMore no-border :expanded="expanded" @click="expanded = !expanded" />
Custom label
Slot the label. Title Case. Include the hidden count so the click has a cost.
Best practices
- Use Show More for one long list or block. Sibling pages of the same set belong on Pagination. Optional sections belong on Collapse.
- Show 5–10 rows before truncating so the list still has a shape. Cutting at two rows makes the control feel decorative.
- Put the hidden count in the label (
Show 12 More), thenShow Lessafter expand. Title Case both. - Do not collapse the same list after the user opened it in the middle of a flow. That jumps the scroll away from what they were reading.
- Keep a small hidden set in the DOM so find-in-page works. Lazy-load only when the extra rows would hurt first paint.
- The trigger is a button. Point
aria-controlsat the list. After expand, move focus to the first newly shown row.