Assets · Components
AttachmentList
Authorized attachment metadata, navigation and caller-ordered history.Public export
typescript
import { AttachmentList } from '@happyvertical/smrt-assets/svelte';- Import path
@happyvertical/smrt-assets/svelte- Props
- 13
- Props described
- 13 of 13
- Bindable state
- 0
- Callback events
- 1
- Verified release
- 0.57.40
Props
NameTypeRequiredDescription
attachmentsreadonly AssetAttachment[]YesAuthorized attachments in display order.titlestringNoOptional caller-localized heading.showHistorybooleanNoWhether to display supplied version history.messagestringNoCaller-localized load/error state.loadingbooleanNoLoading presentation; existing items remain visible.onremove(attachment: AssetAttachment) => void | Promise<void>NoHost remove handler. Providing it (or `removeAction`) renders a Remove button per top-level attachment, behind a confirmation. Wins over `removeAction` when both are given. A returned promise keeps every remove button disabled until it settles.removeActionstringNoNative mode: URL receiving a POST of the attachment id after confirmation.removeIdFieldstringNoNative field carrying the attachment `id`, default attachmentId.removeIntentFieldstringNoNative submitter field name, default intent.removeIntentstringNoNative submitter value, default remove.removeHiddenFieldsreadonly AttachmentRequestField[]NoRequest/tenant/revision fields sent verbatim with a native removal.removePendingbooleanNoCaller-owned pending state (for example a native request in flight); disables remove buttons.density'comfortable' | 'touch'NoTouch-size controls; omit to inherit the ThemeProvider density.Bindable state
This component has no bindable public state.
Callback events
onremove(attachment: AssetAttachment) => void | Promise<void>