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

Assets · Components

AssetList

Sortable list view of assets with metadata columns

Public export

typescript
import { AssetList } from '@happyvertical/smrt-assets/svelte';
Import path
@happyvertical/smrt-assets/svelte
Props
7
Props described
7 of 7
Bindable state
0
Callback events
3
Verified release
0.44.0

Props

NameTypeRequiredDescription
assetsPersistedAsset[]YesAssets to display
selectedIdsSet<string>YesCurrently selected asset IDs
sortAssetSortYesCurrent sort state
onSelectionChange(ids: Set<string>) => voidYesCallback when selection changes
onAssetClick(asset: PersistedAsset) => voidYesCallback when an asset is clicked for detail view
onSortChange(sort: AssetSort) => voidYesCallback when sort changes
loadingbooleanNoWhether the list is loading

Bindable state

This component has no bindable public state.

Callback events

  • onSelectionChange(ids: Set<string>) => void
  • onAssetClick(asset: PersistedAsset) => void
  • onSortChange(sort: AssetSort) => void

Examples and explanation