Founding price: $35, then $99 after 23:59 UTC on 4 November, then $99
Get ProA file field for attachments with a per-file limit and a total limit across all files, a size meter that turns to a warning before the limit and a clear message when a file would go over. Use this when the whole message (an email, a ticket) has a size cap.
Derived from this item’s props table, because it declares no controls of its own. This item has no standalone playground, so changes update the code, the share link and the AI prompt.
Attachments share one budget (email size, ticket size, form upload cap), not just a limit per file.
Do not use it when: With independent files and no shared cap, use the file field directly.
This item is part of tealmac UI Pro
The source for this item installs with a Pro licence key. Log in with your key to see the install command, or read the Pro setup page.
| Prop | Type | Default | Description |
|---|---|---|---|
maxFile | number | 5 MB | Bytes per file. |
maxTotal | number | 10 MB | Bytes across all attachments. |
onChange | (files) => void | - | The accepted files. |
formatMb(bytes) is exported.
The pattern ships with a Testing Library test (attachment-field-with-limits.test.tsx) that covers: its main behaviour, the keyboard path and the error or empty states.