radix_leptos/lib.rs
1//! # Radix-Leptos
2//!
3//! A comprehensive UI component library for Leptos, built with accessibility and design system principles.
4//! This crate provides a complete set of accessible, customizable components inspired by Radix UI.
5//!
6//! ## Features
7//!
8//! - **Accessible by default**: All components follow WAI-ARIA guidelines
9//! - **Type-safe**: Built with Rust's type system for compile-time safety
10//! - **Customizable**: Flexible theming and styling options
11//! - **Composable**: Components can be combined and extended
12//! - **SSR/Hydration ready**: Works with Leptos server-side rendering
13//!
14//! ## Quick Start
15//!
16//! ```rust
17//! use radix_leptos::*;
18//! use leptos::prelude::*;
19//!
20//! #[component]
21//! fn App() -> impl IntoView {
22//! view! {
23//! <div>
24//! <Button variant=ButtonVariant::Default>
25//! "Hello, Radix-Leptos!"
26//! </Button>
27//!
28//! <Separator />
29//!
30//! <Label for_id="input".to_string()>
31//! "Email"
32//! </Label>
33//! <input id="input" type="email" />
34//! </div>
35//! }
36//! }
37//! ```
38//!
39//! ## Component Categories
40//!
41//! ### Primitives
42//! Basic building blocks for UI components:
43//! - `Button` - Accessible button with multiple variants
44//! - `Label` - Form field labels with proper associations
45//! - `Separator` - Visual separation between content
46//!
47//! ### Layout
48//! Components for structuring content:
49//! - Coming soon...
50//!
51//! ### Navigation
52//! Components for navigation and menus:
53//! - Coming soon...
54//!
55//! ### Forms
56//! Form-related components:
57//! - Coming soon...
58//!
59//! ### Feedback
60//! Components for user feedback:
61//! - Coming soon...
62//!
63//! ## Styling
64//!
65//! Radix-Leptos components are unstyled by default and provide CSS classes for styling.
66//! You can use any CSS framework or custom styles with the provided class names.
67//!
68//! ## Accessibility
69//!
70//! All components are built with accessibility in mind:
71//! - Proper ARIA attributes
72//! - Keyboard navigation support
73//! - Screen reader compatibility
74//! - Focus management
75//!
76//! ## Contributing
77//!
78//! We welcome contributions! Please see our contributing guidelines for more information.
79
80// Re-export all components from primitives
81pub use radix_leptos_primitives::*;
82
83// Re-export core utilities for advanced usage (excluding portal to avoid conflicts)
84pub use radix_leptos_core::{primitives::visually_hidden, utils};
85
86// Re-export commonly used Leptos items
87
88#[cfg(test)]
89mod tests {
90
91 #[test]
92 fn test_component_imports() {
93 // This test ensures all components can be imported
94 // This is a basic smoke test to ensure the library compiles
95 }
96}