s-m-r-t
Open the s-m-r-t source on GitHub Switch to dark color scheme
← All UI components

Content · Components

ContentImageBrowser

No summary has been written for ContentImageBrowser. Everything below is generated from the declaration shipped in 0.44.0 and describes the real contract.

Public export

typescript
import { ContentImageBrowser } from '@happyvertical/smrt-content/svelte';
Import path
@happyvertical/smrt-content/svelte
Props
10
Props described
10 of 10
Bindable state
0
Callback events
4
Verified release
0.44.0

Props

NameTypeRequiredDescription
apiBaseUrlstringNoBase URL for asset upload and retrieval API requests.
assetsContentEditorAsset[]NoList of assets to display in the browser grid.
thumbnailAssetIdstring | nullNoID of the asset currently marked as the thumbnail.
addButtonLabelstringNoLabel text displayed on the button to open the image uploader.
selectActionLabelstringNoLabel text displayed on buttons to select an asset for use.
showUploaderInitiallybooleanNoWhether to display the image uploader panel on initial render.
onSelectImage(image: ImageLike | File | string) => voidNoInvoked when a new image is selected through the uploader.
onUseAsset(asset: ContentEditorAsset) => voidNoInvoked when an existing asset is selected from the grid.
onRemoveAsset(assetId: string) => voidNoInvoked when an asset is deleted from the collection.
onUseAsThumbnail(assetId: string) => voidNoInvoked when an asset is designated as the thumbnail.

Bindable state

This component has no bindable public state.

Callback events

  • onSelectImage(image: ImageLike | File | string) => void
  • onUseAsset(asset: ContentEditorAsset) => void
  • onRemoveAsset(assetId: string) => void
  • onUseAsThumbnail(assetId: string) => void

Examples and explanation