lodev09/react-native-true-sheet/truesheet-usage
- community
Checking that the SKILL.md file is still in the repository.
Consumer-side guide for integrating @lodev09/react-native-true-sheet into a React Native app. Use this skill whenever the user wants to add, configure, control, or debug a bottom sheet using TrueSheet — including ref-based sheets, named global sheets, web support with TrueSheetProvider/useTrueSheet, React Navigation or Expo Router sheet flows, Reanimated-driven animations, scrolling content, stacking, headers/footers, detents, peeking, side sheets, keyboard handling, dimming, backgrounds, liquid glass, and Jest testing. Also use when the user is migrating from v3 to v4, troubleshooting layout or gesture issues, or asking about any TrueSheet prop, event, or method — even if they don't mention "TrueSheet" by name but describe a bottom sheet in a React Native context.
Install
npx vskill@latest install lodev09/react-native-true-sheet/truesheet-usageSKILL.md
TrueSheet Consumer Guide
Use this skill to produce correct, idiomatic code for apps that consume @lodev09/react-native-true-sheet (v4). It covers choosing the right integration pattern, applying the public API correctly, and avoiding platform-specific pitfalls.
Requires React Native >= 0.82 (Expo SDK 55+) with the New Architecture.
Quick Start
The simplest sheet: a ref, a button, and some content.
Content Layout (v4)
The sheet's content lays out naturally — it wraps its children's height like a regular view or a React Navigation screen. It does not fill the sheet by default. Consequences:
- A
flex: 1child collapses to zero height unless the content is filled. - To fill the sheet's visible height per detent (spacers, centered content, bounded scroll views), pass
flex: 1via the sheet'sstyleprop:
The content is sized to the sheet's visible height per detent and tracks it in realtime while dragging, so flex layouts follow the sheet's edge frame-by-frame.
Choose the Right Control Pattern
Pick one based on where the trigger lives relative to the sheet and which platforms you target.
| Pattern | When to use | Platform | |
|---|---|---|---|
| Ref | Trigger and sheet in the same component | All | |
| Named + global methods | Trigger is far from the sheet (different screen, deep in tree) | Native only | |
| `TrueSheetProvider` + `useTrueSheet()` | Web support needed, or you want hook-based control | All (required on web) | |
| `createTrueSheetNavigator()` / Expo Router `Sheet` | Sheets are part of a navigation flow | All | |
| `ReanimatedTrueSheet` | You need animated values synced to sheet position | All |
Ref-based
Already shown in Quick Start. Use present(), dismiss(), resize(index) on the ref.
Named sheet with global methods (native only)
When the trigger is far from where the sheet renders:
Every name must be unique. Static methods don't exist on web — use the provider pattern instead.
Web control with provider
Wrap your app with TrueSheetProvider (on native this is a pass-through with zero overhead). Web also needs @radix-ui/react-dialog and @radix-ui/react-presence installed (optional peer deps):
Navigation (React Navigation / Expo Router)
See advanced patterns reference for full setup with createTrueSheetNavigator, the static API (createTrueSheetScreen), the Expo Router Sheet layout from /navigation/expo-router, screen options (including scrollableRef via setOptions), multi-step flows as stacked sheet screens, and useTrueSheetNavigation.
Reanimated
See advanced patterns reference for ReanimatedTrueSheet, ReanimatedTrueSheetProvider, and animated values (animatedPosition, animatedIndex, animatedDetent).
Detents
Detents define the heights the sheet can snap to. You get up to 3 detents, sorted smallest to largest. Default: [0.5, 1].
| Value | Meaning | |
|---|---|---|
'auto' | Size to fit the content (iOS 16+, Android, Web). Works with scrollables — sizes to the scroll content and resizes as it grows/shrinks | |
'peek' | Collapsed height from the measured header + absolute footer + content through a TrueSheetPeek marker (iOS 16+, Android, Web). Falls back to 150 when none provided | |
0 – 1 | Fraction of the screen height |
Common Recipes
Scrollable content
Point the sheet at your scroll view with scrollableRef. For fixed detents, bound the scroll view with flex: 1 on the sheet's style:
- With
detents={['auto']}noflex: 1is needed — the sheet sizes to the scroll content and bounds the viewport automatically - Exception: lists that wrap their scroll view in
flex: 1(e.g.FlashList) render blank with'auto'unless the sheet hasstyle={{ flex: 1 }}— the sheet still sizes to the list - The scroll view doesn't have to be a direct child — a wrapping
Viewworks - Keyboard handling, nested scrolling (Android), and the bottom safe-area inset are wired automatically
- Scrolling to top expands to the next detent — disable with
scrollableOptions={{ scrollingExpandsSheet: false }}(YouTube-style comments) - The bottom safe-area inset (and an absolute footer's height) is applied natively while content can scroll — don't add manual padding, or opt out with
scrollableOptions={{ contentInsetAdjustment: 'never' }}('safe-area'/'footer'keep one of the two)
Fixed header and footer
- Use the
headerandfooterprops — they render in native container views, so the layout math is handled for you. Don't fake it with absolute positioning. - Both are relative by default: header takes space above the content, footer below it, and both count toward the
'auto'detent. - The footer absorbs the bottom safe-area inset natively — remove manual
paddingBottom: insets.bottomfrom footer content or it doubles up. Set the footer background viafooterStyleso it fills the inset. - A relative footer is laid out below the content — with fixed detents, bound the content with
flex: 1(sheetstyle) so the footer stays visible. - To float them over the content instead (excluded from
'auto'height), useheaderOptions={{ position: 'absolute' }}/footerOptions={{ position: 'absolute' }}. An absolute footer rises above the keyboard (opt out withavoidKeyboard: false); a relative one stays in the layout flow behind it. - An absolute footer covers the bottom of a plugged scrollable — the scroll content is padded by the measured footer height automatically (default
contentInsetAdjustment: 'automatic') and the footer counts toward'auto', so don't hard-codepaddingBottom: FOOTER_HEIGHT. Use'safe-area'to let content scroll under the footer. - With
avoidKeyboard: false, only the footer portion above the keyboard adds scroll padding and contributes to the expanded'auto'height. Footer inset adjustment must be enabled.
Peeking (map-style collapsed sheet)
Collapsed, the sheet shows everything from the top through the bottom edge of TrueSheetPeek; content below stays hidden until expanded. An empty <TrueSheetPeek /> works as a fold marker between existing views. One peek component per sheet. Absolute footers count toward the peek height; relative footers don't (pushed off-screen at peek).
Toasts and dialogs above sheets
Renders children in a native layer above every presented sheet. Show/hide by conditionally rendering children. Fills the window; touches that miss the children pass through. Never use RN Modal/FullWindowOverlay for this anymore. Don't put react-native-screens containers (native stack, tabs, drawer) inside it — Android crashes.
Non-dismissible confirmation
Confirm before dismiss (unsaved changes)
Don't try to block dismissal from a callback — native can't wait on JS. Toggle dismissible from state; blocked drags and back/escape fire onDismissAttempt (dim taps don't), then dismiss() programmatically.
Backgrounds
backgroundStyle.backgroundColor paints over glass or blur. background renders any node above the sheet effects; the wrapper ignores touches. blurOptions is removed in v4. For custom intensity, use a third-party blur in background. See Backgrounds for layers, per-detent transitions, and iOS fallbacks.
Present on mount
Pre-mount content for 'auto' detents
Content mounts on first present() by default. If it settles asynchronously (data fetch, images), 'auto' measures too early. Set lazy={false} to mount content up front without presenting, then present once ready (native only):
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/truesheet-usage/SKILL.md
Popularity
- Repository stars
- 2,066
- Repository forks
- 108
- 7-day trend score
- 38
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/lodev09/react-native-true-sheet/truesheet-usage)