ProjectsMIT · Free

Data workspace.

Edit a range, review the changes and save one revision-checked batch.

ONE DRAFT. ONE CLEAR SAVE.

Work through the details.

Connected through your data source. Changes stay in a draft until you save.

Shift-click headings to add another sort.

Loading records…

Drag to select. Enter to edit. Arrow keys move between cells. Shift extends the range. Copy and paste apply within this page. Control or Command+D fills down; Control or Command+Enter applies the active value to the selection. Read-only columns are kept.

No loaded records match this view.

0 matching records

Record pages

Save pending edits before leaving or reloading this page.

Live interface · sample data · state resets on reload

GET STARTED

Source you can customise.

Terminal
npx shadcn@latest add https://ui.bld8.dev/r/data-workspace.json

Install into an existing application, or download the complete starter below.

Download the starter, unzip it and run the commands below. Choose Next.js or React + Vite. Both include the same BLD8 packages and editable source. No BLD8 npm installation is needed.

Terminal
npm install
npm run dev

Next.js opens on http://localhost:3000; Vite opens on http://127.0.0.1:5173. Use the port printed by the dev server if the default is occupied. Node 22.13+ and React 19 are used. Import DataWorkspace from @bld8/blocks in your own composition.

Moving between Next.js and Vite? Keep the UI source and review the application-specific changes.

NOTES TO SELF

A clear starting point.

A complete Issue data workflow with nested filters, ordered multi-sort, service paging, typed editing, bounded cell-range clipboard operations, local draft undo/redo, review and atomic saves. Invalid values remain editable. Failed saves retain drafts; conflicts show newer server records and require explicit rebase. The default source uses illustrative in-memory records and resets on reload. Supply a stable DataSource<Issue> for your service. Separate Next.js and Vite HTTP reference downloads persist one atomic snapshot on a local disk; they require a single Node server and are not an authentication service or a multi-instance database. Optional onUploadFile returns acknowledgements for the inspected record; attachment persistence remains a separate host transaction. Basic DataTable installs do not depend on the advanced grid.

Original BLD8 source uses MIT. Personal and commercial use are allowed; preserve the copyright, licence and applicable third-party notices when sharing source.

Licence and usage Source manifest

Public API

Generated from the same public TypeScript exports as the agent documentation. The host owns the service contracts described above.

DataWorkspace

DataWorkspace public properties
PropTypeDefault
classNamestring | undefined—
dataSourceDataSource<Issue> | undefined

Stable service adapter. The default uses authored records in memory.

—
onUploadFile((file: globalThis.File, context: UploadFileContext & { recordId: string; }) => Promise<UploadReceipt>) | undefined

The host receives the inspected record ID and owns authorisation/storage.

—

ResourceWorkspace

ResourceWorkspace public properties
PropTypeDefault
columnsRequiredreadonly DataColumn<T>[]—
dataSourceRequiredDataSource<T>

Keep the adapter stable. It owns permission checks and atomic persistence.

—
fieldsRequiredreadonly ResourceFilterField<T>[]—
classNamestring | undefined—
defaultViewResourceWorkspaceView | undefined

Default query and layout, read once for each source/schema binding. Contains no drafts.

—
formatValue((column: DataColumn<T>, value: unknown) => string) | undefined—
gridViewDataGridViewState | undefined—
labelsPartial<ResourceWorkspaceLabels> | undefined—
onGridViewChange((view: DataGridViewState) => void) | undefined—
onSaveView((view: ResourceWorkspaceView) => void | Promise<void>) | undefined—
onShareView((view: ResourceWorkspaceView) => void | Promise<void>) | undefined—
onUploadFile((file: globalThis.File, context: UploadFileContext & { recordId: string; }) => Promise<UploadReceipt>) | undefined—
renderField((context: ResourceFieldContext<T>) => ReactNode) | undefined

Return undefined to use the built-in editor. Render fields, not a nested form.

—
renderGrid((props: DataGridProps<T>) => ReactNode) | undefined

Replace the grid without replacing the source-bound transaction controller.

—
renderInspector((context: ResourceInspectorContext<T>) => ReactNode) | undefined—
savedViewsreadonly SavedResourceView[] | undefined[]

useResourceWorkspace

useResourceWorkspace public properties
PropTypeDefault
columnsRequiredreadonly DataColumn<T>[]—
dataSourceRequiredDataSource<T>—
fieldsRequiredreadonly ResourceFilterField<T>[]—
createRequestId(() => string) | undefined—
initialQueryDataQuery | undefined—
unavailableMessagestring | undefined—

Tables come from the public TypeScript declarations. Related types and function parameters are shown alongside their component. A dash means no default is declared at the public function boundary.