Design system / Molecules
Molecule / Submission showcase
ShowcaseOtherItem
ShowcaseOtherItem places file information behind a small info icon and retains an icon-only original-access link and compact description, without an embedded viewer.
Live example
Responsibility
The submissions-owned molecule uses the same Card-based figure and natural-height caption as media items. A file icon and explicit original-access guidance replace a media preview; interpretation of the document remains outside this component.
Public contract
The table describes supported inputs, exported parts and caller responsibilities. A callback supplies a command, such as saving a draft. These notes are maintained manually; check current source types before integration.
| Prop / part | Type | Requirement | Responsibility |
|---|---|---|---|
| asset | SubmissionAttachment | Required | Authorized URL or null and permitted file metadata. Unknown size remains Size unknown. |
| framed / showDetails | boolean | Optional | Both default true. false delegates surface and file details to the containing showcase. |
| fit | natural | content | fill | Optional | natural/content retain content-sized file guidance; fill serves an owner-sized expanded preview. No embedded document viewer or detail-size change is introduced. |
| presentation | inline | expanded | Optional | Defaults to inline. Expanded fills its owner and uses the shared larger dark details treatment. Documents still use original-access guidance, never an embedded viewer. |
API notes are curated documentation, not generated types. The source linked above is the current implementation; update these notes alongside API changes.
State and behavior
Identify which values the caller controls and which behavior the component or underlying primitive owns. A local example does not supply persistence, authorization or a complete product lifecycle.
Server-compatible composition delegates tooltip/popover disclosure to internal client actions. No feature state, effect, fetch or mutation is added. The owner supplies the existing URL; the component does not probe availability.
Dependencies
- ShowcaseAssetFrame / ShowcaseAssetActions (internal)
- Card / CardContent / Text / Button
- Tooltip / Popover
- Lucide File
Token and styling contract
These notes identify theme roles, utilities and direct style values used by the source. Direct colors or timings are implementation exceptions, not recommendations to bypass the theme.
size-full / flex / p-4- Fill the shared preview area and center the download-icon guidance.
text-muted-foreground / text-supporting- Semantic supporting feedback and inherited fluid text.
ShowcaseAssetFrame / ShowcaseAssetActions- Info/Download sit at the media frame's bottom-right, independently of the centered 300px-capped description. Actions remain present without a description; a missing URL omits only download. Filename/MIME/size/category live behind info rather than in the direct caption.
Boundaries and limitations
- No iframe, object, embed or HTML/PDF preview is mounted.
- Info exposes metadata on hover/focus and click/tap, including Size unknown. The download-icon link has an Open / download tooltip and an accessible name.
- A missing URL shows unavailable guidance and an info control without an open link. A supplied URL is not proof that the original remains available.
Where to make a change
Add format-specific behavior deliberately in a separate item molecule. Keep file-type dispatch in SubmissionShowcase and generic carousel layout domain-free.
Selected real uses
SubmissionShowcase
Dispatches every remaining MIME type to this safe generic file presentation.
Repository path: src/components/showcase/instances/submissionShowcase.tsx
These traces describe selected uses, not every dependency. Repository-only paths are shown as references; only approved files have public source views.
Usage contract
<ShowcaseOtherItem asset={authorizedDocument} />Illustrative consumer bindings, not a self-contained product workflow. Live examples supply only local state or explicit fictional props.