xiaohongshu
xiaohongshu
building-ui
Complete guide for building beautiful apps with Expo Router. Covers fundamentals, styling, components, navigation, animations, patterns, and native tabs.
Full skill instructions
Consult these resources as needed:
CRITICAL: Always try Expo Go first before creating custom builds.
Most Expo apps work in Expo Go without any custom native code. Before running npx expo run:ios or npx expo run:android:
npx expo start and scan the QR code with Expo Gomodules/ directory)comment-card.tsxSee ./references/route-structure.md for detailed route conventions.
app directory.expo-audio not expo-avexpo-video not expo-avexpo-symbols not @expo/vector-iconsreact-native-safe-area-context not react-native SafeAreaViewprocess.env.EXPO_OS not Platform.OSReact.use not React.useContextexpo-image Image component instead of intrinsic element imgexpo-glass-effect for liquid glass backdrops<ScrollView contentInsetAdjustmentBehavior="automatic" /> instead of <SafeAreaView> for smarter safe area insetscontentInsetAdjustmentBehavior="automatic" should be applied to FlatList and SectionList as welluseWindowDimensions over Dimensions.get() to measure screen size<Switch /> from React Native and @react-native-community/datetimepickercontentInsetAdjustmentBehavior="automatic" setheaderSearchBarOptions in Stack.Screen options to add a search bar<Text selectable /> prop on text containing data that could be copiedimport { Text, StyleSheet } from 'react-native';
const styles = StyleSheet.create({
title: {
fontSize: 24,
fontWeight: '700',
color: '#1a1a1a',
},
body: {
fontSize: 16,
lineHeight: 24,
color: '#4a4a4a',
},
});
iOS and Android handle shadows differently:
const styles = StyleSheet.create({
card: {
// iOS shadows
shadowColor: '#000',
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.1,
shadowRadius: 8,
// Android shadows
elevation: 4,
// Common
backgroundColor: '#fff',
borderRadius: 12,
},
});
Use <Link href="/path" /> from 'expo-router' for navigation between routes.
import { Link } from 'expo-router';
// Basic link
<Link href="/path" />
// Wrapping custom components
<Link href="/path" asChild>
<Pressable>...</Pressable>
</Link>
Whenever possible, include a <Link.Preview> to follow iOS conventions. Add context menus and previews frequently to enhance navigation.
_layout.tsx files to define stacksSet the page title using Stack.Screen options:
import { Stack } from 'expo-router';
export default function Layout() {
return (
<Stack>
<Stack.Screen
name="index"
options={{ title: 'Home' }}
/>
<Stack.Screen
name="details"
options={{ title: 'Details' }}
/>
</Stack>
);
}
Add context menus for enhanced interactions:
import { ContextMenu } from 'zeego/context-menu';
<ContextMenu.Root>
<ContextMenu.Trigger>
<Pressable>{/* content */}</Pressable>
</ContextMenu.Trigger>
<ContextMenu.Content>
<ContextMenu.Item key="share" onSelect={handleShare}>
<ContextMenu.ItemTitle>Share</ContextMenu.ItemTitle>
</ContextMenu.Item>
</ContextMenu.Content>
</ContextMenu.Root>
Present modals using the presentation option:
// In _layout.tsx
<Stack.Screen
name="modal"
options={{
presentation: 'modal',
headerShown: false,
}}
/>
For bottom sheets, use:
<Stack.Screen
name="sheet"
options={{
presentation: 'formSheet',
sheetGrabberVisible: true,
sheetInitialDetentIndex: 0,
sheetAllowedDetents: [0.5, 1],
}}
/>
app/
├── _layout.tsx # Root layout (Stack or Tabs)
├── index.tsx # Home screen "/"
├── (tabs)/
│ ├── _layout.tsx # Tab navigator
│ ├── index.tsx # First tab
│ └── settings.tsx # Settings tab
├── [id].tsx # Dynamic route "/123"
└── modal.tsx # Modal screen
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience