iced-shadcn-ui
CLI for adding shadcn/ui-inspired components to iced 0.14 projects.
Components are copied as Rust source into your repo — no runtime widget crate dependency. You own and edit the files.
Install the iced-shadcn-ui package; the binary is named iced-shadcn.
Install
Templates are fetched from GitHub at add-time. Only this CLI is published to crates.io.
Quick start
From your iced 0.14 project root:
The first add will:
- Create
iced-shadcn.tomlwith defaults - Fetch the component registry from GitHub
- Resolve dependencies (
buttonpulls intheme,utils, andicons) - Copy
.rstemplates intosrc/ui/(configurable) - Patch
src/ui/mod.rswithpub moddeclarations - Merge
icedand required features intoCargo.toml
Add mod ui; to src/main.rs (or lib.rs) if it is not already present.
Commands
| Command | Description |
|---|---|
iced-shadcn add <name>... |
Add one or more components |
iced-shadcn list |
List available components |
iced-shadcn diff <name> |
Preview template diff without writing files |
list and diff require an existing iced-shadcn.toml (created by the first add).
Components (v0.1)
| Component | CLI name |
|---|---|
| Button | button |
| Badge | badge |
| Label | label |
| Separator | separator |
| Skeleton | skeleton |
| Progress | progress |
| Input | input |
| Checkbox | checkbox |
| Switch | switch |
| Card | card |
| Avatar | avatar |
| Scroll area | scroll-area |
| Table | table |
| Sidebar | sidebar |
| Icons (Lucide) | icons |
Existing files are skipped on re-run. Use diff to compare your copy against upstream templates.
Configuration
iced-shadcn.toml is created on the first add:
= "new-york"
= "neutral"
= "src/ui"
= "0.14"
= "https://github.com/bengidev/iced-shadcn-ui"
= "main"
| Field | Description |
|---|---|
style |
Template style set (new-york in v0.1) |
base_color |
Palette base (neutral in v0.1) |
ui_path |
Output directory for component files |
iced_version |
iced version merged into Cargo.toml |
registry_url |
GitHub repo for registry and templates |
registry_branch |
Git branch for raw fetches (default: main) |
Local registry override
For development or offline use:
Usage example
use ;
For icons, load the Lucide font once at startup:
use LUCIDE_FONT_BYTES;
application
.font
.run
Full documentation
License
MIT — see LICENSE.