Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计通过

truesheet-usage真实表用法

Agent Skill

truesheet-usage 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,339

周安装

179

GitHub Stars

1,898

下载量

1,418
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:truesheet-usage(真实表用法)
来源仓库:https://github.com/lodev09/react-native-true-sheet
仓库路径:skills/truesheet-usage
安装命令:
npx skills add https://github.com/lodev09/react-native-true-sheet --skill truesheet-usage
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/lodev09/react-native-true-sheet --skill truesheet-usage

简介

truesheet-usage 用于处理 GitHub 仓库、Issue、Pull Request 等代码协作信息,适合整理仓库状态和变更事项。

  • 适用于围绕代码变更、协作事项进行信息整理的场景。
  • 通过 npx skills add 命令从 GitHub 仓库安装使用。
  • 安装前建议确认权限范围和维护状态,注意是否会触发联网或文件读写操作。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

TrueSheet Consumer Guide

Use this skill to produce correct, idiomatic code for apps that consume @lodev09/react-native-true-sheet. It covers choosing the right integration pattern, applying the public API correctly, and avoiding platform-specific pitfalls.

Quick Start

The simplest sheet: a ref, a button, and some content.

import { useRef } from 'react'
import { Button, Text, View } from 'react-native'
import { TrueSheet } from '@lodev09/react-native-true-sheet'

export function App() {
  const sheet = useRef<TrueSheet>(null)

  return (
    <View>
      <Button title="Open" onPress={() => sheet.current?.present()} />
      <TrueSheet ref={sheet} detents={['auto']} cornerRadius={24} grabber>
        <View style={{ padding: 16 }}>
          <Text>Hello from the sheet</Text>
          <Button title="Close" onPress={() => sheet.current?.dismiss()} />
        </View>
      </TrueSheet>
    </View>
  )
}

Choose the Right Control Pattern

Pick one based on where the trigger lives relative to the sheet and which platforms you target.

PatternWhen to usePlatform
RefTrigger and sheet in the same componentAll
Named + global methodsTrigger is far from the sheet (different screen, deep in tree)Native only
TrueSheetProvider + useTrueSheet()Web support needed, or you want hook-based controlAll (required on web)
createTrueSheetNavigator()Sheets are part of a navigation flowAll
ReanimatedTrueSheetYou need animated values synced to sheet positionAll

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:

// Somewhere in the tree
<TrueSheet name="profile" detents={['auto', 1]}>
  <ProfileContent />
</TrueSheet>

// Anywhere else (native only)
await TrueSheet.present('profile')
await TrueSheet.dismiss('profile')
await TrueSheet.resize('profile', 1)
await TrueSheet.dismissAll()

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):

import { TrueSheet, TrueSheetProvider, useTrueSheet } from '@lodev09/react-native-true-sheet'

function Toolbar() {
  const { present, dismiss } = useTrueSheet()
  return <Button title="Open" onPress={() => present('settings')} />
}

export function App() {
  return (
    <TrueSheetProvider>
      <Toolbar />
      <TrueSheet name="settings" detents={[0.5, 1]}>
        <SettingsContent />
      </TrueSheet>
    </TrueSheetProvider>
  )
}

Navigation (React Navigation / Expo Router)

See advanced patterns reference for full setup with createTrueSheetNavigator, Expo Router layouts, screen options, 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.

ValueMeaning
'auto'Size to fit the content (iOS 16+, Android, Web)
01Fraction of the screen height
// Content-sized sheet
<TrueSheet detents={['auto']} />

// Half and full screen
<TrueSheet detents={[0.5, 1]} />

// Three stops: peek, half, full
<TrueSheet detents={[0.25, 0.5, 1]} />

The one rule you can't break: never combine 'auto' with scrollable. Auto-sizing needs to measure the full content, but a scrollable sheet clips it — they're fundamentally incompatible. Use fractional detents for scrollable sheets.

Common Recipes

Scrollable content

<TrueSheet detents={[0.5, 1]} scrollable cornerRadius={24} grabber>
  <ScrollView>
    {items.map(item => <ItemRow key={item.id} item={item} />)}
  </ScrollView>
</TrueSheet>
  • The scrollable prop auto-detects ScrollView/FlatList up to 2 levels deep
  • On iOS, scrolling to top expands to next detent — disable with scrollableOptions={{scrollingExpandsSheet: false}}
  • On Android, nested scrolling is handled automatically

Fixed header and footer

<TrueSheet
  detents={[0.5, 1]}
  scrollable
  header={
    <View style={{ padding: 16 }}>
      <Text style={{ fontSize: 18, fontWeight: 'bold' }}>Title</Text>
    </View>
  }
  footer={<BottomActions />}
>
  <ScrollView>{/* ... */}</ScrollView>
</TrueSheet>

Use the header and footer props — they render in native container views, so the layout math is handled for you. Don't fake it with absolute positioning.

Non-dismissible confirmation

<TrueSheet
  ref={sheet}
  detents={['auto']}
  dismissible={false}
  draggable={false}
  dimmed
  grabber={false}
>
  <View style={{ padding: 24 }}>
    <Text>Are you sure?</Text>
    <Button title="Confirm" onPress={handleConfirm} />
    <Button title="Cancel" onPress={() => sheet.current?.dismiss()} />
  </View>
</TrueSheet>

iOS blur background

<TrueSheet detents={['auto']} backgroundBlur="system-material">
  <View style={{ padding: 16 }}>
    <Text>Blurred sheet</Text>
  </View>
</TrueSheet>

Fine-tune with blurOptions={{intensity: 80, interaction: true}}. Blur is iOS-only.

Present on mount

<TrueSheet detents={['auto', 1]} initialDetentIndex={0} initialDetentAnimated>
  <WelcomeContent />
</TrueSheet>

Dimming control

// No dimming (allows background interaction)
<TrueSheet dimmed={false} detents={['auto']} />

// Dim only above a certain detent
<TrueSheet detents={['auto', 0.7, 1]} dimmedDetentIndex={1} />

Resize programmatically

resize() takes a detent index, not a value:

const sheet = useRef<TrueSheet>(null)

// detents={[0.3, 0.6, 1]}
await sheet.current?.resize(2) // expands to full (index 2)

Rules That Save Debugging Time

  1. Max 3 detents, sorted smallest → largest.
  2. Never 'auto' + scrollable — they're incompatible.
  3. resize() takes an index, not a fraction. resize(1) means "go to the second detent."
  4. Sheet names must be unique across your entire app.
  5. Static methods are native-only — use useTrueSheet() on web.
  6. Don't use autoFocus on TextInputs inside sheets. Focus in onDidPresent instead: <TrueSheet onDidPresent={() => inputRef.current?.focus()}>
  7. Use flexGrow: 1 (not flex: 1) inside GestureHandlerRootView on Android.
  8. Dismiss sheets before closing Modals on iOS — React Native has a bug where dismissing a Modal while a sheet is visible causes a blank screen.
  9. Use header/footer props for fixed chrome — don't reach for absolute positioning.
  10. Liquid Glass is automatic on iOS 26+. Set backgroundColor to disable it per-sheet, or add UIDesignRequiresCompatibility to Info.plist to disable app-wide.

Platform Differences at a Glance

FeatureiOSAndroidWeb
'auto' detentiOS 16+YesYes
backgroundBlurYesNoNo
Liquid GlassiOS 26+NoNo
Static global methodsYesYesNo (use provider)
scrollableYesYesNo
anchor / side sheetsSystem-controlled marginsanchorOffset propanchorOffset prop
pageSizingiOS 17+ (iPad)N/ALandscape/tablet
detached modeNoNoYes
Edge-to-edgeN/AAuto-detectedN/A
Keyboard handlingBuilt-inBuilt-inN/A

Events

The most commonly used events:

EventWhen it firesPayload
onMountContent is mounted and ready
onDidPresentSheet finished presenting{index, position, detent}
onDidDismissSheet finished dismissing
onDetentChangeUser dragged or resize() changed the detent{index, position, detent}
onPositionChangeContinuous position updates during drag/animation{index, position, detent, realtime}

For the full event list (drag events, focus/blur events, will/did lifecycle pairs, onBackPress), see the API reference.

Methods

On a ref:

  • present(index?, animated?) — show the sheet
  • dismiss(animated?) — hide the sheet and all its children
  • dismissStack(animated?) — hide only sheets stacked on top
  • resize(index) — snap to a detent by index

Global (native only):

  • TrueSheet.present(name, index?, animated?)
  • TrueSheet.dismiss(name, animated?)
  • TrueSheet.dismissStack(name, animated?)
  • TrueSheet.resize(name, index)
  • TrueSheet.dismissAll(animated?)

Web hook:

const { present, dismiss, dismissStack, resize, dismissAll } = useTrueSheet()

Stacking Sheets

Present a new sheet while another is visible and the first one hides automatically. Dismiss the top sheet and the previous one comes back. This is built-in — no extra config needed.

  • dismiss() cascades: it dismisses the current sheet plus everything stacked on top
  • dismissStack() dismisses only the sheets on top, keeping the current one visible
  • Use onDidFocus / onDidBlur to react to a sheet gaining or losing the top position

Deep-Dive References

When you need the full picture, load these reference files:

ReferenceWhat's inside
ConfigurationEvery prop with type, default, platform support, and notes
APIComplete events and methods reference with payload types
Advanced PatternsNavigation, Reanimated, Web, Side sheets, Liquid Glass, Jest mocking, Migration v2→v3
TroubleshootingCommon issues and fixes by platform

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.81%
按下载量换算479

Claude

33.38%
按下载量换算473

Cursor

17.23%
按下载量换算244

Gemini CLI

10.25%
按下载量换算145

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills