2 releases

0.0.2 Aug 27, 2023
0.0.1 Aug 24, 2023

#18 in #webasm

MIT/Apache

22KB
705 lines

nes-yew

Crates.io docs.rs

Yew component library for nes.css derived from nes-react

Install

cargo add nes-yew

Demo

https://lightsing.github.io/nes-yew/

Usage

If you want to use the default font family for nes.css (Press Start 2P), make sure to include that in your app in whatever way you choose. To use Google Font APIs, just stick a

<link
  href="https://fonts.googleapis.com/css?family=Press+Start+2P"
  rel="stylesheet"
/>

in your index.html.

use nes_yew::*;

#[function_component]
fn App() -> Html {
    html! {
        <Container>{"We're using containers from nes.css!"}</Container>
    }
}

Development

git clone git@github.com:lightsing/nes-yew.git

npm install in both the in /example.

trunk serve then also in /example.

License

MIT © lightsing

Dependencies

~11–14MB
~258K SLoC