adui-dioxus is a UI component library for Dioxus that provides rich components and styles, helping developers quickly build cross-platform web and mobile applications.
This is an experimental project that ports Ant Design 6.0.0 to Dioxus using Vibe Coding. It extracts components from the Ant Design UI library (https://github.com/ant-design/ant-design) and adapts them for the Rust/Dioxus ecosystem. The library inherits Ant Design's design philosophy and component styles while leveraging Dioxus's performance and flexibility to provide developers with an efficient and convenient development experience.
This is an experimental port of Ant Design 6.0.0 to Dioxus. The library is built on Dioxus 0.7+ and includes a comprehensive set of components:
- Theme System: Ant Design 6.x style tokens and theme context (light/dark presets, CSS variable export)
- Config Provider: Global configuration and theme management
- Layout: Page layout container with Header, Footer, Sider, and Content
- Grid: 24-column grid system for responsive layouts
- Flex: Flexible box layout component with gap presets and wrap support
- Space: Spacing component for arranging elements
- Divider: Divider line for separating content
- Splitter: Resizable split panes with draggable handles
- Masonry: Responsive masonry layout for cards and items
- Button: Supports type/size/shape/danger/ghost/loading/block/icon/href
- FloatButton: Floating button with round/square, primary/default, danger, tooltip, and configurable position
- Icon: Built-in common icon set (plus/minus/check/close/info/question/search/arrow/loading) with rotation, size, and color support
- Typography: Title/Text/Paragraph with tone (default/secondary/success/warning/danger/disabled), strong/italic/underline/delete/code/mark, ellipsis (single/multi-line + expand), copyable, editable, and disabled state semantics
- Affix: Sticky positioning component
- Breadcrumb: Breadcrumb navigation
- Dropdown: Dropdown menu component
- Menu: Navigation menu with horizontal and vertical modes
- Pagination: Pagination component
- Steps: Step indicator for processes
- Tabs: Tab navigation component
- Anchor: Anchor navigation for long pages
- Form:
Form/FormItem/use_form_item_controlwith required/min/max/pattern/custom rule support, layout control, required mark, and context hooks - Input: Text input with various variants (Password, Search, OTP)
- InputNumber: Number input with stepper controls
- TextArea: Multi-line text input
- Select: Dropdown selector with search and multiple selection
- TreeSelect: Tree-structured selector
- Cascader: Cascading selection component
- AutoComplete: Auto-complete input component
- Checkbox: Checkbox and checkbox group
- Radio: Radio button and radio group
- Switch: Toggle switch component
- Slider: Range slider component
- Rate: Rating component
- Upload: Click to select/drag and drop upload, lists (text/picture/picture-card),
before_upload, XHR upload progress/abort, controlled/uncontrolled lists - DatePicker: Date picker with range selection
- TimePicker: Time picker component
- Calendar: Calendar component
- ColorPicker: Color picker component
- Mentions: Mentions input component
- Segmented: Segmented control component
- Table: Advanced data table with sorting, filtering, pagination, and selection
- Tag: Tag component with various colors
- Badge: Badge and ribbon components
- Card: Card container component
- Carousel: Carousel/slider component
- Collapse: Collapsible panel component
- Timeline: Timeline component
- Tree: Tree component with directory tree support
- Transfer: Transfer list component
- Descriptions: Description list component
- Empty: Empty state component
- List: List component
- Statistic: Statistic display component
- QRCode: QR code generator component
- Avatar: Avatar component with group support
- Image: Image component with preview
- Skeleton: Skeleton loading component
- Progress: Progress bar component
- Result: Result page component
- Watermark: Watermark component
- Alert: Alert message component
- Message: Global message notification
- Notification: Notification component
- Modal: Modal dialog component
- Drawer: Drawer component
- Popconfirm: Popconfirm component
- Popover: Popover component
- Tooltip: Tooltip component
- Spin: Loading spinner component
- Progress: Progress indicator component
- Skeleton: Skeleton loading placeholder
- App: App-level context provider for message, modal, and notification
- Tour: Tour guide component
- BackTop: Back to top button
Install adui-dioxus using Cargo:
cargo add adui-dioxusOr manually add the dependency to your Cargo.toml file:
[dependencies]
adui-dioxus = "0.1.2"Comprehensive documentation is available in the docs/ directory:
- English Documentation Index - Complete component documentation in English
- 中文文档索引 - 完整的中文组件文档
Each component has detailed documentation including:
- API reference with all props, events, and methods
- Usage examples
- Use cases
- Differences from Ant Design 6.0.0
Before you can start developing, you need to set up your development environment. This section will guide you through installing the necessary tools.
First, ensure you have the Rust toolchain installed. If you haven't installed Rust yet, visit rustup.rs and follow the installation instructions for your platform.
Verify your Rust installation:
rustc --version
cargo --versionDioxus applications compile to WebAssembly (WASM) for web deployment. You need to add the wasm32-unknown-unknown target to your Rust toolchain.
Install the WASM target:
rustup target add wasm32-unknown-unknownThis command downloads and installs the necessary toolchain components for compiling Rust code to WebAssembly.
Verify the installation:
rustup target list --installed | grep wasm32-unknown-unknownIf the command outputs wasm32-unknown-unknown, the target is successfully installed.
The Dioxus CLI (dx) provides commands for building, serving, and bundling Dioxus applications.
Recommended (Faster): Install using cargo-binstall for faster installation from pre-built binaries:
First, install cargo-binstall:
cargo install cargo-binstallThen install Dioxus CLI:
cargo binstall dioxus-cliAlternative: Install using Cargo (slower, compiles from source):
cargo install dioxus-cliNote: Using cargo-binstall is recommended as it installs pre-built binaries and is much faster than compiling from source. The traditional cargo install method may take several minutes as it compiles the CLI from source. Make sure you have a stable internet connection.
After installation, verify that the CLI is available:
dx --versionYou should see the Dioxus CLI version number. If the command is not found, ensure that Cargo's binary directory is in your system's PATH:
- Linux/macOS:
~/.cargo/bin - Windows:
%USERPROFILE%\.cargo\bin
Issue: dx command not found after installation
- Solution: Add
~/.cargo/bin(or%USERPROFILE%\.cargo\binon Windows) to your PATH environment variable, then restart your terminal.
Issue: WASM target installation fails
- Solution: Ensure you have a stable internet connection and try running
rustup updatefirst, then retry the target installation.
Issue: Dioxus CLI installation takes too long or fails
- Solution: Use
cargo-binstallfor faster installation from pre-built binaries. First installcargo-binstallwithcargo install cargo-binstall, then install Dioxus CLI withcargo binstall dioxus-cli. Alternatively, ensure you have sufficient disk space and a stable internet connection, and try installing with--lockedflag:cargo install dioxus-cli --locked
cargo fmt && cargo clippy --all-targets --all-features && cargo testRun examples in the browser using Dioxus CLI:
dx serve --example <example_name>Available examples include:
button_demo- Button component with theme switchingfloat_button_demo- Floating button examplesicon_demo- Icon showcasetypography_demo- Typography componentslayout_demo- Layout components (Layout, Divider, Flex, Space, Grid, Masonry, Splitter)flex_space_demo- Flex and Space componentsgrid_demo- Grid system examplesform_demo- Form validation and controlsupload_demo- File upload examplestable_demo- Data table examplesmenu_demo- Navigation menutabs_demo- Tab navigationmodal_demo- Modal dialogsdrawer_demo- Drawer componentselect_demo- Select componentdate_picker_demo- Date pickerinput_demo- Input variantscard_demo- Card componentbadge_demo- Badge componentavatar_demo- Avatar componentalert_demo- Alert componentmessage_demo- Message notificationsnotification_demo- Notification componenttooltip_demo- Tooltip componentpopover_demo- Popover componentprogress_demo- Progress indicatorsspin_demo- Loading spinnerskeleton_demo- Skeleton loadingsteps_demo- Steps componenttimeline_demo- Timeline componenttree_demo- Tree componenttree_select_demo- Tree selecttransfer_demo- Transfer listpagination_demo- Paginationbreadcrumb_demo- Breadcrumb navigationanchor_demo- Anchor navigationaffix_demo- Affix componentdropdown_demo- Dropdown menucheckbox_demo- Checkbox componentradio_demo- Radio componentswitch_demo- Switch componentslider_demo- Slider componentrate_demo- Rate componentinput_number_demo- Input numbercascader_demo- Cascader componentauto_complete_demo- Auto completecolor_picker_demo- Color pickermentions_demo- Mentions inputsegmented_demo- Segmented controldescriptions_demo- Descriptions componentempty_demo- Empty statelist_demo- List componentstatistic_demo- Statistic displayqrcode_demo- QR code generatorimage_demo- Image componentcarousel_demo- Carousel componentcollapse_demo- Collapse componenttag_demo- Tag componentresult_demo- Result pagewatermark_demo- Watermark componenttour_demo- Tour guideconfig_provider_demo- Config providerapp_demo- App contextdashboard_demo- Dashboard examplelanding_page_demo- Landing page examplelogin_demo- Login page exampleregister_demo- Registration page examplesettings_demo- Settings page example
We welcome contributions! Please read our Repository Guidelines for development workflows, coding standards, and contribution requirements.
Key points:
- Follow Rust naming conventions and code style
- Add tests for new components
- Update documentation (both English and Chinese)
- Create examples for new components
- Ensure all checks pass:
cargo fmt && cargo clippy --all-targets --all-features && cargo test
This project is licensed under the MIT License. See the LICENSE file for details.
This is an experimental project. Some features may differ from the original Ant Design implementation, and the API may evolve as the project matures. Please refer to the component documentation for specific differences and limitations.