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

Assets · Components

CreateAssetModal

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

Public export

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

Props

NameTypeRequiredDescription
openbooleanYesWhether the modal is open
initialFileFile | nullNoPre-loaded file (from paste or drag)
oncreate(data: { file: File; name: string; description: string; altText: string; }) => void | Promise<void>YesCallback when creation is complete. May be async; a rejection keeps the form populated and surfaces an error instead of clearing silently.
onclose() => voidYesCallback when modal is closed

Bindable state

This component has no bindable public state.

Callback events

  • oncreate(data: { file: File; name: string; description: string; altText: string; }) => void | Promise<void>
  • onclose() => void

Examples and explanation