TidalUI

File browser preview

A controlled file-library block with native path navigation, search, sorting, row selection and consumer-owned detail content.

pro · Blocks · composite

When to use

Alternatives

Configure components.json and the @tidal-pro namespace before installing Pro components.

Installation

npx shadcn@latest add @tidal-pro/file-browser

Import components/ui/tidal.css, components/ui/file-browser.css. Wrap installed components in tidal-scope.

Preview

File browser component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/file-browser.css";
import{TidalFileBrowser}from"./components/ui/file-browser";
export default()=><div className="tidal-scope"><TidalFileBrowser items={[{id:"example",kind:"folder",name:"Demo",accessibleName:"Demo"}]} path={[{id:"example",label:"Demo",accessibleLabel:"Demo"}]} title={"Demo"}/></div>;

API and props

TidalFileBrowser.items (required)
ReadonlyArray<TidalFileBrowserItem>

Required items value accepted by this exported component.

TidalFileBrowser.path (required)
ReadonlyArray<TidalFilePathItem>

Required path value accepted by this exported component.

TidalFileBrowser.title (required)
ReactNode

Required title value accepted by this exported component.

TidalFileBrowser.description
ReactNode

Optional description value accepted by this exported component.

TidalFileBrowser.detail
ReactNode

Optional detail value accepted by this exported component.

TidalFileBrowser.detailLabel
string | undefined

Optional detail label value accepted by this exported component.

TidalFileBrowser.emptyMessage
ReactNode

Optional empty message value accepted by this exported component.

TidalFileBrowser.eyebrow
ReactNode

Optional eyebrow value accepted by this exported component.

TidalFileBrowser.footer
ReactNode

Optional footer value accepted by this exported component.

TidalFileBrowser.headingLevel
"h2" | "h3" | undefined

Optional heading level value accepted by this exported component.

TidalFileBrowser.labels
Partial<TidalFileBrowserLabels> | undefined

Optional labels value accepted by this exported component.

TidalFileBrowser.onOpenItem
((item: TidalFileBrowserItem, event: ReactMouseEvent<HTMLAnchorElement | HTMLButtonElement>) => void) | undefined

Callback invoked when the open item interaction is proposed.

TidalFileBrowser.onSelectionChange
((item: TidalFileBrowserItem, selected: boolean, event: ReactChangeEvent<HTMLInputElement>) => void) | undefined

Callback invoked when the selection change interaction is proposed.

TidalFileBrowser.search
TidalFileSearchControl | undefined

Optional search value accepted by this exported component.

TidalFileBrowser.sort
TidalFileSortControl | undefined

Optional sort value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas