Skip to content
Sections
Fiesta

list-bar-search

List screen Generic list screen with title, toolbar, rows that work desktop and mobile.

Solo search form for search-only lists. An ordinary method="get" form.

Each example is live, but its links go nowhere. HTML shows the markup to copy.

With a query

The ✕ is a link to the same screen with the query dropped. The status filter rides in a hidden input and survives it.

Preview

Put this inside <div rst-list>.

<search>
  <form rst-search method="get" action="/comments">
    <svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>
    <input type="search" name="q" value="spam" placeholder="Search comments" aria-label="Search comments">
    <a rst-search-clear href="/comments?status=held" aria-label="Clear search">
      <svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>
    </a>
    <input type="hidden" name="status" value="held">
    <button class="rst-sr-only" type="submit">Search</button>
  </form>
</search>

In an app this would reach /comments, /comments?status=held. Here its links and forms go nowhere.

With a query on page 4

The page number rides in a hidden input, so a new search would carry page=4 into a result set that no longer has four pages. The ✕ link drops it: point it at the list's first page.

Preview

Put this inside <div rst-list>.

<search>
  <form rst-search method="get" action="/comments">
    <svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>
    <input type="search" name="q" value="spam" placeholder="Search comments" aria-label="Search comments">
    <a rst-search-clear href="/comments" aria-label="Clear search">
      <svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>
    </a>
    <input type="hidden" name="page" value="4">
    <button class="rst-sr-only" type="submit">Search</button>
  </form>
</search>

In an app this would reach /comments. Here its links and forms go nowhere.

Empty, accessible name from the catalog

No placeholder. The input's accessible name is its aria-label, which an app writes in the page's language.

Preview

Put this inside <div rst-list>.

<search>
  <form rst-search method="get" action="/comments">
    <svg class="icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.3-4.3"/></svg>
    <input type="search" name="q" aria-label="Search">
    <button class="rst-sr-only" type="submit">Search</button>
  </form>
</search>

In an app this would reach /comments. Here its links and forms go nowhere.