An open API service indexing awesome lists of open source software.

https://github.com/cloud-shuttle/radix-leptos

High-performance, accessible UI components for Leptos - Rust port of Radix UI primitives with 57+ components, 1200+ tests, and 538KB optimized bundle
https://github.com/cloud-shuttle/radix-leptos

Last synced: 5 months ago
JSON representation

High-performance, accessible UI components for Leptos - Rust port of Radix UI primitives with 57+ components, 1200+ tests, and 538KB optimized bundle

Awesome Lists containing this project

README

          

# πŸš€ Radix-Leptos

**High-performance, accessible UI components for Leptos with 57+ components and 1200+ tests**

[![Crates.io](https://img.shields.io/crates/v/radix-leptos)](https://crates.io/crates/radix-leptos)
[![Documentation](https://img.shields.io/docsrs/radix-leptos)](https://docs.rs/radix-leptos)
[![License](https://img.shields.io/crates/l/radix-leptos)](LICENSE)
[![Rust](https://img.shields.io/badge/rust-1.89+-blue.svg)](https://www.rust-lang.org/)

A Rust port of [Radix UI](https://www.radix-ui.com/) primitives for [Leptos](https://leptos.dev/), providing accessible, unstyled UI components with exceptional performance.

## ✨ Features

- **πŸš€ High Performance**: 538KB optimized WASM bundle (down from 5.8MB!)
- **β™Ώ Accessibility First**: Built with ARIA compliance and keyboard navigation
- **🎨 Unstyled Components**: Clean, customizable components without opinionated styling
- **🌐 SSR & Hydration**: Full support for server-side rendering and hydration
- **πŸ§ͺ Comprehensive Testing**: 1,792+ passing tests with TDD infrastructure, property-based testing, and mutation testing
- **πŸ“± Responsive Design**: Mobile-first components with touch support
- **πŸ”§ Feature Flags**: `core`, `experimental`, and `full` feature sets for optimal bundle sizes
- **πŸ”’ Type Safety**: Full Rust type safety with excellent IDE support
- **⚑ Zero Runtime**: No JavaScript runtime overhead, pure WASM performance
- **πŸ§ͺ TDD Infrastructure**: World-class Test-Driven Development with 1,792+ passing tests
- **πŸ”¬ Property-Based Testing**: Edge case detection with `proptest`
- **🎯 Quality Gates**: Automated compliance checking and mutation testing

## πŸ—ΊοΈ Roadmap

**Radix-Leptos is on track to achieve complete parity with [Radix UI Primitives](https://www.radix-ui.com/primitives/docs/overview/introduction):**

### πŸ“Š **Current Progress: 95% Complete**
- βœ… **57 Components** implemented with TDD
- βœ… **Complete TDD Infrastructure** (100%)
- βœ… **1,865+ Passing Tests** across all crates
- πŸ”„ **3+ Components** planned for v1.0.0

### πŸš€ **Recent Releases**
- **v0.9.0 (January 2025)**: βœ… **COMPLETE** - **Architecture Refactoring & Critical Fixes Release**
- πŸ—οΈ **Complete Architecture Refactoring** (modular components)
- πŸ”§ **45 Critical Compilation Errors Fixed** β†’ 0 errors
- βœ… **1,865 Tests Passing (100% Success Rate)**
- πŸš€ **Feature Gating System** (core/experimental/full)
- πŸ“¦ **Full Backward Compatibility**

### πŸš€ **Upcoming Releases**
- **v0.3.0 (September 2025)**: βœ… **COMPLETE** - Core form components (Dialog, Form, Select, etc.)
- **v0.4.0 (September 2025)**: βœ… **COMPLETE** - Navigation and layout components
- **v0.5.0 (September 2025)**: βœ… **COMPLETE** - Advanced data visualization and specialized components
- **v0.6.0 (September 2025)**: βœ… **COMPLETE** - Enhanced components and advanced UI patterns
- **v1.0.0 (Q2 2026)**: Complete Radix UI parity

πŸ“‹ **[View Full Roadmap](ROADMAP_vs_RADIX_UI.md)** | πŸ“Š **[Component Progress](COMPONENT_PROGRESS.md)**

## πŸ“¦ Installation

```toml
[dependencies]
radix-leptos = "0.9.0"
leptos = "0.8.8" # βœ… Full compatibility with latest Leptos!

# For minimal bundle size (recommended for production)
radix-leptos = { version = "0.8.5", features = ["core"] }

# For all components
radix-leptos = { version = "0.8.5", features = ["full"] }

# For experimental components (use with caution)
radix-leptos = { version = "0.8.5", features = ["experimental"] }
```

## βœ… **Leptos 0.8.8 Compatibility**

**Radix-Leptos v0.8.5 is fully compatible with Leptos 0.8.8!**

| Radix-Leptos Version | Leptos Version | Status |
|---------------------|----------------|---------|
| 0.8.4 | 0.8.7 and earlier | βœ… Compatible |
| 0.8.4 | 0.8.8 | ❌ **Broken** (compilation errors) |
| **0.8.5** | **0.8.8** | βœ… **Compatible** |
| **0.8.5** | 0.8.7 and earlier | βœ… **Compatible** |

### **What's Fixed in v0.8.5**
- βœ… **4 Critical Compilation Errors** resolved
- βœ… **Signal Attribute System** updated for Leptos 0.8.8
- βœ… **Dark Mode Components** fully functional
- βœ… **Theme Provider Components** fully functional
- βœ… **Zero Breaking Changes** to public API
- βœ… **Zero Migration Required** for users

## πŸš€ Quick Start

```rust
use leptos::*;
use radix_leptos::*;

#[component]
pub fn App() -> impl IntoView {
view! {


Click me!


}
}
```

## πŸ—οΈ **Module Structure & Feature Flags**

Radix-Leptos is organized into a clean, modular architecture with feature flags for optimal bundle sizes:

### **πŸ“¦ Core Modules**

- **`components/`** - All UI components organized by functionality
- **`theming/`** - Theme system with prebuilt themes and customization
- **`utils/`** - Shared utilities (merge_classes, generate_id, etc.)

### **πŸ”§ Feature Flags**

| Feature | Description | Components Included |
|---------|-------------|-------------------|
| `core` | **Production-ready components** | Button, Checkbox, Dialog, Form, Input, Select, etc. |
| `experimental` | **Incomplete/experimental components** | Chart, DataTable, VirtualList, RichTextEditor, etc. |
| `full` | **All components** | `core` + `experimental` |

### **πŸ“ Component Organization**

```
components/
β”œβ”€β”€ Core Components (always available)
β”‚ β”œβ”€β”€ button.rs, checkbox.rs, dialog.rs
β”‚ β”œβ”€β”€ form.rs, input.rs, select.rs
β”‚ └── pagination/, form_validation/
β”œβ”€β”€ Experimental Components (feature-gated)
β”‚ β”œβ”€β”€ chart.rs, data_table.rs
β”‚ β”œβ”€β”€ virtual_list.rs, rich_text_editor.rs
β”‚ └── [Many more...]
└── mod.rs (with feature gating)
```

### **🎯 Usage Recommendations**

- **Production**: Use `features = ["core"]` for stable, tested components
- **Development**: Use `features = ["full"]` for access to all components
- **Experimental**: Use `features = ["experimental"]` to test incomplete components

## πŸ“ More Examples

### Basic Button Component
```rust
use radix_leptos::Button;

#[component]
pub fn MyButton() -> impl IntoView {
view! {

"Click me!"

}
}
```

### Advanced Pagination
```rust
use radix_leptos::pagination::*;

#[component]
pub fn MyPagination() -> impl IntoView {
let (current_page, set_current_page) = signal(1);

view! {










}
}
```

## πŸ“¦ Available Components

### Core Components (Available with `core` feature)
- **Pagination**: Page navigation with multiple variants and sizes
- **Navigation**: Basic navigation utilities and patterns
- **Core Utilities**: Essential traits and helper functions

### Full Components (Available with `full` feature)
- **Form Components**: Button, TextInput, Select, Checkbox, RadioGroup, Switch, Slider
- **Feedback Components**: Toast, Alert, Badge, Avatar, Progress
- **Media Components**: Image, Video, Audio, Carousel
- **Navigation Components**: DropdownMenu, NavigationMenu, Menubar, HoverCard, Popover, ScrollArea, Toggle, ToggleGroup, Toolbar
- **Data Visualization**: Chart, DataTable, VirtualList, SplitPane, LineChart, BarChart, PieChart, ScatterPlot
- **Advanced Components**: DragDrop, RichTextEditor, ColorPicker, ImageViewer, CodeEditor, Timeline, Gauge, CommandPalette
- **Enhanced Components**: Context Menu, Collapsible, Aspect Ratio, Calendar, Date Picker, File Upload, Search, Combobox, Avatar, Separator, Label, Toast

## πŸ§ͺ Testing & Examples

```bash
# Run comprehensive tests
pnpm run test:all

# Start development server
pnpm run start:dev

# Build production bundle
pnpm run build:prod
```

## πŸ“Š Performance Metrics

| Metric | Before | After | Improvement |
|--------|--------|-------|-------------|
| **Bundle Size** | 5.8MB | 538KB | **92.7% reduction** |
| **Load Time** | ~15s | ~130ms | **98.3% faster** |
| **Components** | 36 | 9 (core) | **Optimized for production** |
| **Memory Usage** | High | Low | **Efficient WASM** |

## πŸ†š Why Choose Radix-Leptos?

| Feature | Radix-Leptos | Traditional JS | Other Rust UI |
|---------|---------------|----------------|---------------|
| **Bundle Size** | 538KB | 2-5MB+ | 1-3MB+ |
| **Performance** | Native WASM | JavaScript | WASM + JS |
| **Type Safety** | Rust-level | TypeScript | Rust-level |
| **Accessibility** | Built-in ARIA | Varies | Varies |
| **Styling** | Unstyled | Often opinionated | Mixed |
| **SSR Support** | Full | Limited | Limited |
| **Memory Usage** | Low | High | Medium |

## πŸ§ͺ Testing

```bash
# Run all tests
pnpm run test:all

# Run specific test categories
pnpm run test:comprehensive
pnpm run test:pagination
pnpm run test:performance
pnpm run test:cross-browser

# Manual testing
open http://localhost:8081/manual-test-suite.html
```

## πŸ—οΈ Architecture

```
radix-leptos/
β”œβ”€β”€ crates/ # Core library crates
β”‚ β”œβ”€β”€ radix-leptos-core/ # Core utilities and traits
β”‚ β”œβ”€β”€ radix-leptos-primitives/ # UI component primitives
β”‚ └── radix-leptos/ # Main library facade
β”œβ”€β”€ examples/ # Example applications
β”œβ”€β”€ docs/ # Documentation
β”‚ β”œβ”€β”€ remediation/ # Remediation documentation
β”‚ β”œβ”€β”€ releases/ # Release notes and changelogs
β”‚ β”œβ”€β”€ developer-guide/ # Development guidelines
β”‚ └── user-guide/ # User documentation
β”œβ”€β”€ tests/ # Comprehensive test suite
β”‚ β”œβ”€β”€ unit/ # Unit tests
β”‚ β”œβ”€β”€ integration/ # Integration tests
β”‚ β”œβ”€β”€ e2e/ # End-to-end tests
β”‚ └── performance/ # Performance tests
└── scripts/ # Development scripts
β”œβ”€β”€ remediation/ # Error fixing and remediation
β”œβ”€β”€ maintenance/ # Build and deployment
└── testing/ # Test automation
```

## πŸ› οΈ Development Scripts

The project includes organized automation scripts for development and maintenance:

### Remediation Scripts (`scripts/remediation/`)
- **Error fixing scripts** for systematic code remediation
- **Phase execution scripts** for organized error resolution
- **Complete remediation automation** for large-scale fixes

### Maintenance Scripts (`scripts/maintenance/`)
- **Build automation** for development and production
- **Deployment scripts** for automated releases
- **Test execution** for comprehensive validation

### Usage
```bash
# Run complete remediation
./scripts/remediation/run_full_remediation.sh

# Build for production
./scripts/maintenance/build-production.sh

# Run all tests
./scripts/maintenance/run-tests.sh
```

## πŸ”§ Feature Flags

### Core Features (`core`)
- Pagination components
- Basic navigation
- Essential utilities

### Full Features (`full`)
- All components
- Advanced interactions
- Extended functionality

## πŸ“š Documentation

- [πŸ“š Complete Documentation](docs/) - All guides, APIs, and resources
- [πŸš€ Development Roadmap](docs/ROADMAP.md) - Future features and timeline
- [πŸ§ͺ Testing Guide](docs/guides/TESTING_GUIDE.md) - How to test components
- [πŸ“Š Performance Guide](docs/guides/OPTIMIZATION_RESULTS.md) - Bundle optimization details
- [πŸš€ Production Deployment](docs/guides/PRODUCTION_DEPLOYMENT_GUIDE.md) - Deployment guide
- [API Documentation](https://docs.rs/radix-leptos) - Official crates.io docs

## 🀝 Contributing

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.

## πŸ“„ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## πŸ™ Acknowledgments

- [Radix UI](https://www.radix-ui.com/) for the original design system
- [Leptos](https://leptos.dev/) for the amazing Rust web framework
- The Rust community for continuous support

## πŸš€ Roadmap

- [x] Core component library
- [x] Performance optimization
- [x] Comprehensive testing
- [x] Production deployment
- [ ] Additional components
- [ ] Theme system
- [ ] Animation library
- [ ] Component playground

**πŸ“‹ [View Full Development Roadmap](ROADMAP.md)**

## 🌟 Community & Support

- **πŸ“– Documentation**: [https://docs.rs/radix-leptos](https://docs.rs/radix-leptos)
- **πŸ› Issues**: [GitHub Issues](https://github.com/cloud-shuttle/radix-leptos/issues)
- **πŸ’¬ Discussions**: [GitHub Discussions](https://github.com/cloud-shuttle/radix-leptos/discussions)
- **πŸ“š Examples**: [Examples Directory](./examples/)
- **πŸ§ͺ Testing**: [Test Suite](./tests/)
- **πŸ“Š Performance**: [Performance Analysis](./docs/PERFORMANCE.md)

## πŸ† Production Ready

Radix-Leptos is **production-ready** with:
- βœ… **Comprehensive Testing**: 10+ Playwright tests
- βœ… **Performance Optimized**: 538KB bundle size
- βœ… **Accessibility Compliant**: WCAG guidelines
- βœ… **Cross-Browser**: Chrome, Firefox, Safari, Edge
- βœ… **Mobile Support**: Touch and responsive design
- βœ… **Type Safe**: Full Rust type safety

---

**Ready for production use with 538KB optimized bundle! πŸŽ‰**

**Latest Version: v0.8.5** - βœ… **Leptos 0.8.8 Compatibility Release** with 1,792+ passing tests!