The Root component must wrap all other Filenest components.
childrenType: React.ReactNode
Required
endpointThe main API endpoint Filenest will use to fetch data.
For example: /api/media or http://localhost:3000/api/media
Type: string
Required
endpointIsTRPCIf your API uses tRPC, set this to true.
Check if the endpoint prop is set correctly to use dots if your endpoint is a nested procedure, like /trpc/admin.media.
Type: boolean
labelsOverride the default labels used in Filenest components.
For example, you can override the default alert text strings.
See labels for a list of all available labels.
Type: Record<string, string>
onAssetSelectA function that is called when an asset is selected.
Can be used to store the selected asset URL in a form state, for example.
Type: (asset: Asset) => void
onErrorA function that is called when a fetch error occurs.
Can be used to display toast notifications, for example.
Type: (message: string) => void