suiss/uim · Block

Chat Support

A support page with a floating chat panel, quick question buttons and an assistant that answers them.

Chat Support 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
Chat Support on iOS in light mode

Composes Screen, Message, Bubble, MessageScroller, InputGroup, Button, Icon and BottomBar. The chat panel opens and closes with a scale animation from a launcher button, quick questions disappear once asked, and each question gets a typed answer after a short typing indicator. The panel grows to the available height while the composer has focus.

Installation

$ pnpm dlx @esuiss/uim@latest add chat-support

The CLI also adds what it builds on: Bottom Bar, Bubble, Button, Icon, Input Group, Message, Message Scroller, Screen, Text.

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: Bottom Bar, Bubble, Button, Icon, Input Group, Message, Message Scroller, Screen, Text.

  2. Copy the source into components/blocks/chat-support.tsx:

uniwind/components/blocks/chat-support.tsx
import {
  ArrowUpIcon,
  ChatCircleIcon,
  PlusIcon,
  XIcon,
} from "phosphor-react-native"
import * as React from "react"
import { I18nManager, Image, ScrollView, View } from "react-native"
import {
  cancelAnimation,
  Easing,
  FadeInDown,
  ReduceMotion,
  useAnimatedStyle,
  useSharedValue,
  withDelay,
  1. Update the import paths to match your project.

Usage

import { ChatSupport } from "@/components/blocks/chat-support"
<ChatSupport />

Replace ANSWERS and FALLBACK with your own replies or a call to your support service. Pass onSend, onAttach and onOpenChange to handle messages, attachments and the open state.