# Show more

Opens the rest of a list cut short, and closes it again.

This is the HTML to build it with `dex.css`, for work outside the Dex codebase. Read https://brand.meetdex.ai/design.md first: it says how to set up a page and how to use the stylesheet. The page at https://brand.meetdex.ai/components/show-more shows the Dex app's own React component, which only works inside the Dex codebase.

## HTML

The small outline button between two hairlines that mark where the list was cut, with a chevron that turns as it opens.

```html
<ul id="jobs">…the first three jobs…</ul>
<ul id="more-jobs" hidden>…the rest…</ul>
<div class="dex-show-more">
  <button class="dex-button dex-button--outline dex-button--sm" aria-expanded="false" aria-controls="more-jobs"
    onclick="const open = this.getAttribute('aria-expanded') !== 'true'; this.setAttribute('aria-expanded', String(open)); document.getElementById('more-jobs').hidden = !open; this.firstChild.textContent = open ? 'Show less ' : 'Show 3 more '">Show 3 more <svg aria-hidden="true"><!-- Lucide chevron-down --></svg></button>
</div>
```

- **Plain**: `dex-show-more--plain` drops the hairlines and centres the button, where something already marks the edge, such as the foot of a card.
- The chevron turns while `aria-expanded="true"`.

## Rules

- Use it for one long list cut short, such as a candidate's jobs. Show the first few, usually two to five, and open the rest under them. For pages of the same data use pagination; for a section a reader may not need at all, an accordion (https://brand.meetdex.ai/components/accordion.md).
- Say how many are hidden: "Show 3 more", then "Show less". Sentence case.
- Keep what it opens in the page, not fetched on the press, so it opens at once and find-in-page reaches it.
