Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
adabraka-ui
A comprehensive, professional UI component library for GPUI, the GPU-accelerated UI framework powering the Zed editor. Inspired by shadcn/ui, adabraka-ui provides 85+ polished, accessible components for building beautiful desktop applications in Rust.
๐ Documentation ยท ๐ Getting Started ยท ๐ฆ Components ยท ๐ก Examples
โจ Features
- ๐จ Complete Theme System - Built-in light/dark themes with semantic color tokens
- ๐งฉ 85+ Components - Comprehensive library covering all UI needs from buttons to data tables
- ๐ฑ Responsive Layout - Flexible layout utilities (VStack, HStack, Grid)
- ๐ญ Professional Animations - Smooth transitions with cubic-bezier easing and spring physics
- โ๏ธ Typography System - Built-in Text component with semantic variants
- ๐ป Code Editor - Multi-line editor with syntax highlighting and full keyboard support
- โฟ Accessibility - Full keyboard navigation, ARIA labels, and screen reader support
- ๐ฏ Type-Safe - Leverages Rust's type system for compile-time guarantees
- ๐ High Performance - Optimized for GPUI's retained-mode rendering with virtual scrolling
- ๐ Well Documented - Extensive examples and comprehensive API documentation
๐ฌ Showcase
See adabraka-ui in action in real applications:
Desktop Music Player

A beautiful desktop music player with offline playing capabilities. Features smooth animations, responsive UI, and a polished user experience built entirely with adabraka-ui components.
Project Task Manager

A powerful task management application used to track the development of this UI library. Features drag-and-drop task organization with smooth animations, showcasing the library's advanced capabilities.
๐ Installation
Note: Currently requires Rust nightly due to GPUI dependencies. Install with:
rustup toolchain install nightly
Add adabraka-ui to your Cargo.toml:
[]
= "0.3"
= { = "adabraka-gpui", = "0.3" }
Build your project with nightly:
What's New in v0.3.4
Latest Release (February 2026)
v0.3.4 - docs.rs Fix
- Fixed docs.rs build failure by gating
Arcimport behind#[cfg(feature = "audio")] - Added
[package.metadata.docs.rs]withall-features = truefor reliable documentation builds
v0.3.3 - Editor UTF-8 Bug Fix
- Fixed rope byte/char offset mismatch that caused cursor drift and incorrect text placement in files with multi-byte UTF-8 characters
v0.3.2 - Clean Build
- Suppressed all compiler warnings across charts and components for a zero-warning build
v0.3.1 - Editor Improvements
- Fixed editor cursor positioning with horizontal scroll offset
- Fixed UTF-8 backspace/delete handling in the editor
v0.3.0 - Major Release
Published full adabraka-gpui ecosystem to crates.io, GPUI fork enhancements (inset shadows, letter spacing, squircle corners, text shadows, animation cancellation), 5 new components (Form, InfiniteScroll, SortableList, DataGrid, Animation Builder), comprehensive animation/polish system with 30+ easings, spring physics, gestures, and exit animations.
Quick Start
use *;
use *;
;
๐จ Component Customization with Styled Trait
All 54 components implement the Styled trait, giving you complete control over styling!
Full Customization Support
Every component can be customized using GPUI's powerful styling API. Apply any styling method to any component:
new
.variant // Use built-in variant
.bg // Custom background
.p_8 // Custom padding
.rounded_xl // Custom border radius
.border_2 // Custom border
.border_color // Custom border color
.shadow_lg // Shadow effect
.w_full // Full width
Available Styling Methods
Backgrounds & Colors:
.bg(color)- Background color.text_color(color)- Text color.border_color(color)- Border color
Spacing:
.p_4(),.p_8()- Padding (all sides).px_6(),.py_4()- Padding (horizontal/vertical).m_4(),.mx_auto()- Margins
Borders & Radius:
.border_2(),.border_4()- Border width.rounded_sm(),.rounded_lg(),.rounded_xl()- Border radius.rounded(px(16.0))- Custom radius
Sizing:
.w_full(),.h_full()- Full width/height.w(px(300.0)),.h(px(200.0))- Custom dimensions.min_w(),.max_w()- Min/max constraints
Effects:
.shadow_sm(),.shadow_lg()- Shadow effects.opacity()- Opacity control
And hundreds more! Any GPUI styling method works.
Philosophy: Good Defaults, Complete Control
Following the shadcn/ui philosophy:
Components ship with sensible defaults that you can completely override.
adabraka-ui provides great defaults AND 100% control over every component's styling!
Examples
Every component now has a *_styled_demo.rs example showing full customization capabilities:
# ... and 51 more!
Theme System
Overview
adabraka-ui provides a complete theming system with semantic color tokens inspired by shadcn/ui. Themes include both light and dark variants with carefully chosen colors for accessibility and visual hierarchy.
Basic Usage
use ;
// In your app initialization
install_theme; // or Theme::light()
// In your render method
Available Themes
Theme::light()- Clean light themeTheme::dark()- Dark theme with proper contrast
Theme Tokens
The theme system provides semantic color tokens:
// Background colors
background, card, popover, muted
// Text colors
foreground, card_foreground, popover_foreground, muted_foreground
// Interactive colors
primary, primary_foreground, secondary, secondary_foreground
accent, accent_foreground, destructive, destructive_foreground
// UI elements
border, input, ring
// Spacing and sizing
radius_sm, radius_md, radius_lg
font_family, font_mono
Layout Utilities
VStack and HStack
Vertical and horizontal stack layouts with consistent spacing.
// Vertical stack
new
.spacing // Gap between children
.align // Cross-axis alignment
.padding
.child
.child
// Horizontal stack
new
.spacing
.justify // Main-axis justification
.align
.child
.child
Grid Layout
new
.cols // 3 columns
.gap
.child
.child
.child
Layout Options
- Align:
Start,Center,End,Stretch - Justify:
Start,Center,End,Between,Around,Evenly - Flow:
Horizontal,Vertical(for wrapping)
Components
Text Component
The Text component provides consistent typography with built-in theming and font handling.
use *;
// Semantic heading variants
h1
h2
h3
h4
// Body text variants
body
body_large
body_small
caption
// Label variants
label
label_small
// Code/monospace text
code
code_small
// Muted text (secondary color)
muted
muted_small
// Custom styling
new
.size
.weight
.color
.underline
.no_wrap // Single line
.truncate // Add ellipsis when too long
// Builder pattern with variants
new
.variant
.color
Benefits:
- โ No need to manually apply
font_family()on every text element - โ Consistent typography across your application
- โ Easy to change fonts globally by updating the theme
- โ Semantic variants for proper content hierarchy
- โ Builder pattern for flexible customization
Buttons
// Basic button
new
.on_click
// Styled variants
new.variant
new.variant
new.variant
new.variant
new.variant
new.variant
// Sizes
new.size
new.size // default
new.size
// States
new.disabled
// Icon buttons
new
.size
.on_click
Input Components
Text Input
// Basic text input
let input_state = cx.new;
new
.placeholder
.variant
.size
// Variants
new
.variant
.variant
// Password input with eye icon toggle (fixed in v0.2.2!)
new
.password // Enables eye icon toggle for show/hide
.placeholder
// With prefix/suffix
new
.prefix
.suffix
Checkbox
new
.label
.checked
.on_click
// Sizes
new.size
new.size
new.size
// States
new.disabled
new.indeterminate
Toggle
new
.label
.checked
.on_click
// Sizes and variants available
Slider
Interactive slider for selecting numeric values with horizontal and vertical orientations:
// Create slider state
let slider_state = cx.new;
// Horizontal slider (default)
new
.size
.show_value
.on_change
// Vertical slider
new
.vertical
.size
.show_value
// Sizes
new.size // Small
new.size // Medium (default)
new.size // Large
// Disabled state
new.disabled
// Full Styled trait support for custom styling
new
.w
.bg
.p
.rounded
.border_2
.border_color
Select Dropdown
let options = vec!;
new
.options
.selected_index
.placeholder
.on_change
// Features
new
.searchable // Enable search
.clearable // Show clear button
.loading // Show loading state
.disabled // Disable interaction
Textarea
new
.placeholder
.rows
.resize
.max_length
SearchInput
Advanced search input with filters, case sensitivity, and results count:
use *;
// Create search input with filters
let search = cx.new;
// Update results count from your component
search.update;
// Check filter states
let active_filters = search.read.state.read.active_filters;
let case_sensitive = search.read.state.read.case_sensitive;
Features:
- โ Search icon and clear button
- โ Filter badges/chips that can be toggled
- โ Case-sensitive toggle (Aa button)
- โ Regex mode toggle (.* button)
- โ Loading state indicator
- โ Results count display
- โ Real-time search callbacks
- โ Platform-aware styling
ColorPicker
Full-featured color picker with multiple color modes and recent color history:
use *;
// Create color picker state
let color_state = cx.new;
// Render color picker
new
.show_alpha
.on_change
// With custom swatches
new
.swatches
.show_alpha
Features:
- โ Three color modes: HSL, RGB, HEX with easy switching
- โ Color preview with live updates
- โ Recent colors history (stores last 10)
- โ Custom color swatches
- โ Optional alpha/opacity slider
- โ Copy to clipboard (HEX format)
- โ Popover-based UI for clean integration
- โ Immediate UI updates without mouse movement
DatePicker
Advanced date picker with single date and date range selection:
use *;
use *;
// Single date picker
let single_state = cx.new;
new
.placeholder
.on_select
// Date range picker
let range_state = cx.new;
new
.placeholder
.on_select
// With disabled dates
new
.disable_weekends
.disable_dates
Features:
- โ Single date and date range selection modes
- โ Visual range highlighting with colored backgrounds
- โ Disabled dates with greyed-out styling
- โ Weekend disabling helper
- โ Auto-close popover after selection
- โ Multiple date formats (ISO, US, EU, custom)
- โ Locale support for internationalization
- โ Month navigation with year selection
- โ Today button for quick selection
- โ Immediate UI updates
Combobox
Searchable dropdown with single and multi-select support:
use *;
// Create combobox state
let combobox_state = cx.new;
// Single select
new
.items
.placeholder
.on_select
// Multi-select
new
.items
.placeholder
.multi_select
.on_select
// With custom display
new
.items
.display_fn
.search_fn
Features:
- โ Single and multi-select modes
- โ Real-time search/filter with immediate updates
- โ Keyboard navigation (arrow keys, Enter, Escape)
- โ Custom display and search functions
- โ Clear selection button
- โ Badge display for multi-select
- โ Popover-based dropdown
- โ Empty state handling
- โ Disabled state support
Editor
A high-performance multi-line code editor with syntax highlighting, perfect for SQL queries and code editing:
// Create editor state
let editor_state = cx.new;
// Render editor
new
.language
.min_lines
.show_line_numbers
// Get content
let content = editor.get_content;
Features:
- โ Real-time syntax highlighting using syntect
- โ Full keyboard navigation (arrows, Home, End, Page Up/Down)
- โ Mouse selection support with drag and click
- โ Copy/paste/cut clipboard operations
- โ Line numbers with proper gutter
- โ Vertical scrolling for large files
- โ Language support (SQL, PlainText - extensible)
- โ EntityInputHandler for OS-level text input
Keyboard Shortcuts:
Ctrl+A/Cmd+A- Select allCtrl+C/Cmd+C- CopyCtrl+X/Cmd+X- CutCtrl+V/Cmd+V- Paste- Arrow keys - Navigate cursor
Shift + Arrow- Extend selectionHome/End- Jump to line start/endCtrl+Home/Cmd+Up- Jump to document startCtrl+End/Cmd+Down- Jump to document endPage Up/Page Down- Scroll by page
Example:
Progress & Loading Indicators
Display progress for long-running operations with progress bars and spinners.
ProgressBar
Linear progress indicators with determinate and indeterminate modes:
use *;
// Determinate progress (0.0 to 1.0)
new // 75% complete
// With label and percentage
new
.label
.show_percentage
// Different variants
new
.variant
.label
new
.variant
.label
new
.variant
.label
// Different sizes
new.size // Thin (4px)
new.size // Default (8px)
new.size // Large (12px)
// Indeterminate (loading animation)
indeterminate
.label
indeterminate
.variant
.label
CircularProgress / Spinner
Circular progress indicators and loading spinners:
// Determinate circular progress
new // 75% complete
// Indeterminate spinner
indeterminate
// With variants
indeterminate
.variant
.size
indeterminate
.variant
.size
indeterminate
.variant
.size
Features:
- โ Determinate and indeterminate modes
- โ Multiple variants (Default, Success, Warning, Destructive)
- โ Configurable sizes
- โ Optional labels and percentage display
- โ Smooth animations for indeterminate state
- โ Consistent with shadcn/ui design language
Use Cases:
- File uploads/downloads
- Data synchronization
- Processing operations
- Loading states
- Installation progress
Data Display
Table
let columns = vec!;
new
.columns
.data
.sortable
.on_row_click
DataTable
High-performance table for large datasets:
let columns = vec!;
new
.sortable
.on_row_select
Badge
new
new.variant
new.variant
Card
new
.header
.content
.footer
Navigation
Sidebar
let items = vec!;
new
.items
.selected_id
.variant
.position
.expanded_width
.collapsed_width
.on_select
Tabs
let tabs = vec!;
let panels = vec!;
new
.tabs
.panels
.selected_index
.on_change
Breadcrumbs
let items = vec!;
new
.items
.on_click
Tree
let nodes = vec!;
new
.nodes
.selected_id
.expanded_ids
.on_select
Menu System
A comprehensive menu system for desktop applications with MenuBar, Menu, MenuItem, and ContextMenu components:
// MenuBar - Top-level horizontal menu bar
let file_menu = vec!;
new
// MenuItem types
new // Action item
checkbox // Checkbox
new.with_children // Submenu
separator // Visual divider
// Standalone Menu
new
// ContextMenu - Right-click context menu
new
.on_close
Features:
- โ MenuBar for application-level menus
- โ Nested submenus
- โ Checkbox and radio items
- โ Keyboard shortcuts display
- โ Icons and separators
- โ Disabled states
- โ Context menus for right-click interactions
Toolbar
Action bars with icon buttons, groups, and toggle states for desktop applications:
// Create toolbar with groups
let formatting_group = new
.button
.button
.separator
.button;
new
.size
.group
.group
// Button variants
Default // Regular button
Toggle // Toggle button (pressed/unpressed)
Dropdown // Shows dropdown indicator
// Sizes
Sm // 32px buttons
Md // 36px buttons (default)
Lg // 40px buttons
// Toolbar items
Button // Button
Separator // Visual separator
Spacer // Flexible space (push to right)
Features:
- โ Icon buttons with tooltips
- โ Toggle states for formatting tools
- โ Button groups with separators
- โ Flexible spacers for layout control
- โ Multiple sizes
- โ Disabled states
- โ Dropdown button indicators
Desktop-Specific Components
StatusBar
Bottom application status bar with three sections (left, center, right) for displaying app state and contextual information:
use *;
// Create status bar with sections (capturing entity for callbacks)
let entity = cx.entity.clone;
cx.new
// Status item types
text // Text only
icon // Icon only
icon_text // Icon with text
badge // Badge only
icon_badge // Icon with badge
// Item customization
text
.on_click
.tooltip
.disabled
.badge_variant
Features:
- โ Three sections: left, center, right
- โ Icons, text, and badges
- โ Click handlers for interactive items
- โ Tooltips
- โ Disabled states
- โ Badge variants (Default, Warning, Destructive)
- โ Consistent 28px height
KeyboardShortcuts
Display and organize keyboard shortcuts by category with platform-specific key formatting:
use *;
cx.new
// Custom category
let category = new;
new
.add_category
Features:
- โ Organized by category
- โ Platform-specific key display (โ on macOS, Ctrl on Windows/Linux)
- โ Automatic key formatting (cmd-n โ โN)
- โ Clean, readable layout
- โ Monospace font for key bindings
- โ Hover effects
- โ Optional icons per shortcut
Overlays
Command Palette
A searchable command palette (Cmd+K / Ctrl+K style) for quick access to application commands:
// Create commands
let commands = vec!;
// Show command palette
if self.show_palette
Features:
- โ Fuzzy search with relevance scoring
- โ Command categories
- โ Icons and keyboard shortcuts display
- โ Full keyboard navigation (โโ arrows, Enter, Escape)
- โ Recent commands tracking
- โ Modal overlay with backdrop
Overlays (continued)
Dialog
// Show dialog conditionally
div
.when
Popover
new
.trigger
.content
.position
.alignment
Toast Notifications
// In your app struct
toast_manager: ,
// Initialize
// Show toast
// Render toast manager
Animation System
adabraka-ui includes a professional animation system with smooth easing functions and spring physics:
use *;
// Fade animations with cubic easing
div.with_animation
// Scale animations with back easing (subtle overshoot)
div.with_animation
// Smooth scale without overshoot
div.with_animation
// Slide animations with smooth cubic easing
div.with_animation
// Spring-based slide (natural feeling)
div.with_animation
// Continuous animations
// Smooth pulse with helper function
div.with_animation
// Opacity pulse
div.with_animation
// Shake with natural decay
div.with_animation
Animation Features:
- โ Professional cubic-bezier easing functions (quad, cubic, quart, expo)
- โ Spring physics for natural motion
- โ Back easing with subtle overshoot for emphasis
- โ Helper functions for pulse, shake, and bounce patterns
- โ Multiple timing presets (ultra-fast to extra-slow)
- โ Smooth, polished animations that feel professional
Available Easing Functions:
ease_out_cubic- Most natural for UI (default)ease_in_out_cubic- Smooth acceleration and decelerationease_out_quad- Gentle decelerationease_out_quart- Very smooth decelerationease_out_expo- Dramatic decelerationease_out_back- Slight overshoot for emphasisspring- Natural bouncy effectsmooth_spring- Subtle spring (recommended for UI)
Animation Presets:
- Fade:
fade_in_quick(),fade_in_normal(),fade_in_slow() - Scale:
scale_up(),scale_up_smooth(),scale_down() - Slide:
slide_in_left/right/top/bottom(),spring_slide_left/right() - Pulse:
pulse(),pulse_fast(),pulse_slow() - Interactive:
shake(),shake_strong(),bounce_in(),spring()
Scrolling
Scrollable containers automatically include padding to ensure content at the bottom is fully visible.
use *;
// Default scrolling with 24px padding (recommended)
div
.size_full
.child
// Custom padding amount
scrollable_vertical_with_padding
// No padding (use carefully - items may be cut off at the bottom)
new
.no_padding
// Both directions
scrollable_both
scrollable_both_with_padding
Features:
- โ Default 24px padding prevents content from being cut off at the bottom
- โ Customizable padding for different use cases
- โ Can disable padding when needed
- โ Smooth, macOS-style scrollbars that auto-hide
- โ Support for vertical, horizontal, or both directions
Icon System
adabraka-ui provides flexible icon support with both named icons and custom icon paths. Note: Icon assets are not bundled with the library to keep the bundle size small. You need to provide your own icon assets.
Setting Up Icon Assets
To use icons in your application, you need to:
- Download icon assets (we recommend Lucide Icons or Heroicons)
- Configure the icon base path in your application initialization
- Set up GPUI's AssetSource to load the icons
use *;
use *;
use PathBuf;
// Define your asset source
Using Icons
Once configured, you can use icons in two ways:
Named Icons
Named icons are automatically resolved using the configured base path:
use IconSource;
// Named icons (resolved to: assets/icons/{name}.svg)
Named
Named
Named
// Use in components
new
.prefix
new
.with_icon
new
.size
.color
Custom Icon Paths
For custom or one-off icons, use direct file paths:
// Direct file path
FilePath
// Absolute path
FilePath
// The library automatically detects paths (contains '/' or ends with '.svg')
new // Treated as file path
new // Treated as named icon
Icon Requirements
Your icon SVG files should:
- Use
stroke="currentColor"to inherit color from the component - Have a consistent viewBox (typically
0 0 24 24) - Be optimized for performance
Example icon SVG:
<!-- icon paths -->
Recommended Icon Sets
- Lucide Icons - Beautiful, consistent icons (3,000+)
- Heroicons - Hand-crafted by Tailwind CSS team
- Feather Icons - Simply beautiful open source icons
- Phosphor Icons - Flexible icon family
Icon Bundle Size
By not bundling icons, adabraka-ui keeps its package size small (saves ~3,274 icon files). This allows you to:
- โ Include only the icons you actually use
- โ Choose your preferred icon set
- โ Update icons independently from the library
- โ Keep your application bundle optimized
Icon Customization (New in v0.1.2)
The Icon component now supports advanced styling and transformations:
Named Icon Sizes
Use semantic size names instead of pixel values:
use *;
new
.size // 12px
.size // 14px
.size // 16px (default)
.size // 24px
.size // Custom size
// Backward compatible - Pixels still work:
new.size // Auto-converts to Custom
Full GPUI Styling Support
Icons now implement the Styled trait, allowing all GPUI styling methods:
new
.size
.p_2 // Padding
.bg // Background color
.rounded_md // Rounded corners
.border_1 // Border
.border_color
Icon Rotation
Perfect for loading spinners, directional arrows, and animated icons:
use Radians;
// Rotate icon 90 degrees
new
.rotate
// Animated loading spinner
new
.rotate // Animate with state
Clickable Icons
Icons support built-in click handlers:
new
.clickable
.on_click
.size
Advanced Features
Resizable Panels
use *;
h_resizable
.child
.child
Form Validation
// Input with validation
let input_state = cx.new;
new
.placeholder
.on_blur
Drag and Drop
use *;
new
.child
.on_drag_start
new
.child
.on_drop
Examples
The library includes 50+ example applications demonstrating all components and features.
Featured Examples
# Comprehensive demo with all components
# Full IDE-style application
# File explorer with tree navigation
Component Demos
# Input & Forms
# Navigation
# Display
# Overlays
# Advanced
# Layout
# Icons & Assets
# Trees & Lists
To see all available examples:
Architecture
adabraka-ui is built on top of GPUI with these key principles:
- Entity-based state management for complex interactive components
- Immutable configuration using the builder pattern
- Type-safe APIs with comprehensive Rust types
- Performance-first with efficient rendering and minimal allocations
- Accessible with proper ARIA labels and keyboard navigation
Contributing
We welcome contributions from the community! Whether you're fixing bugs, adding features, or improving documentation, your help is appreciated.
Quick Start
- Read the Contributing Guidelines for detailed information
- Check existing issues and pull requests
- Fork the repository and create your feature branch
- Follow our coding guidelines and add tests
- Submit a pull request using our template
Reporting Issues
- Bug Reports: Use our bug report template
- Feature Requests: Use our feature request template
- Questions: Start a discussion
Development Guidelines
- Follow Rust best practices and idioms
- Use
cargo fmtfor formatting andcargo clippyfor linting - Write tests for new functionality
- Update documentation and examples
- Ensure all examples compile and run
For detailed guidelines, see CONTRIBUTING.md.
Acknowledgments
This project wouldn't be possible without the amazing work of:
- Zed Industries - For creating GPUI, the powerful GPU-accelerated UI framework that powers the Zed editor and makes adabraka-ui possible
- Lucide Icons - For providing the beautiful, consistent icon set used throughout the component library
- shadcn/ui - For the design inspiration and component patterns
Special thanks to the Zed team for open-sourcing GPUI and making it available for building desktop applications in Rust.
License
MIT License - see LICENSE file for details.
Built with โค๏ธ using GPUI and inspired by shadcn/ui