跳到正文
Skillpedia
移动应用48k · #4578

expo-ui-jetpack-compose

它能做什么

这个工具让你可以直接在 Expo 中,使用名为 Jetpack Compose 的技术为 Android 应用创建视觉界面。它可以帮助你构建按钮和文本等元素,并遵循 Android 的视觉风格。

适用场景

  • ✓你想在 Expo 中构建 Android 应用的视觉部分时。
  • ✓你需要使用 Android 专属的视觉组件时。
  • ✓你正在使用 Expo SDK 55 版本时。

技能链接

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/expo-ui-jetpack-compose/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/expo-ui-jetpack-compose/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“创建一个文字为“Click me”的按钮,按下时弹出提示框。”

每周 5 个新技能,1 分钟读完。

工作原理

该工具使用的指令与 Jetpack Compose 相似,它是构建 Android 界面的一种现代方式。你需要选择视觉组件以及它们的排列方式,并且所有内容都要放在一个 `Host` 容器中,才能正常运行。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

The instructions in this skill apply to SDK 55 only. For other SDK versions, refer to the Expo UI Jetpack Compose docs for that version for the most accurate information.

When to Use

  • You need to build Android-native UI in Expo using @expo/ui/jetpack-compose.
  • The task involves choosing Compose views or modifiers, embedding them in Host, or translating Jetpack Compose patterns into Expo UI code.
  • You are working specifically against Expo SDK 55 behavior for Jetpack Compose integration.

Installation

npx expo install @expo/ui

A native rebuild is required after installation (npx expo run:android).

Instructions

import { Host, Column, Button, Text } from "@expo/ui/jetpack-compose";
import { fillMaxWidth, paddingAll } from "@expo/ui/jetpack-compose/modifiers";

<Host matchContents>
  <Column verticalArrangement={{ spacedBy: 8 }} modifiers={[fillMaxWidth(), paddingAll(16)]}>
    <Text style={{ typography: "titleLarge" }}>Hello</Text>
    <Button onPress={() => alert("Pressed!")}>Press me</Button>
  </Column>
</Host>;

Key Components

  • LazyColumn — Use for a Compose-native list when the platform-specific design calls for it; do not replace React Native lists universally. Wrap in <Host style={{ flex: 1 }}>.
  • Icon — Use <Icon source={require('./icon.xml')} size={24} /> with Android XML vector drawables from Material Symbols.

Limitations

  • APIs target SDK 55; check that version’s actual Expo docs and installed package before editing. Android/iOS examples are platform-specific, not interchangeable or proof of real-device behavior. Existing framework and user requirements take precedence.
  • Native rebuilds install/execute dependencies and change the project; review the intended development target first. icon.xml and app code are application assets, not bundled files.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
常见问题

什么是 Jetpack Compose?

它是一种现代且更简洁的方式,用于为 Android 应用创建视觉界面。

什么是 `Host`?

它是 Jetpack Compose 视觉元素在 Expo 中运行时必需的容器。

需要安装什么东西吗?

需要。你需要安装 `@expo/ui` 包,然后运行 `npx expo run:android` 让更改生效。

详情

作者的原始描述

Build Android-native Expo SDK 55 UI with Jetpack Compose views/modifiers, Host sizing and platform-specific integration.

repo: sickn33/agentic-awesome-skills

热度

GitHub 星标
48k
排名
#4578
许可证
MIT
更新时间
2026/10/15

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能