Armas
UI component library for egui following shadcn/ui design patterns.
Overview
Armas is a collection of 50+ reusable UI components for egui. It includes a theme system with serializable color palettes and spacing, along with components like buttons, inputs, dialogs, menus, cards, and layouts.
The design is inspired by shadcn/ui's approach to component libraries - focused on composability and consistency rather than heavy abstraction.
Installation
Add this to your Cargo.toml:
[]
= "0.1.0"
= "0.33"
Example
use *;
use Context;
Components
Includes the following component categories:
Basic: Button, Input, Select, Toggle, Slider, Progress, Badge, Alert Layout: Card, Separator, Accordion, Tabs, BentoGrid, Sidebar, Table Navigation: Menu, Breadcrumbs, Pagination, TreeView, CommandPalette Overlay: Dialog, Sheet, Drawer, Tooltip
Most components support variants (default, outline, ghost, destructive) and sizes (sm, default, lg) through builder methods.
Theming
The theme system stores color palettes and spacing values in serializable structs. Themes can be loaded from JSON or constructed programmatically:
use ;
// Load theme from JSON
let theme = load_from_json.unwrap;
// Access theme colors
let primary = theme.primary;
let background = theme.background;
// Use with egui context
ctx.set_armas_theme;
Documentation
Full API documentation is available at docs.rs/armas
Related Crates
armas-audio- Audio/DAW UI componentsarmas-animated- Animated text and effectsarmas-icon- Icon rendering system
License
Licensed under either of:
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
at your option.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.