Skip to content

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.

optional alt: string

Defined in: packages/ui/src/types.ts:1254

Alt text for the image.


optional fallback: ReactNode

Defined in: packages/ui/src/types.ts:1252

Fallback element when no image is available.


optional fileKey: string | null

Defined in: packages/ui/src/types.ts:1240

Storage file key for signed URL resolution.


optional getUrl: (key) => string

Defined in: packages/ui/src/types.ts:1246

Function to resolve a file key to a URL.

string

string


optional height: number

Defined in: packages/ui/src/types.ts:1250

Display height in pixels. Defaults to 200.


optional src: string | null

Defined in: packages/ui/src/types.ts:1242

Direct image source URL.


optional storage: unknown

Defined in: packages/ui/src/types.ts:1244

Storage configuration for URL resolution.


optional width: number

Defined in: packages/ui/src/types.ts:1248

Display width in pixels. Defaults to 200.