Tulip Logo IconTulip
Components

View

Drive view components switch between list and grid while sharing commands and table metadata.

Shared primitives

  • DriveViewProvider
  • useDriveViewContext()
  • createDriveViewConfig()
  • DriveViewConfigProvider

Provider-specific views

  • LocalDriveView
  • GoogleDriveView

The provider-specific view decides how to render the current mode. The shared view context decides which mode is active.

What actually changes between modes

In the current implementation:

  • grid renders DriveGridCard based layouts
  • list renders a DataTable
  • loading state switches between DriveGridLoading and TableSkeleton

Why commands belong in view config

createDriveViewConfig() lets each view receive:

  • row-level commands through commands.node
  • bulk commands through commands.selectedNodes

That is why the floating command menu can work in both grid and list mode without separate command implementations for each visual layout.

On this page