Skip to content
Cynco UI

Productivity

SavedViewsBar

Saved views for any list: a scrolling row of view tabs with counts, the active filters as removable FilterChips, and Save / Save as new / Reset once the filters drift from the view; rename, duplicate, share and delete from the active view's menu.

import { SavedViewsBar } from "@cynco-labs/ui";

Example

Use

Above a DataList whose rows you filter from filters. Ship built-in views (All, Overdue, Due this week) as locked, let people save their own as personal or shared with the team, and persist views through onViewsChange.

Props

views / defaultViews / onViewsChange (SavedView: id, name, filters, count, shared, locked); activeViewId / defaultActiveViewId / onActiveViewChange; filters / defaultFilters / onFiltersChange (SavedViewFilter: id, field, label, value — the list applies field+value, chips show label and value); counts (rows per view id); addFilter (your Add-filter control, rendered after the chips); label (accessible name, default “Saved views”); className and any div props.

Notes

A blue dot marks a modified view; locked views offer Save as new only. The tab row scrolls sideways on narrow containers and the save actions wrap under the chips.

Source Demo source Markdown