npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

kra-ui

v1.0.1

Published

基于 @shopify/restyle 的 React Native UI 组件库

Readme


特性

  • 基于 @shopify/restyle 构建,支持强类型主题系统
  • 内置亮色 / 暗色主题,开箱即用
  • 30+ 常用组件,覆盖布局、表单、反馈等场景
  • 使用 TypeScript 编写,提供完整类型定义
  • 支持 React Native 新架构

组件列表

| 布局 | 表单 | 数据展示 | 反馈 | 导航/其他 | | --- | --- | --- | --- | --- | | Box | Button | Avatar | Alert | Accordion | | Flex | Checkbox | Badge | Spinner | Modal | | Grid | Input | Card | Rating | Popup | | Stack | NumberInput | Code | Toast | Tabs | | Center | PasswordInput | Heading | - | Dropdown | | Group | PinInput | Highlight | - | - | | AspectRatio | Radio | List | - | - | | ScrollArea | SegmentedControl | Separator | - | - | | - | Switch | Text | - | - | | - | Textarea | Divider | - | - | | - | Link | - | - | - |

安装

# npm
npm install kra-ui @shopify/restyle

# yarn
yarn add kra-ui @shopify/restyle

# pnpm
pnpm add kra-ui @shopify/restyle

依赖要求

  • React >= 18.0.0
  • React Native >= 0.72.0
  • @shopify/restyle >= 2.0.0

快速开始

使用 NativeUIProvider 包裹根组件,即可开始使用:

import { NativeUIProvider, Button, Text } from 'kra-ui';

export default function App() {
  return (
    <NativeUIProvider>
      <Text variant="heading">Hello kra-ui</Text>
      <Button onPress={() => console.log('pressed')}>
        <Text>点击我</Text>
      </Button>
    </NativeUIProvider>
  );
}

暗色主题

import { NativeUIProvider, darkTheme } from 'kra-ui';

export default function App() {
  return (
    <NativeUIProvider theme={darkTheme}>
      {/* your app */}
    </NativeUIProvider>
  );
}

项目结构

native-ui/
├── packages/
│   ├── ui/          # 组件库源码
│   ├── example/     # Expo 示例应用
│   └── docs/        # VitePress 文档站点
├── .changeset/      # Changesets 版本管理
└── .github/         # CI/CD 工作流

本地开发

环境要求

  • Node.js >= 18
  • pnpm >= 8

开始

# 克隆仓库
git clone https://github.com/aafnnp/native-ui.git
cd native-ui

# 安装依赖
pnpm install

# 启动示例应用
pnpm dev:example

# 启动文档站点
pnpm dev:docs

# 构建组件库
pnpm build

贡献指南

  1. Fork 本仓库
  2. 创建特性分支 (git checkout -b feature/awesome)
  3. 提交变更 (git commit -m 'feat: add awesome feature')
  4. 推送分支 (git push origin feature/awesome)
  5. 创建 Pull Request

本项目使用 Changesets 管理版本,提交 PR 前请运行:

pnpm changeset

许可证

MIT © aafnnp