ImagePreviewProps
ImagePreviewProps =
object
Defined in: packages/ui/src/types.ts:1372
Props for the ImagePreview component.
Displays an image from @cfast/storage with signed URL handling. Supports
both direct src URLs and storage fileKey resolution. Shows a fallback
element when no image is available.
- ImageFieldProps for the inline field variant used in tables.
- DropZoneProps for uploading new images.
Properties
Section titled “Properties”
optionalalt:string
Defined in: packages/ui/src/types.ts:1388
Alt text for the image.
fallback?
Section titled “fallback?”
optionalfallback:ReactNode
Defined in: packages/ui/src/types.ts:1386
Fallback element when no image is available.
fileKey?
Section titled “fileKey?”
optionalfileKey:string|null
Defined in: packages/ui/src/types.ts:1374
Storage file key for signed URL resolution.
getUrl()?
Section titled “getUrl()?”
optionalgetUrl: (key) =>string
Defined in: packages/ui/src/types.ts:1380
Function to resolve a file key to a URL.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string
height?
Section titled “height?”
optionalheight:number
Defined in: packages/ui/src/types.ts:1384
Display height in pixels. Defaults to 200.
optionalsrc:string|null
Defined in: packages/ui/src/types.ts:1376
Direct image source URL.
storage?
Section titled “storage?”
optionalstorage:unknown
Defined in: packages/ui/src/types.ts:1378
Storage configuration for URL resolution.
width?
Section titled “width?”
optionalwidth:number
Defined in: packages/ui/src/types.ts:1382
Display width in pixels. Defaults to 200.