components / asset-sidebar

asset-sidebar.

scrollable image/asset sidebar. drag a row into a textarea or click insert; optional drop zone for uploads.

installation
bunx @justin06lee/chrome@latest add asset-sidebar
props
nametypedefaultdescription
assetsAsset[]-rows to render.
onInsert(asset: Asset) => void-fired by the insert button.
onDelete(asset: Asset) => void-fired by the delete button; parent owns confirm.
onUpload(files: File[]) => void-files dropped on the drop zone. omit to hide it.
titlestring'images'
descriptionstring-
classNamestring-
emptyLabelstring'no images yet.'