Attachment

Attachment with accessible presentation and local state.
Preview and actions
project-brief.txt
Text · Project overview · Ready
Document previews
release-notes.md
Markdown · Release notes
interface-plan.txt
Text · Interface outline
theme-tokens.json
JSON · Theme settings
Full attachment group
project-brief.txt
Text · Project overview
color-tokens.json
JSON · Theme colors
components.csv
CSV · Component inventory
welcome.contract
Exact Contract · Component source
Compact attachment group
project-brief.txt
Text · Project overview
color-tokens.json
JSON · Theme colors
components.csv
CSV · Component inventory
welcome.contract
Exact Contract · Component source
States and sizes
The following states demonstrate local preparation; no file is sent.
component-inventory.csv
CSV · Ready to upload
layout-outline.txt
Uploading · 64% · Local demo
accessibility-notes.txt
Processing document
release-checklist.csv
Local preview unavailable. Retry preparation.

Installation

Install the shared package once in your Exact app. This version is a beta.
bun add --exact @rightui/ui@0.4.0-beta.4
The Exact compiler requires Bun 1.4.2, regardless of which package manager installs the package.
Complete the font, app metadata and root provider setup (required for both installation methods).
Import
use Attachment, AttachmentOptions, AttachmentFrame, AttachmentMedia, AttachmentContent, AttachmentTitle, AttachmentDescription, AttachmentActions, AttachmentAction, AttachmentTrigger, AttachmentGroup, AttachmentPreview from "@rightui/ui"

Usage

Import Attachment(id, name, metadata, content, status, remove) for the legacy wrapper. Use AttachmentOptions for explicit size, orientation, imageSource, cardWidth, previewHref, reduced, copyable and copyValue, alongside the legacy props. Compose groups and previews with the public Attachment parts. Empty previewHref opens the built-in content preview; a nonempty value is a real link. Retry is a caller-owned AttachmentAction that updates status and content. Pass every prop explicitly; image examples use external image URLs.

API Reference

Properties from the component source. State lives in your component; actions receive the updated value.
AttachmentFrame.id
string
AttachmentFrame.status
string
AttachmentFrame.size
string
AttachmentFrame.orientation
string
AttachmentFrame.cardWidth
string
AttachmentMedia.name
string
AttachmentMedia.source
string
AttachmentMedia.status
string
AttachmentMedia.size
string
AttachmentMedia.orientation
string
AttachmentMedia.reduced
bool
AttachmentTitle.name
string
AttachmentTitle.status
string
AttachmentTitle.size
string
AttachmentTitle.reduced
bool
AttachmentDescription.text
string
AttachmentDescription.status
string
AttachmentActions.orientation
string
AttachmentAction.id
string
AttachmentAction.label
string
AttachmentAction.icon
string
AttachmentAction.press
action
AttachmentTrigger.id
string
AttachmentTrigger.label
string
AttachmentTrigger.disabled
bool
AttachmentTrigger.expanded
bool
AttachmentTrigger.controls
string
AttachmentTrigger.href
string
AttachmentTrigger.press
action
AttachmentGroup.id
string
AttachmentGroup.label
string
AttachmentGroup.compact
bool
AttachmentPreview.id
string
AttachmentPreview.open
bool
AttachmentPreview.name
string
AttachmentPreview.metadata
string
AttachmentPreview.content
string
AttachmentPreview.contentId
string
AttachmentPreview.imageSource
string
AttachmentPreview.reduced
bool
AttachmentPreview.dismiss
action
Attachment.id
string
Attachment.name
string
Attachment.metadata
string
Attachment.content
string
Attachment.status
string
Attachment.remove
action
AttachmentOptions.id
string
AttachmentOptions.name
string
AttachmentOptions.metadata
string
AttachmentOptions.content
string
AttachmentOptions.status
string
AttachmentOptions.remove
action
AttachmentOptions.size
string
AttachmentOptions.orientation
string
AttachmentOptions.imageSource
string
AttachmentOptions.cardWidth
string
AttachmentOptions.previewHref
string
AttachmentOptions.reduced
bool
AttachmentOptions.copyable
bool
AttachmentOptions.copyValue
string