Design system / Organisms
Organism / Intake and review
ImageUploader
ImageUploader coordinates one image's file selection, validation, upload feedback, preview, replacement and removal.
Intent and composition
The view validates supported image types and the 10MB limit, then delegates upload lifecycle to useImageUpload. The caller supplies tenant context, accessible copy and onUploaded. BannerImageUploader re-exports this component rather than defining another organism.
Coordinated concerns: File validation, upload progress, preview, replacement/removal and error feedback.
useImageUpload owns asynchronous upload behavior; props bind tenant context, labels and completion. BannerImageUploader is a re-export of this same component, not a second organism.
Real component specimen
Actual fictional current-image view with disabled controls and contain preview. No upload or tenant request can run. Edition Configuration uses the same component inside deliberate banner Edit/Save/Cancel.
Real component, fictional data. Product operations are not enabled.
Fictional current-image specimen; upload actions are disabled.
Supported inputs and ownership
| Input | Responsibility |
|---|---|
| tenantSlug / onUploaded | Upload context and completion callback. |
| imageUrl | Optional current resolved image. |
| fit / disabled / onUploadingChange | Owner-selected contain or default cover preview; explicit busy/read-only controls; upload-start/settlement callback. Change and Remove stay visible for keyboard and touch. Upload completion stages the asset; the owner decides when to persist its association. |
| label / description / imageAlt / uploadActionLabel | Owner-authored accessible copy. |
This is an integration summary, not a replacement for the implementation's complete prop types. A disabled control or hidden destination does not enforce permission.
Using it in a page
Integrate the section through its supported props and context requirements. Routes supply permitted data; instances bind product copy and behavior; templates arrange slots. Keep feature hooks and operations with their feature owner. Generic layouts must not load business data or enforce product policy.
Implementation
Repository path: src/components/assets/imageUploader.tsx