detaxine-ui
A Leptos + Tailwind CSS component library compiled to WebAssembly. Build modern, reactive web UIs with a full set of accessible, themeable components — no JavaScript framework required.
Live Demo
https://elonaire.github.io/detaxine-ui/
Installation
New Project
Install the CLI and let it scaffold everything for you:
dtx init creates a ready-to-run Leptos + Trunk project with detaxine-ui
as a dependency, input.css configured, and a Tailwind binary in place.
Import re-exported crates directly from detaxine_ui in your code:
// Instead of: use leptos::prelude::*;
use *;
// Instead of: use leptos_router::components::Router;
use Router;
// Instead of: use chrono::{Local, DateTime};
use ;
Consumers who already depend on these crates directly can still do so — Cargo's deduplication ensures only one copy is compiled as long as the versions are compatible.
Existing Project
Coming soon
Prerequisites
Quick Start
use ;
Components
Actions
| Component | Description |
|---|---|
BasicButton |
Button with optional icon, disabled state, and custom styles |
ButtonGroup |
Inline group of buttons with shared styles and rounded ends |
Carousel |
Sliding panel carousel with navigation and indicators |
Data Display
| Component | Description |
|---|---|
Badge |
Overlaid count or status indicator anchored to a child element |
Chip |
Removable tag with color temperature variants |
LabelTag |
Static color-coded label |
Timeline |
Vertical list of timestamped steps with icon, image, or circle heads |
DataTable |
Sortable, paginated table with optional row-level edit and delete actions |
Pagination |
Page navigation control emitting page-change callbacks |
Feedback
| Component | Description |
|---|---|
BasicModal |
Portal-based dialog with contextual icons and configurable footer actions |
Popover |
Viewport-aware floating panel with auto-alignment and route-change close |
ProgressBar |
Horizontal progress bar with determinate and indeterminate modes |
CircularProgress |
Circular progress ring with optional percentage label |
Spinner |
Animated SVG loading spinner with optional full-screen backdrop |
Forms
| Component | Description |
|---|---|
InputField |
All standard HTML input types via the InputFieldType enum |
CustomFileInput |
Styled file picker with chip-based selected file list |
Textarea |
Multi-line text input |
SelectInput |
Native select dropdown |
CustomSelectInput |
Searchable, chip-based single or multi-select |
CheckboxInputField |
Single checkbox input |
CheckboxGroup |
Grouped checkboxes with shared HashSet selection state |
RadioInputField |
Single radio input |
RadioInputGroup |
Grouped radio inputs with shared selection state |
ToggleSwitch |
Boolean toggle built on a hidden checkbox |
DatePicker |
Calendar date picker with min/max and disabled date support |
RichTextEditor |
Contenteditable rich text editor with formatting toolbar |
ReactiveForm |
Form wrapper that auto-submits whenever all fields are valid |
Navigation
| Component | Description |
|---|---|
Breadcrumbs |
Route-derived breadcrumb trail with custom label support |
Panel |
Collapsible panel with a clickable title bar |
Collapse |
Accordion group of panels with optional single-open enforcement |
Tabs |
Scrollable tabbed view with slot-based content |
Stepper |
Multi-step form wizard with per-step validation and linear mode |
Theming
detaxine-ui uses CSS custom properties for its color system. Override them in your own CSS to match your brand:
@}
All components reference these variables via Tailwind utilities (bg-primary, text-danger, etc.) so a single override updates the entire library.
Style Extension
Every component exposes one or more style extension props so you can apply any Tailwind utility without forking the library:
| Prop | Applies to |
|---|---|
style_ext |
The root or primary element |
ext_input_styles |
The input or select element |
ext_wrapper_styles |
The outer wrapper div |
ext_label_styles |
The label element |
container_style_ext |
The modal panel |
Example — making a full-width danger button:
use ;
Form Handling
ReactiveForm wraps your fields and fires a native submit event automatically whenever checkValidity() returns true, on every input or change event. Read form data with the standard FormData API:
use ;
use HashSet;
Modal Setup
BasicModal portals its content into a #modal-root element. Add this to your index.html before the closing </body> tag or to your root component:
Router Requirement ⚠️
Popover, DataTable (which uses Popover internally), and Breadcrumbs all call use_location() from leptos_router. Wrap your app in a <Router> or else these components will panic at runtime:
use Router;
Rich Text Editor — Image Upload
The RichTextEditor defaults to base64 data URLs for image insertion. Supply a custom on_image_insert callback to upload to your own storage:
use ;
use Pin;
Contributing
Contributions are welcome. Please open an issue before submitting a pull request for significant changes.
- Fork the repository
- Create a feature branch:
git checkout -b feat/my-component - Commit your changes:
git commit -m "feat: add MyComponent" - Push and open a pull request
License
This project is licensed under both the MIT license and the Apache License (Version 2.0). MIT — see LICENSE-MIT for details. APACHE — see LICENSE-APACHE for details.