Saved Views

Saved views list for filters, rendered as a listbox of named views with item counts and a highlighted active view. Works controlled or uncontrolled in React.

src/registry/ui/saved-views.tsx/r/saved-views.json

Installation#

bash
npx shadcn@latest add @minidev/saved-views

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/saved-views.json

Usage#

tsx
import { SavedViews } from "@/components/ui/saved-views"

export function Example() {
  return (
    <SavedViews />
  )
}

API reference#

SavedViews props
PropTypeDefault
viewsView[][ { id: "1", name: "My open", count: ...
valuestring-
onChange(id: string) => void-
classNamestring-

Examples#

All data table components