suiss/uim · Block

Inbox Mail

A mail app with a mailbox sidebar, a searchable message list, a reader and swipe actions on each row.

Inbox Mail is an open-source mobile screen from suiss/uim for React Native and Expo, with SwiftUI and Jetpack Compose versions built from the same design tokens. The @esuiss/uim CLI copies its source into your project, so you own the code.

iOS
Inbox Mail on iOS in light mode

A three-column mail screen built on SplitView: a sidebar of mailboxes (Inbox, Starred, Sent, Archive, Trash), a message list with a search field made from InputGroup, and a reader. On phones each column opens in turn. Rows use Avatar and support SwipeActions to archive or delete, and searching filters by sender, subject and body. The reader has Reply, Star, Archive and Delete buttons, and Reply opens a Textarea.

Installation

$ pnpm dlx @esuiss/uim@latest add inbox-mail

The CLI also adds what it builds on: Avatar, Button, Icon, Input Group, Screen, Split View, Swipe Actions, Text, Textarea.

Manual

  1. Install the dependencies:
npx expo install cn phosphor-react-native react-native-reanimated react-native-svg react-native-worklets
  1. Add the pieces it builds on: Avatar, Button, Icon, Input Group, Screen, Split View, Swipe Actions, Text, Textarea.

  2. Copy the source into components/blocks/inbox-mail.tsx:

uniwind/components/blocks/inbox-mail.tsx
import { cn } from "cn"
import {
  ArchiveIcon,
  ArrowBendUpLeftIcon,
  MagnifyingGlassIcon,
  NotePencilIcon,
  PaperPlaneTiltIcon,
  type Icon as PhosphorIcon,
  StarIcon,
  TrashIcon,
  TrayIcon,
} from "phosphor-react-native"
import * as React from "react"
import { useWindowDimensions, View } from "react-native"
import { FadeInDown, ReduceMotion } from "react-native-reanimated"
import {
  1. Update the import paths to match your project.

Usage

import { InboxMail } from "@/components/blocks/inbox-mail"
<InboxMail />

Replace INITIAL_MAIL with your messages and MAILBOXES with your folders. Wire onMailboxChange, onNewMessage, onReply, onStarChange, onArchive and onDelete to your mail service.