Skip to content
项目

关于

一个受 Shadcn 启发的 Rust 组件注册表,用于构建 Web、桌面、iOS 和 Android 跨平台应用。

网站与应用开发

这些数字如何统计

实测星标增长

24小时
+1
7天
+11
15天
+28
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

Rust/UI — Dioxus

Inspired by shadcn/ui, built for Rust fullstack apps. A component registry for Dioxus — Tailwind CSS, copy-paste ready.

Rust/UI

Early stage, experimental — expect breaking changes. Open to contributors.

See CONTRIBUTING.md before opening an issue or pull request.

Not affiliated with or endorsed by the Dioxus team. This is an independent personal project.

Why Rust/UI?

Rust/UI is not a component library you install as a crate. It is a collection of reusable components that you copy into your Dioxus applications.

  • Full control: The code is yours.
  • Styling: Built with Tailwind CSS v4.
  • Framework: Designed for the Dioxus fullstack ecosystem.
  • Type safe: Uses Rust's type system for component props.

Stack

Tool Role
Dioxus 0.7 Fullstack Rust UI framework
Tailwind CSS v4 Styling
tw_merge Tailwind class merging
icons Lucide icons for Dioxus

Getting Started

Visit rust-ui.com to browse components and get install commands.

Prerequisites

Install the Dioxus CLI:

cargo install dioxus-cli

Use a component

Browse the registry, find a component, and copy its source into your project's components/ directory.

Development

Clone the repository, install JavaScript dependencies, then start Dioxus:

git clone https://github.com/rust-ui/dioxus-ui.git
cd dioxus-ui
pnpm install
dx serve

dx serve automatically starts the Tailwind watcher and generates assets/tailwind.css from the root tailwind.css file. No second CSS process needed.

Useful targets:

dx serve --web --fullstack
dx serve --platform desktop
dx serve --platform ios

Open http://127.0.0.1:8080.

Git hooks

git config core.hooksPath .githooks

The pre-commit hook needs typos-cli and the nightly rustfmt component (build toolchain stays stable, only formatting uses nightly):

cargo install typos-cli
rustup toolchain install nightly --profile minimal --component rustfmt

iOS simulator

dx serve --platform ios targets whatever simulator is currently booted. To pick a specific device, use one of the helper scripts (they shut down other simulators, boot the right one, uninstall the old build, then run dx serve):

./run_ios_dioxus.sh       # uses whatever simulator is already booted
./run_ios_iphone_pro.sh   # boots iPhone 16 Pro (18.6)
./run_ios_ipad_pro.sh     # boots iPad Pro (12.9-inch, 3rd gen)

Star History

License

MIT — see LICENSE.

探索相关项目

加载中…