v0.1 public beta early access on GitHub
Home / Screens / media-reels-feed
Screen template

Reels Feed Screen

Vertical reels with action rail and caption

pro Expo Go ✓ iosandroid gestures: tap · scroll haptics: light · selection
$ npx lumioui add media-reels-feed
import { ReelsFeedScreen } from "@/screens/media/reels-feed";
Registry dependencies6
Native packages installed6
@lumioui/ui@latest@lumioui/core@latestreact-native-safe-area-context@*react-native-reanimated@*react-native-svg@*nativewind@*
media/reels-feed.tsxsource · yours to edit
import * as React from "react";
import { View } from "react-native";
import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";
import { Avatar, Button, Glass, Icon, Image, Text } from "@lumioui/ui";
import { GlowSpot, Mount, World } from "../shared";
import { useHaptic } from "@lumioui/core";

export interface Reel {
  id: string;
  author: string;
  avatarUrl?: string;
  frameUrl: string;
  caption: string;
  likes: string;
  comments: string;
  /** True while this is the visible reel. */
  active?: boolean;
}

export interface ReelsFeedScreenProps {
  reels?: Reel[];
  onLike?: (id: string) => void;
  onComment?: (id: string) => void;
  onShare?: (id: string) => void;
  onFollow?: (id: string) => void;
  onBack?: () => void;
}

const DEFAULT_REELS: Reel[] = [
  {
    id: "r1",
    author: "studio.orbit",
    avatarUrl: "https://i.pravatar.cc/150?img=32",
    frameUrl: "https://images.unsplash.com/photo-1469334031218-e382a71b716b?w=800&h=1400&fit=crop&q=70&auto=format",
    caption: "Behind the seam: how the Orbit coat gets its structure",
    likes: "12.4k",
    comments: "312",
    active: true,
  },
];

/** Reels — full-bleed frame, right action rail, bottom caption + author. */
export function ReelsFeedScreen({
  reels = DEFAULT_REELS,
  onLike,
  onComment,
  onShare,
  onFollow,
  onBack,
}: ReelsFeedScreenProps) {
  const haptics = useHaptic();
  const insets = useSafeAreaInsets();
  const reel = reels.find((r) => r.active) ?? reels[0];
  const [liked, setLiked] = React.useState(false);
  const [following, setFollowing] = React.useState(false);
  if (!reel) return null;

  return (
    <World primary="#65A30D">
    <SafeAreaView className="flex-1 bg-black" edges={["top", "bottom"]}>
      <GlowSpot color="#BEF04C" size={240} className="top-[20%] right-[-80px] opacity-25" />
      <GlowSpot color="#8B5CF6" size={200} className="bottom-[15%] left-[-90px] opacity-20" />
      <Image
        source={{ uri: reel.frameUrl }}
        className="absolute inset-0 h-full w-full"
        accessibilityLabel={`${reel.author} reel`}
      />

      {/* Top — liquid-glass back disc + feed title over the reel. */}
      <View className="flex-row items-center gap-3 px-4 pt-2">
        <Glass interactive effect="clear"  className="rounded-full">
          <Button
            variant="ghost"
            size="icon"
            haptic="light"
            onPress={() => onBack?.()}
            accessibilityLabel="Go back"
            className="h-10 w-10"
          >
            <Icon name="chevron-left" size="md" color="#F5F3F8" />
          </Button>
        </Glass>
        <Text className="text-base font-semibold text-white">Reels</Text>
      </View>

      {/* Right action rail — like / comment / share. */}
      <View
        className="absolute right-3 items-center gap-5"
        style={{ bottom: insets.bottom + 120 }}
      >
        <Mount className="items-center gap-1">
          <Button
            variant="ghost"
            size="icon"
            haptic="light"
            onPress={() => {
              haptics.light();
              setLiked((l) => !l);
              onLike?.(reel.id);
            }}
            accessibilityLabel={liked ? "Unlike" : "Like"}
            accessibilityState={{ checked: liked }}
            className="h-11 w-11"
          >
            <Icon
              name="heart"
              size="lg"
              color={liked ? "destructive" : "#F5F3F8"}
            />
          </Button>
          <Text className="text-xs font-medium text-white">{reel.likes}</Text>
        </Mount>
        <Mount delay={60} className="items-center gap-1">
          <Button
            variant="ghost"
            size="icon"
            haptic="light"
            onPress={() => onComment?.(reel.id)}
            accessibilityLabel="Comments"
            className="h-11 w-11"
          >
            <Icon name="message-circle" size="lg" color="#F5F3F8" />
          </Button>
          <Text className="text-xs font-medium text-white">{reel.comments}</Text>
        </Mount>
        <Mount delay={120} className="items-center gap-1">
          <Button
            variant="ghost"
            size="icon"
            haptic="light"
            onPress={() => onShare?.(reel.id)}
            accessibilityLabel="Share reel"
            className="h-11 w-11"
          >
            <Icon name="send" size="lg" color="#F5F3F8" />
          </Button>
          <Text className="text-xs font-medium text-white">Share</Text>
        </Mount>
      </View>

      {/* Bottom — author row + caption. */}
      <View
        className="absolute inset-x-0 bottom-0 px-4"
        style={{ paddingBottom: insets.bottom + 20 }}
      >
        <Mount delay={180} className="mb-2 flex-row items-center gap-2.5">
          <Avatar
            size="sm"
            source={reel.avatarUrl ? { uri: reel.avatarUrl } : undefined}
            fallback={reel.author}
            alt={reel.author}
          />
          <Text className="text-sm font-semibold text-white">{reel.author}</Text>
          {following ? (
            <Button
              variant="secondary"
              haptic="light"
              onPress={() => {
                haptics.selection();
                setFollowing(false);
                onFollow?.(reel.id);
              }}
              accessibilityLabel="Following"
              accessibilityState={{ checked: true }}
              className="h-7 rounded-full px-3"
            >
              <Text className="text-xs font-medium text-white">Following</Text>
            </Button>
          ) : (
            <Glass interactive effect="clear"  className="rounded-full">
              <Button
                variant="ghost"
                haptic="light"
                onPress={() => {
                  haptics.selection();
                  setFollowing(true);
                  onFollow?.(reel.id);
                }}
                accessibilityLabel="Follow"
                className="h-7 rounded-full px-3"
              >
                <Text className="text-xs font-medium text-white">Follow</Text>
              </Button>
            </Glass>
          )}
        </Mount>
        <Text className="text-sm text-white/90" numberOfLines={2}>
          {reel.caption}
        </Text>
        {/* Sound credit — every short-form feed pays out the audio. */}
        <View className="mt-1.5 flex-row items-center gap-1.5">
          <Icon name="music" size="sm" color="#FFF" />
          <Text className="text-xs text-white/60" numberOfLines={1}>
            Original audio · {reel.author}
          </Text>
        </View>
      </View>
    </SafeAreaView>
    </World>
  );
}
ReelsFeedScreen.displayName = "ReelsFeedScreen";
agent prompt — paste into Claude Code, Cursor, Devin…
Recreate the "Reels Feed Screen" screen in React Native using LumioUI.

Goal: Vertical reels with action rail and caption 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 media-reels-feed
```

Or pull just the components: `npx lumioui add avatar button glass icon image 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

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

### `glass` — iOS 26 liquid-glass surface — real glass via expo-glass-effect (Expo Go) or @callstack/liquid-glass (dev builds), SVG refraction + specular rim on web, frosted fallback elsewhere; GlassContainer melts adjacent panes into one blob
- `<Glass>` ×2

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

### `image` — Cached image with placeholder, fallback and aspect handling.
- `<Image>` ×1

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

## 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/media/reels-feed.tsx` exporting ReelsFeedScreen. 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 { View } from "react-native";
import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";
import { Avatar, Button, Glass, Icon, Image, Text } from "@lumioui/ui";
import { GlowSpot, Mount, World } from "../shared";
import { useHaptic } from "@lumioui/core";

export interface Reel {
  id: string;
  author: string;
  avatarUrl?: string;
  frameUrl: string;
  caption: string;
  likes: string;
  comments: string;
  /** True while this is the visible reel. */
  active?: boolean;
}

export interface ReelsFeedScreenProps {
  reels?: Reel[];
  onLike?: (id: string) => void;
  onComment?: (id: string) => void;
  onShare?: (id: string) => void;
  onFollow?: (id: string) => void;
  onBack?: () => void;
}

const DEFAULT_REELS: Reel[] = [
  {
    id: "r1",
    author: "studio.orbit",
    avatarUrl: "https://i.pravatar.cc/150?img=32",
    frameUrl: "https://images.unsplash.com/photo-1469334031218-e382a71b716b?w=800&h=1400&fit=crop&q=70&auto=format",
    caption: "Behind the seam: how the Orbit coat gets its structure",
    likes: "12.4k",
    comments: "312",
    active: true,
  },
];

/** Reels — full-bleed frame, right action rail, bottom caption + author. */
export function ReelsFeedScreen({
  reels = DEFAULT_REELS,
  onLike,
  onComment,
  onShare,
  onFollow,
  onBack,
}: ReelsFeedScreenProps) {
  const haptics = useHaptic();
  const insets = useSafeAreaInsets();
  const reel = reels.find((r) => r.active) ?? reels[0];
  const [liked, setLiked] = React.useState(false);
  const [following, setFollowing] = React.useState(false);
  if (!reel) return null;

  return (
    <World primary="#65A30D">
    <SafeAreaView className="flex-1 bg-black" edges={["top", "bottom"]}>
      <GlowSpot color="#BEF04C" size={240} className="top-[20%] right-[-80px] opacity-25" />
      <GlowSpot color="#8B5CF6" size={200} className="bottom-[15%] left-[-90px] opacity-20" />
      <Image
        source={{ uri: reel.frameUrl }}
        className="absolute inset-0 h-full w-full"
        accessibilityLabel={`${reel.author} reel`}
      />

      {/* Top — liquid-glass back disc + feed title over the reel. */}
      <View className="flex-row items-center gap-3 px-4 pt-2">
        <Glass interactive effect="clear"  className="rounded-full">
          <Button
            variant="ghost"
            size="icon"
            haptic="light"
            onPress={() => onBack?.()}
            accessibilityLabel="Go back"
            className="h-10 w-10"
          >
            <Icon name="chevron-left" size="md" color="#F5F3F8" />
          </Button>
        </Glass>
        <Text className="text-base font-semibold text-white">Reels</Text>
      </View>

      {/* Right action rail — like / comment / share. */}
      <View
        className="absolute right-3 items-center gap-5"
        style={{ bottom: insets.bottom + 120 }}
      >
        <Mount className="items-center gap-1">
          <Button
            variant="ghost"
            size="icon"
            haptic="light"
            onPress={() => {
              haptics.light();
              setLiked((l) => !l);
              onLike?.(reel.id);
            }}
            accessibilityLabel={liked ? "Unlike" : "Like"}
            accessibilityState={{ checked: liked }}
            className="h-11 w-11"
          >
            <Icon
              name="heart"
              size="lg"
              color={liked ? "destructive" : "#F5F3F8"}
            />
          </Button>
          <Text className="text-xs font-medium text-white">{reel.likes}</Text>
        </Mount>
        <Mount delay={60} className="items-center gap-1">
          <Button
            variant="ghost"
            size="icon"
            haptic="light"
            onPress={() => onComment?.(reel.id)}
            accessibilityLabel="Comments"
            className="h-11 w-11"
          >
            <Icon name="message-circle" size="lg" color="#F5F3F8" />
          </Button>
          <Text className="text-xs font-medium text-white">{reel.comments}</Text>
        </Mount>
        <Mount delay={120} className="items-center gap-1">
          <Button
            variant="ghost"
            size="icon"
            haptic="light"
            onPress={() => onShare?.(reel.id)}
            accessibilityLabel="Share reel"
            className="h-11 w-11"
          >
            <Icon name="send" size="lg" color="#F5F3F8" />
          </Button>
          <Text className="text-xs font-medium text-white">Share</Text>
        </Mount>
      </View>

      {/* Bottom — author row + caption. */}
      <View
        className="absolute inset-x-0 bottom-0 px-4"
        style={{ paddingBottom: insets.bottom + 20 }}
      >
        <Mount delay={180} className="mb-2 flex-row items-center gap-2.5">
          <Avatar
            size="sm"
            source={reel.avatarUrl ? { uri: reel.avatarUrl } : undefined}
            fallback={reel.author}
            alt={reel.author}
          />
          <Text className="text-sm font-semibold text-white">{reel.author}</Text>
          {following ? (
            <Button
              variant="secondary"
              haptic="light"
              onPress={() => {
                haptics.selection();
                setFollowing(false);
                onFollow?.(reel.id);
              }}
              accessibilityLabel="Following"
              accessibilityState={{ checked: true }}
              className="h-7 rounded-full px-3"
            >
              <Text className="text-xs font-medium text-white">Following</Text>
            </Button>
          ) : (
            <Glass interactive effect="clear"  className="rounded-full">
              <Button
                variant="ghost"
                haptic="light"
                onPress={() => {
                  haptics.selection();
                  setFollowing(true);
                  onFollow?.(reel.id);
                }}
                accessibilityLabel="Follow"
                className="h-7 rounded-full px-3"
              >
                <Text className="text-xs font-medium text-white">Follow</Text>
              </Button>
            </Glass>
          )}
        </Mount>
        <Text className="text-sm text-white/90" numberOfLines={2}>
          {reel.caption}
        </Text>
        {/* Sound credit — every short-form feed pays out the audio. */}
        <View className="mt-1.5 flex-row items-center gap-1.5">
          <Icon name="music" size="sm" color="#FFF" />
          <Text className="text-xs text-white/60" numberOfLines={1}>
            Original audio · {reel.author}
          </Text>
        </View>
      </View>
    </SafeAreaView>
    </World>
  );
}
ReelsFeedScreen.displayName = "ReelsFeedScreen";
```

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