Skip to content
Viewership Inquire
Astro UI

Filter Table.

Status chips that filter a table in place.

DataComponentNo dependencies Beautiful UI, MIT

.md
Marketing tasks
Task nameDateStatusChannel
Draft spring trail email
Dec 03
To do
Email
Review GEO citation report
Sep 22
In Progress
Perplexity
Approve gear guide video
Jan 02
To do
YouTube
Reply to camping thread
Nov 08
In Progress
Reddit
Send weekly GA4 report
Apr 14
Completed
GA4

Install

  1. Import the foundation once

    foundation.css holds the tokens every component reads.

    Layout.astro
    ---
    // src/layouts/Layout.astro
    import "../styles/foundation.css";
    ---
  2. Copy FilterTable.astro

    Paste into src/components/viewership/filter-table/

  3. Use it

    Page.astro
    ---
    import FilterTable from "../components/viewership/filter-table/FilterTable.astro";
    ---
    
    <FilterTable />

Props 7

PropTypeDefaultDescription
rows Record<string, string>[] [] One object per row, keyed by column key.
columns { key; label; width?; kind?: "title" | "muted" | "date" | "status" }[] task / date / status / owner Column order, labels, widths and cell style.
statuses { key; label; tone?: "amber" | "cyan" | "green" | "red" | "violet" | "gray" }[] To do / In Progress / Completed Filter chips and status pills. Counts come from `rows`.
statusKey string "status" Row field holding the status key.
filter string "all" Initial filter.
caption string "Tasks" Hidden table caption.
labels { all?, filterGroup?, result? } · Chip and screen reader text. `result` takes {shown}, {total}, {filter}.

Source 1 file

Ported from Beautiful UI, MIT. Notices.