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.
Dioxus Element Plug
Element UI theme-chalk components for Dioxus applications with built-in SCSS support.
This crate provides a set of UI components styled with the popular Element UI theme-chalk CSS framework, designed specifically for use with the Dioxus framework. Hosted on GitHub: pauljohn21/dioxus-element-plug
Features
- ๐จ Complete Element UI styling - All components use authentic theme-chalk CSS
- ๐ฆ Rust-native components - Type-safe components built for Dioxus 0.7
- ๐ฆ Ready to use - Components work out of the box with proper styling
- ๐ฏ Consistent API - Intuitive props and events matching Dioxus patterns
- ๐ฑ Responsive design - Mobile-friendly components with flexible grid system
- ๐ง Active Development - Regular updates and community contributions
- ๐จ SCSS Support - Built-in SCSS compilation and theme customization
Quick Start
1. Add to your Cargo.toml
For local development:
[]
= { = "../dioxus-element-plug" }
For production use (once published to crates.io):
[]
= "0.1.0"
Or use directly from GitHub:
= { = "https://github.com/pauljohn21/dioxus-element-plug.git" }
2. Use Built-in SCSS Support
With Dioxus Element Plug, CSS compilation is built-in using manganis. No external tools needed!
use asset;
static STYLES: Asset = asset!;
ๆฅ็ examples/with-scss-asset/ ็คบไพไบ่งฃๅฎๆด็จๆณใ
ๆนๅผไบ๏ผไผ ็ปๅค้จ็ผ่ฏๆนๅผ (ๆจ่็จไบ็ฐๆ้กน็ฎ)
ไฝฟ็จไผ ็ป็ Sass ็ผ่ฏๅจ่ฟ่กๆๅปบ๏ผ
ๅ ณไบ Dioxus 0.7 ็ๆ ทๅผๆฏๆ่ฏดๆ๏ผ
- ๐ Dioxus 0.7 ๆฏๆๅ ็ฝฎ SCSS ็ผ่ฏ (้่ฟ manganis asset ๅฎ)
- ไผ ็ป็ๅค้จ Sass ็ผ่ฏๅจๆนๅผไป็ถๅฏ็จ
- ไธค็งๆนๅผ้ฝๆฏๆ๏ผๅผๅ่ ๅฏไปฅๆ นๆฎ้กน็ฎ้ๆฑ้ๆฉ
3. Add CSS to your HTML
Add this to your index.html:
4. Use the components
use *;
use *;
Available Components
Layout
Container- Main container wrapperHeader- Page headerAside- SidebarMain- Main content areaFooter- Page footerRow/Col- Grid system
Form Controls
Button- Various button styles and sizesInput- Text inputs with validationSearchInput- Search input with iconPasswordInput- Password input with toggle
Soon to come
- Forms (Checkbox, Radio, Select)
- Navigation (Menu, Tabs, Breadcrumb)
- Feedback (Alert, Message, Notification)
- Data Display (Table, Card, List)
Component Examples
Buttons
use *;
rsx!
Input
use *;
rsx!
Layout Grid
use *;
rsx!
Building CSS
The theme CSS needs to be compiled from SCSS:
Prerequisites
- Node.js 16+
- npm or yarn
Setup and Build
# Setup (installs sass compiler)
# Build CSS
# Watch for changes during development
# Full build (Rust + CSS)
Development
Project Structure
dioxus-theme-chalk/
โโโ src/ # Rust component library
โ โโโ components/ # UI components
โ โโโ theme.rs # Theme constants
โโโ build.rs # Build script
โโโ Cargo.toml # Rust dependencies
โโโ Makefile # Build automation
โโโ README.md # Documentation
โโโ example/ # Example app (coming soon)
Working with SCSS
The original SCSS files are in the parent src/ directory. The Makefile compiles them to the dist/ directory.
To watch for changes while developing:
# Terminal 1: Watch Rust code
# Terminal 2: Watch SCSS changes
Theming
This library uses the exact same CSS classes and variables as Element UI. You can customize the theme by:
- Override CSS variables in your custom CSS
- Modify the SCSS source before building
- Use custom classes via the
classprop on components
CSS Variables
Key variables you can override:
}
License
MIT License - see LICENSE file for details.
Contributing
We welcome contributions from the community! Please feel free to submit issues and pull requests on our GitHub repository.
Development Setup
- Fork the repository on GitHub
- Clone your fork:
- Create a feature branch:
- Make your changes and test locally
- Commit with a clear message:
- Push and create a Pull Request on GitHub
GitHub Workflow
- Issues: Report bugs and feature requests here
- Pull Requests: Submit improvements here
- Discussions: Join conversations here
We use conventional commit messages and semantic versioning. Please ensure your code follows the existing style and includes appropriate tests.
Credits
- Element UI - Original design system and theme-chalk CSS
- Dioxus - React-like framework for Rust
- GitHub Contributors - Open source community
License
MIT License - see LICENSE file for details.
Star History
If you find this project helpful, please consider giving it a โญ on GitHub!
Ready to level up your Dioxus apps with beautiful Element UI styling? Start building today! ๐
Project Status
This project is actively maintained on GitHub. Check out our:
- ๐ Project Insights
- ๐๏ธ Automated Builds
- ๐ Code Quality
- ๐ Release Notes
Join the Community
- ๐ฌ GitHub Discussions
- ๐ Issue Tracker
- ๐ Star the Repository
- ๐ด Fork for Your Projects
Together, we're building the future of Dioxus UI development! ๐