
add-icon
by arto-app
ð °ïž Arto â the Art of Reading Markdown.
SKILL.md
name: add-icon description: Add a new Tabler icon to the project. Use when adding icons to the UI.
Add Icon Skill
This skill guides you through adding a new icon from Tabler Icons to the project.
Process
Icons are managed via icons.json and automatically built by Vite plugin.
Steps
-
Choose Icon
- Browse available icons: https://tabler.io/icons
- Note the icon name (e.g.,
folder-open,info-circle)
-
Add to icons.json
- Edit
renderer/icons.json - Add the icon name to the JSON array (in alphabetical order)
- Edit
-
Build Icon Sprite (Automatic)
- Icon sprite is automatically generated when Vite builds
- Just run
just devorcargo build
-
Add Rust Enum Variant
- Edit
desktop/src/components/icon.rs - Add variant to
IconNameenum (use PascalCase) - Add case to
Displayimplementation
- Edit
Example
renderer/icons.json:
[
"folder",
"folder-open",
"file"
]
desktop/src/components/icon.rs:
pub enum IconName {
Folder,
FolderOpen,
File,
}
impl std::fmt::Display for IconName {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
IconName::Folder => write!(f, "folder"),
IconName::FolderOpen => write!(f, "folder-open"),
IconName::File => write!(f, "file"),
}
}
}
File Locations
| File | Purpose | Git Tracked |
|---|---|---|
renderer/icons.json | Icon list configuration | â Yes |
renderer/vite.config.ts | Icon sprite plugin | â Yes |
renderer/public/icons/tabler-sprite.svg | Generated sprite (Vite source) | â No |
assets/dist/icons/tabler-sprite.svg | Build output (Dioxus asset) | â No |
Important
- NEVER edit generated SVG files directly
- The
assets/dist/directory is.gitignored as build output - Icon sprite generation is automatic via Vite plugin (
buildStarthook) - Rust code references icons via
asset!("/assets/dist/icons/tabler-sprite.svg") - Icons come from
@tabler/iconsnpm package (outline style only)
Build Process
icons.json
â
Vite plugin (buildStart hook)
â
renderer/public/icons/tabler-sprite.svg
â
Vite build
â
assets/dist/icons/tabler-sprite.svg
â
Rust asset!() macro
ã¹ã³ã¢
ç·åã¹ã³ã¢
ãªããžããªã®åè³ªææšã«åºã¥ãè©äŸ¡
SKILL.mdãã¡ã€ã«ãå«ãŸããŠãã
ã©ã€ã»ã³ã¹ãèšå®ãããŠãã
100æå以äžã®èª¬æããã
GitHub Stars 100以äž
3ã¶æä»¥å ã«æŽæ°
10å以äžãã©ãŒã¯ãããŠãã
ãªãŒãã³Issueã50æªæº
ããã°ã©ãã³ã°èšèªãèšå®ãããŠãã
1ã€ä»¥äžã®ã¿ã°ãèšå®ãããŠãã
ã¬ãã¥ãŒ
ã¬ãã¥ãŒæ©èœã¯è¿æ¥å ¬éäºå®ã§ã





