# makeup-listbox-button

> A JavaScript class representing an ARIA listbox button

Latest version **0.6.1** (published 2026-04-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install makeup-listbox-button
pnpm add makeup-listbox-button
yarn add makeup-listbox-button
bun add makeup-listbox-button
```

## Health

**Score 55/100 (C)** — status: stable.

Positive: esm support; no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.6.1 |
| Published | 2026-04-01 |
| First published | 2021-05-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 18.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 47 |
| Author | Ian McBurnie |
| Maintainers | dylanpiercey, sendlo, ianmcburnie, agliga, saiponnada, artblue, lulavalva |

## Links

- npm: https://www.npmjs.com/package/makeup-listbox-button
- Repository: https://github.com/makeup/makeup-js.git#master
- Homepage: https://github.com/makeup/makeup-js/tree/master#readme
- Issues: https://github.com/makeup/makeup-js/issues
- npm.io page: https://npm.io/package/makeup-listbox-button

## Dependencies (2)

- [makeup-listbox](https://npm.io/package/makeup-listbox.md) ^0.5.1
- [makeup-expander](https://npm.io/package/makeup-expander.md) ^0.13.0

## Recent versions

- 0.6.1 (latest) — 2026-04-01
- 0.6.0 — 2026-03-31
- 0.5.13 — 2026-01-14
- 0.5.12 — 2025-08-19
- 0.5.11 — 2025-08-13
- 0.5.10 — 2025-04-22
- 0.5.9 — 2025-04-04
- 0.5.8 — 2025-02-27
- 0.5.7 — 2025-01-29
- 0.5.6 — 2025-01-28
- 0.5.5 — 2024-12-20
- 0.5.4 — 2024-10-24
- 0.5.3 — 2024-09-03
- 0.5.2 — 2024-08-27
- 0.5.1 — 2024-08-22
- … 12 more at https://npm.io/package/makeup-listbox-button/versions

## README

# makeup-listbox-button

A JavaScript class that represents an ARIA [listbox button](https://ebay.github.io/mindpatterns/input/listbox-button/index.html). No CSS provided.

[View Demo](https://makeup.github.io/makeup-js/makeup-listbox-button/index.html).

## HTML

The following markup structure and classnames are required. Any SVG icons can be used.

```html
<span class="listbox-button">
  <button class="expand-btn" style="min-width: 150px" aria-expanded="false" aria-haspopup="listbox">
    <span class="expand-btn__cell">
      <span class="expand-btn__text">Option 1</span>
      <svg class="icon icon--dropdown" focusable="false" height="8" width="8" aria-hidden="true">
        <use href="icon.svg#icon-dropdown"></use>
      </svg>
    </span>
  </button>
  <div class="listbox-button__listbox">
    <div class="listbox-button__options" role="listbox" tabindex="0">
      <div class="listbox-button__option" role="option">
        <span class="listbox-button__value">Option 1</span>
        <svg class="icon icon--tick-small" focusable="false" height="8" width="8">
          <use href="icon.svg#icon-tick-small"></use>
        </svg>
      </div>
      <div class="listbox-button__option" role="option">
        <span class="listbox-button__value">Option 2</span>
        <svg class="icon icon--tick-small" focusable="false" height="8" width="8">
          <use href="icon.svg#icon-tick-small"></use>
        </svg>
      </div>
      <div class="listbox-button__option" role="option">
        <span class="listbox-button__value">Option 3</span>
        <svg class="icon icon--tick-small" focusable="false" height="8" width="8">
          <use href="icon.svg#icon-tick-small"></use>
        </svg>
      </div>
    </div>
  </div>
</span>
```

## CSS

No CSS is provided. However, the class is fully compatible with [eBay Skin](https://ebay.github.io/skin/#listbox-button).

## JavaScript

```js
import ListboxButton from "makeup-listbox-button";

document.querySelectorAll(".listbox-button").forEach(function (el, i) {
  const widget = new ListboxButton(el, config);

  el.addEventListener("makeup-listbox-button-change", function (e) {
    console.log(e.type, e.detail);
  });
});
```

## Config

The constructor takes a configuration object as its second parameter.

todo

## Events

### makeup-listbox-button-change

Fired when the listbox selection is changed.

- `fromValue`: the old value
- `toValue`: the new value

---
_Source: https://npm.io/package/makeup-listbox-button · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
