v0.1 public beta early access on GitHub
Home / Screens / chat-group-info
Screen template

Group Info Screen

Group profile with members and controls

pro Expo Go ✓ iosandroid gestures: tap · scroll haptics: light · selection
$ npx lumioui add chat-group-info
import { GroupInfoScreen } from "@/screens/chat/group-info";
Native packages installed6
@lumioui/ui@latest@lumioui/core@latestreact-native-safe-area-context@*react-native-reanimated@*react-native-svg@*nativewind@*
chat/group-info.tsxsource · yours to edit
import * as React from "react";
import { ScrollView, View } from "react-native";
import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";
import { Avatar, AvatarGroup, Button, Glass, Icon, List, Switch, Text, } from "@lumioui/ui";
import { useHaptic } from "@lumioui/core";
import { Mount, RowIcon, SEPARATOR_INSET } from "../shared";

export interface GroupMember {
  id: string;
  name: string;
  role?: string;
  avatarUrl?: string;
}

export interface GroupInfoScreenProps {
  groupName?: string;
  memberCount?: number;
  members?: GroupMember[];
  onAddMembers?: () => void;
  onMemberPress?: (id: string) => void;
  onLeaveGroup?: () => void;
  onBack?: () => void;
}

const face = (n: number) => `https://i.pravatar.cc/150?img=${n}`;

const DEFAULT_MEMBERS: GroupMember[] = [
  { id: "m1", name: "Amara Chen", role: "Admin", avatarUrl: face(9) },
  { id: "m2", name: "Milo Park", avatarUrl: face(15) },
  { id: "m3", name: "Elena Ruiz", avatarUrl: face(24) },
  { id: "m4", name: "Sofia Kim", avatarUrl: face(45) },
  { id: "m5", name: "Maya Chen", avatarUrl: face(47) },
  { id: "m6", name: "Tom Reed", avatarUrl: face(12) },
  { id: "m7", name: "Priya Nair", avatarUrl: face(32) },
  { id: "m8", name: "Diego Ruiz", avatarUrl: face(53) },
];

/** Group info — member list, media link, mute toggle, leave action. */
export function GroupInfoScreen({
  groupName = "Studio Offsite",
  memberCount = 8,
  members = DEFAULT_MEMBERS,
  onAddMembers,
  onMemberPress,
  onLeaveGroup,
  onBack,
}: GroupInfoScreenProps) {
  const haptics = useHaptic();
  const insets = useSafeAreaInsets();
  const [muted, setMuted] = React.useState(false);

  return (
    <SafeAreaView className="flex-1 bg-[#F4F5F9] dark:bg-[#111114]" edges={["top"]}>
      <ScrollView
        showsVerticalScrollIndicator={false}
        contentContainerStyle={{ paddingTop: insets.top + 60, paddingBottom: insets.bottom + 32 }}
      >
        {/* Group identity — avatar stack + name on a soft lime card. */}
        <Mount className="mx-4 items-center gap-2 rounded-3xl bg-[#EDF8C4] px-6 py-5 dark:bg-[#1E2410]">
          <AvatarGroup
            items={members.map((m) => ({
              source: m.avatarUrl ? { uri: m.avatarUrl } : undefined,
              fallback: m.name,
            }))}
            max={4}
            onItemPress={(_item, i) => {
              const m = members[i];
              if (m) onMemberPress?.(m.id);
            }}
          />
          <Text variant="h2" className="pt-2">
            {groupName}
          </Text>
          <Text variant="small" className="text-muted-foreground">
            Group · {memberCount} members · Created Nov 2025
          </Text>
        </Mount>

        <List inset glass>
          <List.Section>
            <List.Item
              title="Media, links & docs"
              subtitle="142 items"
              leading={<RowIcon name="image" tone="teal" />}
              showChevron
              haptic="light"
              onPress={() => haptics.light()}
            />
            <List.Separator className={SEPARATOR_INSET} />
            <List.Item
              title="Starred messages"
              subtitle="6 saved"
              leading={<RowIcon name="star" tone="orange" />}
              showChevron
              haptic="light"
              onPress={() => haptics.light()}
            />
            <List.Separator className={SEPARATOR_INSET} />
            <List.Item
              title="Mute notifications"
              leading={<RowIcon name="bell" tone="gray" />}
              haptic={false}
              onPress={() => {
                haptics.selection();
                setMuted((m) => !m);
              }}
              accessibilityState={{ checked: muted }}
              trailing={
                <Switch
                  checked={muted}
                  onCheckedChange={(v) => {
                    haptics.selection();
                    setMuted(v);
                  }}
                  accessibilityLabel="Mute notifications"
                />
              }
            />
          </List.Section>

          <List.Section title={`${memberCount} members`}>
            <List.Item
              title="Add members"
              titleClassName="text-[#3E9AA3]"
              leading={<RowIcon name="plus" tone="teal" />}
              haptic="light"
              onPress={() => onAddMembers?.()}
            />
            {members.map((m) => (
              <React.Fragment key={m.id}>
                <List.Separator className={SEPARATOR_INSET} />
                <List.Item
                  title={m.name}
                  subtitle={m.role}
                  leading={
                    <Avatar
                      size="md"
                      source={m.avatarUrl ? { uri: m.avatarUrl } : undefined}
                      fallback={m.name}
                      alt={m.name}
                    />
                  }
                  haptic="light"
                  onPress={() => onMemberPress?.(m.id)}
                  className="py-3"
                />
              </React.Fragment>
            ))}
          </List.Section>

          <List.Section>
            <List.Item
              title="Leave group"
              titleClassName="text-destructive"
              leading={<RowIcon name="log-out" tone="red" />}
              haptic="medium"
              onPress={() => {
                haptics.warning();
                onLeaveGroup?.();
              }}
            />
          </List.Section>
        </List>
      </ScrollView>

      {/* Floating chrome — back pill + hug-label title pill. */}
      <View className="absolute inset-x-4 z-10" style={{ top: insets.top + 8 }} pointerEvents="box-none">
        <View className="flex-row items-center gap-2">
          <Glass
            effect="regular"
            className="h-11 w-11 items-center justify-center rounded-full"
          >
            <Button
              variant="ghost"
              size="icon"
              haptic="light"
              onPress={() => onBack?.()}
              accessibilityLabel="Go back"
              className="h-9 w-9"
            >
              <Icon name="chevron-left" size="md" color="foreground" />
            </Button>
          </Glass>
        </View>
        <View pointerEvents="none" className="absolute inset-0 items-center justify-center">
          <Glass
            effect="regular"
            className="h-11 flex-row items-center justify-center rounded-full px-5"
          >
            <Text accessibilityRole="header" className="text-sm font-bold tracking-tight">
              Group info
            </Text>
          </Glass>
        </View>
      </View>
    </SafeAreaView>
  );
}
GroupInfoScreen.displayName = "GroupInfoScreen";
agent prompt — paste into Claude Code, Cursor, Devin…
Recreate the "Group Info Screen" screen in React Native using LumioUI.

Goal: Group profile with members and controls Match the reference implementation's layout, behavior, and motion exactly — this is a production screen, not a mockup.

## Setup

Fastest path — install the screen plus its component deps:

```bash
npx lumioui add chat-group-info
```

Or pull just the components: `npx lumioui add avatar avatar-group button icon list switch text`

Native packages:
- @lumioui/ui@latest
- @lumioui/core@latest
- react-native-safe-area-context@*
- react-native-reanimated@*
- react-native-svg@*
- nativewind@*

Stack assumptions: Expo SDK 54 / RN 0.81, Reanimated 4, NativeWind v4, TypeScript strict, Expo Go compatible.

## Components — how, where, when

### `avatar` — Circular user image with fallback initials and status dot.
- `<Avatar>` ×1

### `avatar-group` — Overlapping avatar stack with a border ring per avatar, staggered pop-in, and a tappable "+N" overflow bubble
- `<AvatarGroup>` ×1

### `button` — Tactile pill button with press spring, ink wash and async loading.
- `<Button>` ×1

### `icon` — Lucide icon set mapped to theme colors and sizes.
- `<Icon>` ×1

### `list` — Settings-style rows with separators and press feedback.
- `<List>` ×1

### `switch` — iOS-size toggle with spring thumb and haptics.
- `<Switch>` ×1

### `text` — Themed type scale from caption to display.
- `<Text>` ×3

## Conventions (non-negotiable)

- Styling via NativeWind `className` with semantic tokens only: `bg-background`, `text-foreground`, `bg-card`, `text-card-foreground`, `bg-secondary`, `bg-muted`, `text-muted-foreground`, `bg-accent`, `bg-destructive`, `border-border`. Hard-coded colors only inside media overlays (`text-white`, `bg-black/N`).
- Motion via the token presets from `@lumioui/core` (`spring.press`, `spring.surface`, `spring.glide`, `timing.fast`, `timing.slow`, …) — no bespoke spring configs or durations.
- Gate transform motion behind `useReducedMotion()`; keep opacity/color feedback, drop travel and overshoot.
- Haptics via `useHaptic()`: `light` on press, `selection` on toggle/select, `warning` on invalid input. Never import expo-haptics directly.
- Press feedback via `usePressAnimation()` (~0.97 scale), not `activeOpacity` tricks.
- a11y: `accessibilityRole` + `accessibilityLabel` on every control, touch targets ≥44pt.
- Entrance choreography: staggered `Mount` wrappers (delay 0/60/120…) so regions land in sequence instead of popping in at once.
- Wrap the screen in `SafeAreaView`; keep dark mode working via the semantic tokens.

## Deliverable

One file: `screens/chat/group-info.tsx` exporting GroupInfoScreen. Preserve the props interface — the host app wires the callbacks (navigation, submit handlers) through them.

## Reference implementation

The LumioUI source for this screen — reproduce it faithfully:

```tsx
import * as React from "react";
import { ScrollView, View } from "react-native";
import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";
import { Avatar, AvatarGroup, Button, Glass, Icon, List, Switch, Text, } from "@lumioui/ui";
import { useHaptic } from "@lumioui/core";
import { Mount, RowIcon, SEPARATOR_INSET } from "../shared";

export interface GroupMember {
  id: string;
  name: string;
  role?: string;
  avatarUrl?: string;
}

export interface GroupInfoScreenProps {
  groupName?: string;
  memberCount?: number;
  members?: GroupMember[];
  onAddMembers?: () => void;
  onMemberPress?: (id: string) => void;
  onLeaveGroup?: () => void;
  onBack?: () => void;
}

const face = (n: number) => `https://i.pravatar.cc/150?img=${n}`;

const DEFAULT_MEMBERS: GroupMember[] = [
  { id: "m1", name: "Amara Chen", role: "Admin", avatarUrl: face(9) },
  { id: "m2", name: "Milo Park", avatarUrl: face(15) },
  { id: "m3", name: "Elena Ruiz", avatarUrl: face(24) },
  { id: "m4", name: "Sofia Kim", avatarUrl: face(45) },
  { id: "m5", name: "Maya Chen", avatarUrl: face(47) },
  { id: "m6", name: "Tom Reed", avatarUrl: face(12) },
  { id: "m7", name: "Priya Nair", avatarUrl: face(32) },
  { id: "m8", name: "Diego Ruiz", avatarUrl: face(53) },
];

/** Group info — member list, media link, mute toggle, leave action. */
export function GroupInfoScreen({
  groupName = "Studio Offsite",
  memberCount = 8,
  members = DEFAULT_MEMBERS,
  onAddMembers,
  onMemberPress,
  onLeaveGroup,
  onBack,
}: GroupInfoScreenProps) {
  const haptics = useHaptic();
  const insets = useSafeAreaInsets();
  const [muted, setMuted] = React.useState(false);

  return (
    <SafeAreaView className="flex-1 bg-[#F4F5F9] dark:bg-[#111114]" edges={["top"]}>
      <ScrollView
        showsVerticalScrollIndicator={false}
        contentContainerStyle={{ paddingTop: insets.top + 60, paddingBottom: insets.bottom + 32 }}
      >
        {/* Group identity — avatar stack + name on a soft lime card. */}
        <Mount className="mx-4 items-center gap-2 rounded-3xl bg-[#EDF8C4] px-6 py-5 dark:bg-[#1E2410]">
          <AvatarGroup
            items={members.map((m) => ({
              source: m.avatarUrl ? { uri: m.avatarUrl } : undefined,
              fallback: m.name,
            }))}
            max={4}
            onItemPress={(_item, i) => {
              const m = members[i];
              if (m) onMemberPress?.(m.id);
            }}
          />
          <Text variant="h2" className="pt-2">
            {groupName}
          </Text>
          <Text variant="small" className="text-muted-foreground">
            Group · {memberCount} members · Created Nov 2025
          </Text>
        </Mount>

        <List inset glass>
          <List.Section>
            <List.Item
              title="Media, links & docs"
              subtitle="142 items"
              leading={<RowIcon name="image" tone="teal" />}
              showChevron
              haptic="light"
              onPress={() => haptics.light()}
            />
            <List.Separator className={SEPARATOR_INSET} />
            <List.Item
              title="Starred messages"
              subtitle="6 saved"
              leading={<RowIcon name="star" tone="orange" />}
              showChevron
              haptic="light"
              onPress={() => haptics.light()}
            />
            <List.Separator className={SEPARATOR_INSET} />
            <List.Item
              title="Mute notifications"
              leading={<RowIcon name="bell" tone="gray" />}
              haptic={false}
              onPress={() => {
                haptics.selection();
                setMuted((m) => !m);
              }}
              accessibilityState={{ checked: muted }}
              trailing={
                <Switch
                  checked={muted}
                  onCheckedChange={(v) => {
                    haptics.selection();
                    setMuted(v);
                  }}
                  accessibilityLabel="Mute notifications"
                />
              }
            />
          </List.Section>

          <List.Section title={`${memberCount} members`}>
            <List.Item
              title="Add members"
              titleClassName="text-[#3E9AA3]"
              leading={<RowIcon name="plus" tone="teal" />}
              haptic="light"
              onPress={() => onAddMembers?.()}
            />
            {members.map((m) => (
              <React.Fragment key={m.id}>
                <List.Separator className={SEPARATOR_INSET} />
                <List.Item
                  title={m.name}
                  subtitle={m.role}
                  leading={
                    <Avatar
                      size="md"
                      source={m.avatarUrl ? { uri: m.avatarUrl } : undefined}
                      fallback={m.name}
                      alt={m.name}
                    />
                  }
                  haptic="light"
                  onPress={() => onMemberPress?.(m.id)}
                  className="py-3"
                />
              </React.Fragment>
            ))}
          </List.Section>

          <List.Section>
            <List.Item
              title="Leave group"
              titleClassName="text-destructive"
              leading={<RowIcon name="log-out" tone="red" />}
              haptic="medium"
              onPress={() => {
                haptics.warning();
                onLeaveGroup?.();
              }}
            />
          </List.Section>
        </List>
      </ScrollView>

      {/* Floating chrome — back pill + hug-label title pill. */}
      <View className="absolute inset-x-4 z-10" style={{ top: insets.top + 8 }} pointerEvents="box-none">
        <View className="flex-row items-center gap-2">
          <Glass
            effect="regular"
            className="h-11 w-11 items-center justify-center rounded-full"
          >
            <Button
              variant="ghost"
              size="icon"
              haptic="light"
              onPress={() => onBack?.()}
              accessibilityLabel="Go back"
              className="h-9 w-9"
            >
              <Icon name="chevron-left" size="md" color="foreground" />
            </Button>
          </Glass>
        </View>
        <View pointerEvents="none" className="absolute inset-0 items-center justify-center">
          <Glass
            effect="regular"
            className="h-11 flex-row items-center justify-center rounded-full px-5"
          >
            <Text accessibilityRole="header" className="text-sm font-bold tracking-tight">
              Group info
            </Text>
          </Glass>
        </View>
      </View>
    </SafeAreaView>
  );
}
GroupInfoScreen.displayName = "GroupInfoScreen";
```

Screen: https://lumioui.dev/screens/chat-group-info
iPhone 17 · iOS
9:41
Live preview — the real screen via Expo Web · open full ↗