PageToolbar
A page's filter and view bar. It sits beneath the page header and holds to the top of the window, under the app's header, while the page scrolls: the filters on one side, scrolling sideways when there are more than fit, and the sort and view controls on the other. At rest it reads as part of the page; once it is holding, a hairline separates it from the content passing beneath. Import from "@instruments/materia-ui/compositions/page-toolbar".
Usage
Best practices
Place it straight after the
PageHeader, in the column that holds the page's content; the title scrolls away and the toolbar stays.Order the leading side the same on every page:
PageToolbarFiltersButtonfirst, in thebuttonslot so it holds still carrying the applied count; thenPageToolbarApplied, the filters in force with Clear all; then the suggestions.Applied filters always lead, so they never scroll out of view behind suggestions. Pressing a suggestion moves it into the applied group; it is never shown twice.
When a filter rail holds the facets, the toolbar still shows what the rail has applied, with no suggestions after it (
separator={false}).Each facet appears once. A
SegmentedControlwhen the facet splits the set and one part is viewed at a time (its counts sum to the total);PageToolbarFilterchips when several combine. Never both for the same facet.Keep the actions to
PageToolbarSort, which names the current order, and a view toggle. Page actions such as export belong in thePageHeader.
Props
PageToolbar
PageToolbarActions
PageToolbarApplied
PageToolbarFilter
PageToolbarFilters
PageToolbarFiltersButton
PageToolbarSort
PageToolbarTableFilters
PageToolbarTableSort
Also exports
- type
PageToolbarActionsProps - interface
PageToolbarAppliedProps - interface
PageToolbarFilterProps - interface
PageToolbarFiltersButtonProps - interface
PageToolbarFiltersProps - interface
PageToolbarProps - type
PageToolbarSortDirection - interface
PageToolbarSortOption - interface
PageToolbarSortProps - interface
PageToolbarTableFiltersProps - interface
PageToolbarTableSortProps
Composition
Builds on
Box, Button, DataGrid, DropdownMenu, Flex, ScrollFrame, Separator, Toggle