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

Content · Components

ContentList

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

Public export

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

Props

NameTypeRequiredDescription
apiBaseUrlstringNoBase URL for content API requests.
contentsContentData[]NoClient-side rows. Ignored when `query` is supplied — the server then owns filtering, sorting, and paging, and these rows would be a second, disagreeing source of truth.
typestringNoFilter content by this type; no filtering applied when omitted.
defaultViewModeContentListViewModeNoInitial view layout mode for the content list.
onEdit(content: ContentData) => voidYesInvoked when the user requests to edit a content item.
onDelete(content: ContentData) => voidYesInvoked when the user requests to delete a content item.
onAdd() => voidYesInvoked when the user requests to create new content.
controlsSnippetNoOptional UI controls rendered above the content list.
getViewHref(content: ContentData) => string | nullNoReturns a URL to view the published content; null hides the view link.
loadingbooleanNoAnnounced uniformly by every presentation; #2455 extends it.
errorstring | nullNoLoad failure announced instead of the list.
onRetry() => voidNoRetry affordance rendered with an error.
dataSurfaceContentListDataSurfaceNoOpt-in agent addressability. Non-table presentations land with #2456.
queryContentListQuerySourceNoOpt-in server-backed rows (#2452). `bind()` is called exactly once, during initialization, so a `remoteQuery(...)` binding is disposed with this component. Supplying it switches the list into server mode: `contents` is ignored and the local select/paginate transform never runs.
urlStateContentListUrlStateBindingNoOpt-in shareable URL state. The host owns navigation.
savedViewsContentListSavedViewStoreNoOpt-in saved views. `createContentListSavedViewStore()` is the default store.
jobsContentListJobBindingNoShared background-workflow state. The same binding guards submissions.
workflowsContentListWorkflowBindingNoOpt-in, authenticated preview/apply client for bulk workflows (#2453).

Bindable state

This component has no bindable public state.

Callback events

  • onEdit(content: ContentData) => void
  • onDelete(content: ContentData) => void
  • onAdd() => void
  • onRetry() => void

Examples and explanation