@duckviz/explorer
v0.23.7
Published
File explorer, data grid, and AI widget recommendations for DuckDB-WASM — drop-in <Explorer /> component.
Readme
@duckviz/explorer
File explorer, data grid, and AI-powered widget recommendations for DuckDB-WASM. Drop-in <Explorer /> component with three-panel layout: file sidebar, data viewer, and AI recommendations.
Install
npm install @duckviz/explorer
# peer dependencies
npm install @duckviz/db @duckviz/dashboard @duckviz/ui @duckviz/widgets \
react react-dom @tanstack/react-query zustandQuick start
import { DuckvizDBProvider } from "@duckviz/db";
import { Explorer } from "@duckviz/explorer";
function App() {
return (
<DuckvizDBProvider persistence>
<Explorer
persistence
authenticated
dashboards={dashboards}
onAddWidgetToDashboard={(dashboardId, widget) => {
/* ... */
}}
onCreateDashboard={(name) => {
/* ... */
}}
onIngestComplete={(tableName) => {
/* ... */
}}
/>
</DuckvizDBProvider>
);
}Props
| Prop | Type | Description |
| ------------------------ | --------------------------------- | --------------------------------------------------- |
| dashboards | ExplorerDashboardRef[] | Controlled dashboard list for "Add to Dashboard" |
| onAddWidgetToDashboard | (id, widget) => AddWidgetResult | Callback when user adds a widget |
| onCreateDashboard | (name) => string | Callback to create a new dashboard, returns id |
| authenticated | boolean | Gates AI recommendation panel |
| persistence | boolean | Self-hydrate stores from IndexedDB (default: false) |
| datasets | ExplorerDataset[] | Pre-ingested tables (bypasses file upload) |
| customFetch | FetchFn | Intercept API calls for auth/path rewriting |
| onIngestComplete | (tableName) => void | Called after file ingestion completes |
| onUnmountFiles | (paths) => void | Called when files are unmounted |
| onEmpty | () => void | Called when all files are removed |
Peer dependencies
| Package | Version |
| ------------------------ | --------- |
| react | >=18 |
| react-dom | >=18 |
| @duckviz/db | >=0.2.0 |
| @duckviz/dashboard | >=0.2.0 |
| @duckviz/widgets | >=0.1.0 |
| @mantine/core | >=8 |
| @mantine/hooks | >=8 |
| @mantine/notifications | >=8 |
| @tabler/icons-react | >=3 |
| @tanstack/react-query | >=5 |
| zustand | >=5 |
License
MIT
