Magoo Component UI logo Magoo Component UI
← Catalog

Recent Searches

recent-searches molecule experimental

A history block of recent-query chips, each with a clock icon and remove button, plus a clear-all action.

The width preview needs a screen wider than the chosen width — use a larger device (or a desktop browser) to see the desktop and tablet layouts.

Default

Recent

webhooks retry api keys rate limits oauth scopes pagination
Short

Recent

running shoes wireless earbuds

Props

NameTypeReq
searches array ✓
clear_label string

Related components

How to use

behavior.js wires the controls. Clicking a chip's × hides that chip (via its `hidden` property, so it leaves the accessibility tree and never clashes with layout utilities) and dispatches a bubbling "recent:remove" CustomEvent whose detail.label is the chip's data-label. The header's Clear button hides every chip and dispatches "recent:clear". The component only manages its own chip visibility; the host persists the history and re-runs queries. The portable self-init reads config from the DOM — no props object is passed. behavior.js does not run in screenshots, so captures show every chip.

Use cases

listlist-item WCAG AA SEO 20 dir: both ai-generated