ImagePreviewProps
ImagePreviewProps =
object
Defined in: packages/ui/src/types.ts:1238
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:1254
Alt text for the image.
fallback?
Section titled “fallback?”
optionalfallback:ReactNode
Defined in: packages/ui/src/types.ts:1252
Fallback element when no image is available.
fileKey?
Section titled “fileKey?”
optionalfileKey:string|null
Defined in: packages/ui/src/types.ts:1240
Storage file key for signed URL resolution.
getUrl()?
Section titled “getUrl()?”
optionalgetUrl: (key) =>string
Defined in: packages/ui/src/types.ts:1246
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:1250
Display height in pixels. Defaults to 200.
optionalsrc:string|null
Defined in: packages/ui/src/types.ts:1242
Direct image source URL.
storage?
Section titled “storage?”
optionalstorage:unknown
Defined in: packages/ui/src/types.ts:1244
Storage configuration for URL resolution.
width?
Section titled “width?”
optionalwidth:number
Defined in: packages/ui/src/types.ts:1248
Display width in pixels. Defaults to 200.