suiss/ui · Block
Inbox Categories
A mail inbox sorted into Primary, Transactions, Updates, and Promotions, with a message reader and inline reply.
Inbox Categories is an open-source block from suiss/ui for React, React Native, SwiftUI and Jetpack Compose. The @esuiss/ui CLI copies its source into your project, so you own the code.
A mail inbox that sorts messages into Primary, Transactions, Updates and Promotions, switched with icon chips that show a dot when they hold unread mail. Selecting a message opens a reader with reply, star, archive and delete actions and an inline reply box. On mobile the list and reader show one at a time with a back button. Use it for notification centers, categorized inboxes or any feed that needs tabs.
Installation
CLI
Works in any project with a components.json. See Installation for the one-line registry setup. Or use the suiss/ui CLI:
Manual
- Install the dependencies:
-
Add the pieces it builds on: Avatar, Button, Split View, Textarea, Toggle Group.
-
Copy the source into
components/blocks/inbox-categories.tsx:
- Update the import paths to match your project.
Usage
Replace initialMail with your messages, each with a sender, subject, body, time, avatar hue, category and unread and starred flags; categories sets each chip's icon and tint. Archive and Delete both just remove the message, and the reply form only clears on submit, so connect them to your mail API. The To: Jamie Rivera recipient line is hard-coded.
Notes
The reply box receives focus when it opens, and unread dots include hidden Unread text for screen readers.

A mail screen built on SplitView: the list column shows a ToggleGroup of four categories with unread dots, and rows with an Avatar, sender and preview; the detail column shows the selected message. On wide screens the list and reader sit side by side; on phones the reader opens as its own column. Swipe a row with SwipeActions to archive it, or swipe fully to delete. The reader has Reply, Star, Archive and Delete buttons, and Reply opens a Textarea to write a response.
Installation
The CLI also adds what it builds on: Avatar, Button, Icon, Screen, Split View, Swipe Actions, Text, Textarea, Toggle Group. On React Native it also adds the animated view components/ui/animated-view.tsx.
Manual
- Install the dependencies:
-
Add the pieces it builds on: Avatar, Button, Icon, Screen, Split View, Swipe Actions, Text, Textarea, Toggle Group, and the animated view
components/ui/animated-view.tsxfrom the next step. -
Copy the animated view into
components/ui/animated-view.tsx:
- Copy the source into
components/blocks/inbox-categories.tsx:
- Update the import paths to match your project.
- Install the dependencies:
-
Add the pieces it builds on: Avatar, Button, Icon, Screen, Split View, Swipe Actions, Text, Textarea, Toggle Group, and the animated view
components/ui/animated-view.tsxfrom the next step. -
Copy the animated view into
components/ui/animated-view.tsx:
- Copy the source into
components/blocks/inbox-categories.tsx:
- Update the import paths to match your project.
- Install the dependencies:
-
Add the pieces it builds on: Avatar, Button, Icon, Screen, Split View, Swipe Actions, Text, Textarea, Toggle Group, and the animated view
components/ui/animated-view.tsxfrom the next step. -
Copy the animated view into
components/ui/animated-view.tsx:
- Copy the source into
components/blocks/inbox-categories.tsx:
- Update the import paths to match your project.
-
Target iOS 17 or later.
-
Add the Swift package to your app:
- Copy the theme files every view uses:
- Copy the source and every file it uses:
- Add the files to your app target.
- Set
minSdkto 24 or higher and add the dependencies:
- Copy the theme files every view uses:
- Copy the source and every file it uses:
- Update the
com.esuiss.uipackage names to match your project.
Usage
Replace INITIAL_MAIL with your messages and adjust CATEGORIES if you sort mail differently. Wire onCategoryChange, onReply, onStarChange, onArchive and onDelete to your mail service; the screen updates its own state either way.
