Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Search Changelog Block for React

A docs search tool's eight releases behind a search band: type to filter, matched words marked, a slash key that focuses the field, a live count and an empty state with a clear button, on a height that never changes.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A searchable release list for React with Base UI, written for Findlog, a fictional docs search tool. A start-aligned header sits over a ruled band with a full-width search field, a / key hint and a live count, and under it eight release rows from rail to rail. Typing keeps the releases whose title, sentence, version or kind holds the words, ignoring case and accents, and marks the matches in the title and the sentence; Clear, or Escape, brings back the full list, and an empty state offers a Clear search button. Pressing / anywhere on the page, outside a field, focuses the search. An unseen copy of all eight releases sits in the same grid cell, so the block keeps its height and the page doesn't jump while you type. It's built from Input Group, Kbd, Search Highlight Text, Empty, Badge, Button and Guides, with your theme's tokens for every colour. The releases are example data.

FAQ

How do I change the releases?

Edit RELEASES at the top of the file, newest first: each has a version, a date as an ISO day, a title, a summary and a kind. The count line, the empty state and the placeholder read from the array. To search more fields, add them to the string in matches.

What does the search look at?

The title, the sentence, the version and the kind's name, ignoring case and accents, matching the typed text anywhere in them, so "token" finds a release whose sentence mentions tokens and "v2.8" finds two releases. Matched words are marked in the title and the sentence in a low-strength tint of your foreground colour.

How does the slash shortcut work?

While the block is on the page, / focuses the field, unless you are already typing in a field or an editor. Escape inside the field clears it and keeps focus there. The field announces its shortcut (aria-keyshortcuts), and the key hint is hidden on a phone, where there is no keyboard. The count under the field is a polite status ("3 of 8 releases"), so a screen reader hears the result of each change.

Does the page jump while I type?

No. The results and an unseen copy of all eight releases share one grid cell, so the cell is as tall as the full list whatever you type. With no match the empty state names the typed words and offers a Clear search button, which also returns focus to the field. A layout check will report the rows changing as the list narrows; that is the search working.

Is it the same on every React base and port?

Yes in look and behaviour. Clear and Clear search are plain buttons with an onClick.

How does it fit on a phone and in a right-to-left layout?

The field is full width and the key hint is hidden; each row stacks the version above the title. In a right-to-left layout the field, the rows and the count mirror, and versions, dates and counts keep their reading order.

  • Pro

    Filterable Changelog

    Filters and browsing

    The plainest filtered release list: one row of choices with counts (All, New, Improved, Fixed, Security) over nine releases, a live count of what is showing, and a height that never changes.

  • Pro

    Tag Cloud Changelog

    Filters and browsing

    A framed cloud of nine topic toggles sized by how many releases carry them, with multiple choice, a live line naming what shows, a Clear button and eight release rows on a height that never changes.

  • Pro

    Pagination Changelog

    Filters and browsing

    A reading app's release archive as rows, four to a page over three pages, with the catalog pagination in a band at the foot, a polite 'Showing 5 to 8 of 12' line and a height that never changes between pages.

  • Pro

    Sidebar Nav Changelog

    Filters and browsing

    A docs site's release notes with a side navigation of four categories and their counts: current one marked, eight releases at the end, one divider with a plus mark, and chips that scroll on a phone.

  • Pro

    Condensed Feed Changelog

    Lists and timelines

    Twelve releases of a news reader as a single-line ledger: the day, a type word, the headline and the version on one row, month rows between, and the older rows opening in place.

  • Pro

    A developer-tools blog behind a search field: a slash shortcut focuses it, typing keeps the posts whose title or summary holds the words and marks them, and six cells draw tiny tool windows as covers.