pressto-button

📁 david-evans03/skills 📅 Feb 10, 2026
8
总安装量
8
周安装量
#36076
全站排名
安装命令
npx skills add https://github.com/david-evans03/skills --skill pressto-button

Agent 安装分布

cursor 7
amp 4
gemini-cli 4
github-copilot 4
codex 4
kimi-cli 4

Skill 文档

Setup

Add PressablesConfig with haptics to your root layout:

import { PressablesConfig } from "pressto";
import * as Haptics from "expo-haptics";

export default function RootLayout() {
  return (
    <PressablesConfig
      globalHandlers={{
        onPressIn: () => Haptics.selectionAsync(),
      }}
    >
      <Stack>
        <Stack.Screen name="(tabs)" options={{ headerShown: false }} />
      </Stack>
    </PressablesConfig>
  );
}

Usage

import { PressableScale, PressableOpacity } from "pressto";

// Scales down on press
<PressableScale onPress={() => {}}>
  <Text>Scale</Text>
</PressableScale>

// Fades when pressed
<PressableOpacity onPress={() => {}}>
  <Text>Opacity</Text>
</PressableOpacity>

Supports standard Pressable props.

Notes

Do not add extra animations beyond what Pressto provides. Custom animations can cause text to appear blurry when pressing. Use only the built-in scale/opacity effects.