collection toolbar
filters, a result count and a view switch above one collection. each group keeps its name when the row wraps.
bunx --bun shadcn@latest add @mk/collection-toolbarserves constellation, trisys, orbit, artifacts.
example
clear the ship filter to see every task. switch to cards and the same results change their layout.
- check the reading layoutquanta
- review the chapter notesquanta
- check the reading layoutquanta
- review the chapter notesquanta
filters and counts
a filter can carry its own count, or leave the count beside the view switch. clearing a chip removes the filter.
with a count
the result stays beside its filter
without a count
the clear control has its own name
zero results
zero remains a result
all results
a count also stands alone
with a count
the result stays beside its filter
without a count
the clear control has its own name
zero results
zero remains a result
all results
a count also stands alone
view states
one view stays pressed, including when it is chosen again. use the arrow keys to move between views.
rows pressed
the first view is the default
cards pressed
a different initial view
disabled
the selected view stays visible
hover
the unselected control under the pointer
focus
the control keeps its keyboard ring
rows pressed
the first view is the default
cards pressed
a different initial view
disabled
the selected view stays visible
hover
the unselected control under the pointer
focus
the control keeps its keyboard ring
on a phone
a phone viewport, capped at 320 px. the groups wrap before the results begin; the spacer takes only the room left over.