This example demonstrates how to use headless space management components from @storacha/console-toolkit-react with fully custom styling.
- Space selection and listing
- Space creation
- Content listing within a space
- File viewing and removal
- File upload (file, directory, and CAR)
- Space sharing
- Custom UI implementation
pnpm install
pnpm devThis example uses only headless components, allowing complete control over styling:
import { Provider, StorachaAuth } from '@storacha/console-toolkit-react'
import {
SpacePicker,
SpaceCreator,
SpaceList,
FileViewer,
SharingTool,
SpaceEnsurer,
UploadTool
} from '@storacha/console-toolkit-react'
function App() {
return (
<Provider>
<StorachaAuth>
<StorachaAuth.Ensurer>
<SpaceEnsurer>
<SpacePicker>
{/* Your custom UI */}
</SpacePicker>
</SpaceEnsurer>
</StorachaAuth.Ensurer>
</StorachaAuth>
</Provider>
)
}- SpacePicker - List and select spaces
- SpaceCreator - Create new spaces (public/private)
- SpaceList - List uploads in a space with pagination
- FileViewer - View file details (Root CID, Gateway URL, Shards)
- UploadTool - Upload files, directories, or CAR files
- Drag & drop support
- Upload progress tracking
- Support for public and private spaces
- Wrap in directory option
- SharingTool - Share spaces with others via email or DID
- SpaceEnsurer - Ensure at least one space exists
The upload tool supports multiple upload types:
- File Upload - Single file upload with optional directory wrapping
- Directory Upload - Upload entire directories
- CAR Upload - Upload Content Addressed Archive files
- Drag & Drop - Intuitive file selection
- Progress Tracking - Real-time upload progress with shard information
- Private Space Support - Encrypted uploads for private spaces
- Upload Another - Quick reset to upload more files
- Select a space from the space picker
- Click "Upload a file" button in the list view
- Choose upload type (file, directory, or CAR)
- Drag & drop or click to browse files
- Monitor upload progress
- View uploaded file in the list
- Click "Upload Another" to upload more files
This example uses vanilla CSS, but you can use any styling solution:
- Tailwind CSS
- Emotion / styled-components
- CSS Modules
- Chakra UI / MUI
- Your own CSS framework