suiss/uim · Block

Roles Requests

An access request queue where admins approve or deny permission requests by button or swipe.

Roles Requests 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
Roles Requests on iOS in light mode

Each request shows an Avatar, the requester, the permission and an optional reason, with Deny and Approve Buttons. Rows use SwipeActions, so swiping from the leading edge approves and from the trailing edge denies, and decided rows collapse out of the list. A Picker sets the grant duration, and an Empty state with a reset link appears once the queue is clear. It uses a collapsing Header and the admin TabBar.

Installation

$ pnpm dlx @esuiss/uim@latest add roles-requests

The CLI also adds what it builds on: Avatar, Button, Empty, Header, Icon, Picker, Screen, Swipe Actions, Tab Bar, Text.

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, Empty, Header, Icon, Picker, Screen, Swipe Actions, Tab Bar, Text.

  2. Copy the source into components/blocks/roles-requests.tsx:

uniwind/components/blocks/roles-requests.tsx
import { cn } from "cn"
import {
  ChartBarIcon,
  CheckIcon,
  GearIcon,
  type Icon as PhosphorIcon,
  ShieldIcon,
  UsersIcon,
  XIcon,
} from "phosphor-react-native"
import * as React from "react"
import { Pressable, View } from "react-native"
import {
  FadeInDown,
  FadeOut,
  LinearTransition,
  1. Update the import paths to match your project.

Usage

import { RolesRequests } from "@/components/blocks/roles-requests"
<RolesRequests />

Replace INITIAL_REQUESTS and DURATIONS with your data. Use onApprove, onDeny, onDurationChange and onNavigate to send decisions to your API and route between sections.