suiss/uim · Block

Users Invite

An invite screen for adding users by email with a role, a welcome email option and pending invitations.

Users Invite 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
Users Invite on iOS in light mode

Emails become Chips as you type, and Backspace in an empty Input removes the last one. A Picker sets the role, a Switch toggles the welcome email, and the send Button adds the invites to the pending list. Pending invitations can be resent or cancelled, and sending or resending shows a toast through Toaster. The admin TabBar switches sections.

Installation

$ pnpm dlx @esuiss/uim@latest add users-invite

The CLI also adds what it builds on: Button, Chip, Header, Icon, Input, Item, Keyboard Scroll View, Picker, Screen, Switch, Tab Bar, Text, Toast.

Manual

  1. Install the dependencies:
npx expo install phosphor-react-native react-native-reanimated react-native-svg react-native-worklets
  1. Add the pieces it builds on: Button, Chip, Header, Icon, Input, Item, Keyboard Scroll View, Picker, Screen, Switch, Tab Bar, Text, Toast.

  2. Copy the source into components/blocks/users-invite.tsx:

uniwind/components/blocks/users-invite.tsx
import {
  ChartBarIcon,
  EnvelopeSimpleIcon,
  GearIcon,
  type Icon as PhosphorIcon,
  ShieldIcon,
  UsersIcon,
} from "phosphor-react-native"
import * as React from "react"
import { View } from "react-native"
import { FadeInDown, ReduceMotion } from "react-native-reanimated"
import { Picker, PickerItem } from "@/components/patterns/picker"
import { AnimatedView } from "@/components/ui/animated-view"
import { Button } from "@/components/ui/button"
import { Chip } from "@/components/ui/chip"
import { HeaderLargeTitle } from "@/components/ui/header"
  1. Update the import paths to match your project.

Usage

import { UsersInvite } from "@/components/blocks/users-invite"
<UsersInvite />

Replace ROLES and the initial pending invites with your data. Use onInvite, onResend, onCancelInvite and onNavigate to call your API.