19 releases (8 breaking)

new 0.9.0 Jan 10, 2021
0.8.1 Nov 11, 2020
0.8.0 Oct 26, 2020
0.7.2 Jul 27, 2020
0.2.1 Mar 18, 2020

#13 in HTTP client

Download history 26/week @ 2020-09-25 68/week @ 2020-10-02 39/week @ 2020-10-09 39/week @ 2020-10-16 75/week @ 2020-10-23 28/week @ 2020-10-30 86/week @ 2020-11-06 48/week @ 2020-11-13 80/week @ 2020-11-20 46/week @ 2020-11-27 60/week @ 2020-12-04 12/week @ 2020-12-11 27/week @ 2020-12-18 25/week @ 2020-12-25 42/week @ 2021-01-01 64/week @ 2021-01-08

204 downloads per month
Used in design-system

MIT/Apache

245KB
4.5K SLoC

Yew Styles

Crate Info Crate Info API Docs Discord Chat License Donate by Paypal

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. Possible candidates are CssinRust or RUSS

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.9", 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 🚀

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:

  • Firstable open an issue describing about the component
  • Unit tests, which checks that the component is created and its logic works, in the same file where it is implemented (test events is not needed for now)
  • One component per file, if multiple components have connections between them, it is possible create subfolder
  • Documentation in the component showing an example of using it and small description of each prop
  • Create a component page in /crate/src/page with the same structure than the rest of the components

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 Contributors

Roadmap

  • Button
  • Layout
  • Navbar
  • Form
  • Card
  • Text
  • Dropdown
  • Progress
  • Spinners
  • Table
  • Pagination
  • Modal
  • Sidebar
  • Tab
  • Tooltips
  • Collapse
  • Carousel
  • Calendar
  • Assets (implemented in the new library yew_assets)

Dependencies

~13MB
~239K SLoC