BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/fable-ui/data-browser

DataBrowser

fable-ui/data-browser
FreeBlock

Render static row snapshots or host-backed data browsing with local search, filters, sort, row details, pagination, and row actions.

Live preview

live · rendered by the registry
Rendered by fable-ui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://fable-ui.shobky.com/r/data-browser.json

Source

components/fable-ui/data-browser/data-browser.tsxfable-ui.shobky.com/r/data-browser.json · first 6 KB
1"use client"
2
3import { cva } from "class-variance-authority"
4
5import { Badge } from "@/components/ui/badge"
6import {
7 Card,
8 CardContent,
9 CardDescription,
10 CardHeader,
11 CardTitle,
12} from "@/components/ui/card"
13import { cn } from "@/lib/utils"
14import type { DataRow } from "@/lib/fable-ui/core"
15import type { DataBrowserProps } from "./data-browser.types"
16import { useDataBrowserActions } from "./hooks/use-data-browser-actions"
17import { useDataBrowserQuery } from "./hooks/use-data-browser-query"
18import { useRowDetailSurface } from "./hooks/use-row-detail-surface"
19import {
20 getFallbackFilters,
21 getFallbackSortOptions,
22} from "./lib/fallback-filters"
23import { InlineError } from "./internal/inline-error"
24import { PaginationFooter } from "./internal/pagination-footer"
25import { ResponsiveDetailSurface } from "./internal/responsive-detail-surface"
26import { TableView } from "./internal/table-view"
27import { DataBrowserToolbar } from "./internal/toolbar"
28
29const dataBrowserVariants = cva("w-full overflow-hidden", {
30 variants: {
31 variant: {
32 default: "bg-card shadow-sm",
33 elevated: "bg-card shadow-lg shadow-foreground/5",
34 subtle: "bg-muted/40 shadow-none",
35 },
36 size: {
37 sm: "",
38 md: "",
39 lg: "",
40 },
41 },
42 defaultVariants: {
43 variant: "default",
44 size: "md",
45 },
46})
47
48const contentGap = {
49 sm: "gap-3 p-4",
50 md: "gap-4 p-5",
51 lg: "gap-5 p-6",
52} as const
53
54export function DataBrowser<Row extends DataRow = DataRow>({
55 title,
56 entityLabel,
57 description,
58 resourceId,
59 searchPlaceholder,
60 columns,
61 rows = [],
62 filters,
63 sortOptions,
64 initialFilters,
65 initialSearch,
66 initialSort,
67 pageSize = 8,
68 detail: detailConfig,
69 rowActions,
70 onViewRow,
71 onRowAction,
72 onRowActionSuccess,
73 renderDetail,
74 isLoading,
75 isDisabled,
76 error,
77 variant,
78 size = "md",
79}: DataBrowserProps<Row>) {
80 const effectiveFilters = filters ?? getFallbackFilters(rows, columns)
81 const effectiveSortOptions = sortOptions ?? getFallbackSortOptions(columns)
82 const detail = useRowDetailSurface<Row>()
83 const query = useDataBrowserQuery<Row>({
84 resourceId,
85 rows,
86 columns,
87 filters: effectiveFilters,
88 sortOptions: effectiveSortOptions,
89 initialFilters,
90 initialSearch,
91 initialSort,
92 pageSize,
93 })
94 const actions = rowActions ?? query.resource?.actions ?? []
95 const browserActions = useDataBrowserActions<Row>({
96 resourceId,
97 onRowAction,
98 onRowActionSuccess,
99 refetch: query.refetch,
100 })
101// … truncated

What it pulls in

npm packages

  • ai
  • zod
  • class-variance-authority
  • lucide-react

Other registry items

  • card
  • button
  • badge
  • input
  • dialog
  • drawer
  • select
  • shobky/fable-ui/core

Files it writes

  • components/fable-ui/data-browser/index.ts
  • lib/fable-ui/tools/show-data-browser-tool.ts
  • lib/fable-ui/tools/show-table-tool.ts
  • lib/fable-ui/manifests/show-table.md
  • components/fable-ui/data-browser/data-browser.tsx
  • components/fable-ui/data-browser/data-browser.types.ts
  • components/fable-ui/data-browser/show-table.tsx
  • components/fable-ui/data-browser/resolve-intent.ts
  • components/fable-ui/data-browser/hooks/use-data-browser-query.ts
  • components/fable-ui/data-browser/hooks/use-data-browser-actions.ts
  • components/fable-ui/data-browser/hooks/use-row-detail-surface.ts
  • components/fable-ui/data-browser/internal/inline-error.tsx
  • components/fable-ui/data-browser/internal/pagination-footer.tsx
  • components/fable-ui/data-browser/internal/responsive-detail-surface.tsx
  • components/fable-ui/data-browser/internal/row-detail.tsx
  • components/fable-ui/data-browser/internal/table-view.tsx
  • components/fable-ui/data-browser/internal/toolbar.tsx
  • components/fable-ui/data-browser/lib/cell-avatar.tsx
  • components/fable-ui/data-browser/lib/fallback-filters.ts
  • components/fable-ui/data-browser/lib/get-row-id.ts
  • lib/fable-ui/manifests/show-data-browser.md

Facts

Registry
fable-ui
Type
registry:block
Access
Free
Files written
21
Licence
MIT
First indexed
2026-08-04
Last confirmed
today

Go to the source

Docs on fable-ui fable-ui.shobky.com shobky/fable-ui on GitHub Raw registry item This item as JSON

More from fable-ui

All 10 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Chartschartsfable-uiBlocksFree3 deps · 6 files
Fable UI Quickstartquickstartfable-uiBlocksFree11 deps · 8 files
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex