Home

Awesome

Yew Styles

<div align="center"> <p> <a href="https://yewstyles.spielrs.tech/"><img alt="Crate Info" src="https://img.shields.io/badge/Homepage-https%3A%2F%2Fyewstyles.spielrs.tech%2F-blue"/></a> <a href="https://crates.io/crates/yew_styles"><img alt="Crate Info" src="https://img.shields.io/badge/yew__styles-framework%20styles-brightgreen"/></a> <a href="https://docs.rs/yew_styles/"><img alt="API Docs" src="https://img.shields.io/badge/yew__styles-docs-informational"/></a> <a href="https://discord.gg/VQck8X4" target="_blank"><img alt="Discord Chat" src="https://img.shields.io/badge/Discor-Spielrs%20-yellowgreen"/></a> <a href="https://github.com/spielrs/yew_styles/blob/master/LICENSE-MIT.md" target="_blank"><img alt="License" src="https://img.shields.io/badge/License-MIT%2FApache--2.0-lightgrey"></a> </p> </div>

Yew Styles is a style framework for yew without JavaScript dependencies

Motivation

The purpose of developing this project is first, provide a style framework for yew that doesn't require any JavaScript dependencies also to create a layout system which is not far of the flexbox concept, and, to take the rust benefits and implement properties selected by enumeration in the most of the cases which makes fast for developing applications and avoids the practice try and error

How it works

Each component is split in two parts, the logical yew component and its sass module, however, it is not necessary to worry about the sass module only it needs to be include in the project

Note: One of the goals of yew_styles project is include css in the components without depending of any external css file. Candidate chosen stylist-rs

How install it

  1. Install the sass module: npm install yew-styles
  2. Add the yew_style crate with the features needed for your project in Cargo.toml file:
yew_styles = { version="0.11", features=["button", "text", "navbar"] }
  1. Import the main.css file in you main javascript/typescript file project:
    import 'node_modules/yew-styles/main.css';
  1. Ready to import and use in your project 🚀

Yew styles with Trunk

To create an app with Yew Styles framework using Trunk instead of Parcel is possible, please check Yew Styles Trunk Template

Visual example:

You can find all the visual example in the website https://yewstyles.spielrs.tech

Run the documentation page

  1. git clone https://github.com/spielrs/yew_styles.git
  2. cd yew_styles
  3. npm start

In the left side there is a list of links where each one access to a correspondent component documentation, there, shows how to use it.

Rust Docs

You can also see all the Yew Style documentation in rust docs here. It includes description and examples for each component

Run the tests

Inside of the project run:

cargo test --target wasm32-unknown-unknown --manifest-path=crate/yew_styles/Cargo.toml

Development phase

Yew Styles cover all the common cases used in a web application however there are still a lot of work to do and components to implement. All contributions are appreciated.

How contribute

First, open an issue describing about the fix, improvement or implementation and as suggestion, don't start to work in it until that is discussed. If the contribution is a fix or small improvement in a component, only a pull request to master explaining what resolve or improve that, is required. If it is an implementation, please follow the next requirements:

Do you like Yew Styles?

If you like Yew Styles, help me supporting the project:

If you need a feature that is not cover yet, as soon as possible, you can also fund the issue here

Code of Conduct

Please check our code of conduct

Code Contributors

<a href="https://github.com/dancespiele"> <img src="https://github.com/dancespiele.png?size=50"> </a> <a href="https://github.com/zoechi"> <img src="https://github.com/zoechi.png?size=50"> </a> <a href="https://github.com/ajstrand"> <img src="https://github.com/ajstrand.png?size=50"> </a> <a href="https://github.com/philip-peterson"> <img src="https://github.com/philip-peterson.png?size=50"> </a>

Roadmap

License

Yew Style is MIT and Apache-2.0 licensed