Inbox App

Mail client with a folder rail and unread counts (virtual folders like Starred via `filter`), a searchable message list with unread dots, stars, checkboxes and a gliding selection highlight, a reading pane that cross-fades between messages, and swipe-right-to-archive / swipe-left-to-delete rows that slide out with an Undo bar.

Preview

Inbox App preview width

Install

Add it with the shadcn CLI, or copy the source manually.

$ bunx --bun shadcn add @karaui/inbox-app
@karaui not found? Add it to components.json
{
  "registries": {
    "@karaui": "https://karaui.kamisama-v0.my.id/r/{name}.json"
  }
}

@karaui is in shadcn's public registry directory, so the latest CLI needs no setup. On an older CLI, merge this into the existing file once and every @karaui/… install resolves.

API Reference

folders
InboxFolder[]
—
messages?
InboxMessage[]

Controlled messages.

—
defaultMessages?
InboxMessage[]

Uncontrolled initial messages.

[]
onMessagesChange?
((messages: InboxMessage[]) => void)
—
folder?
string

Controlled open folder.

—
defaultFolder?
string
—
onFolderChange?
((folder: string) => void)
—
selectedId?
string | null

Controlled open message id.

—
defaultSelectedId?
string | null
null
onSelectedChange?
((id: string | null) => void)
—
onAction?
((action: InboxAction, ids: string[]) => void)

Fires after archive/delete with the affected ids (before any undo).

—
onUndo?
((action: InboxAction, ids: string[]) => void)

Fires when an archive/delete is undone.

—
archiveFolder?
string

Folder that archived mail moves to. Default "archive".

archive
trashFolder?
string

Folder that deleted mail moves to; deleting inside it removes for good. Default "trash".

trash
undoTimeout?
number

How long the undo bar stays, in ms. Default 5000.

5000
locale?
string

Default "en-US" so server and client agree.

en-US
timeZone?
string

Default "UTC" so server and client agree.

UTC
className?
string
—

Keep in mind

Some components on this site are inspired by or recreated from existing work across the web. I'm not here to take credit; just to learn, experiment, and sometimes push things a bit further. If something looks familiar and I forgot to mention you, reach out and I'll fix that right away.

Updated