FormsFilterBar

Open in Create
Search
astronomic.dev

FilterBar

Free

For a row of filters over a list of homes or places, that scrolls sideways on a phone.

File
FilterBar.astro
Group
Forms
Kind
Interactive: inline script
Examples
9
import FilterBar from "@astronomic-dev/ui/components/FilterBar.astro";

Examples

Drag the orange handle to set the width. Frames get real breakpoints.

  • Static
  • Interactive
  • Framed

Homes for sale and for rent

The bar over a list, with ResultsHead under it. Pick Rent, a price, beds and two home types, then reload or copy the address: the same filters come back. The box under it stands in for a search and prints what each filters:change hands over.

main.astro

Dropdowns

dropdown draws each filter as a dropdown in its own cell: Price and Rent as Min and Max radio lists, the home type as checkboxes, Beds and Baths as a Select with picker. A field that is set has an accent label and a thin underline. ResultsHead's sortPicker draws the sort the same way. The names, the address bar and filters:change are the same as the main example's. Pick Rent: the steps and the words change.

dropdown.astro

Dropdowns, one choice

A field without multiple is a Select with picker: the browser's own select, drawn in the kit's look where it can. A toggle stays a checkbox.

dropdown-choice.astro

Rent first

defaults.mode is rent: the price is the rent per month, with its own steps, and the legend says Rent.

rent.astro

Two filters

Only beds and the home type have a kind; the other fields show on the card only.

few-fields.astro

Every kind of field

The home type as one select (no multiple) and a garage toggle. Every label sits on one line and every control on the line under it, the toggle too.

every-kind.astro

Many filters

Three ranges, four selects and a toggle. The cells keep their width: when they do not all fit, the bar scrolls sideways inside its own box, and the page never does.

many-fields.astro

The actions slot sits at the bar's right end, after Clear: here a Save search button.

save-search.astro

No switch

A list with one mode, such as homes for sale only: no modes, no switch.

no-modes.astro
Minimal · Light

Waitlist

Be first in line

Join the waitlist and we'll email you the moment it's out.

You'll also get our newsletter: new themes, plugins and guides. Unsubscribe any time.