TidalUI

Attachment tray preview

Review queued files, progress and errors before sending a message.

pro · Blocks · composite

When to use

Alternatives

Configure components.json and the @tidal-pro namespace before installing Pro components.

Installation

npx shadcn@latest add @tidal-pro/attachment-tray

Import components/ui/tidal.css, components/ui/attachment-tray.css. Wrap installed components in tidal-scope.

Preview

Attachment tray component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/attachment-tray.css";
import{TidalAttachmentTray}from"./components/ui/attachment-tray";
export default()=><div className="tidal-scope"><TidalAttachmentTray attachments={[{id:"example",name:"Demo",status:"error"}]} label={"Demo"}/></div>;

API and props

TidalAttachmentTray.attachments (required)
ReadonlyArray<TidalAttachment>

Required attachments value accepted by this exported component.

TidalAttachmentTray.label (required)
string

Required label value accepted by this exported component.

TidalAttachmentTray.actions
ReactNode

Optional actions value accepted by this exported component.

TidalAttachmentTray.aria-disabled
Booleanish | undefined

Accessible disabled supplied by the consumer.

TidalAttachmentTray.disabled
boolean | undefined

Optional disabled value accepted by this exported component.

TidalAttachmentTray.emptyMessage
ReactNode

Optional empty message value accepted by this exported component.

TidalAttachmentTray.headingLevel
2 | 3 | 4 | 5 | 6 | undefined

Optional heading level value accepted by this exported component.

TidalAttachmentTray.onRemove
((attachment: TidalAttachment, event: MouseEvent<HTMLButtonElement>) => void) | undefined

Callback invoked when the remove interaction is proposed.

TidalAttachmentTray.onRetry
((attachment: TidalAttachment, event: MouseEvent<HTMLButtonElement>) => void) | undefined

Callback invoked when the retry interaction is proposed.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas