4 stable releases
1.0.3 | May 26, 2024 |
---|---|
1.0.2 | May 24, 2024 |
1.0.1 | May 16, 2024 |
#1741 in Web programming
166 downloads per month
7KB
78 lines
Leptos Remix Icon
Integrate Open Source Remix Icon into Leptos Application
Getting Started
Include Remix CDN in your application's index.html
<!--index.html-->
<head>
...
<link
href="https://cdn.jsdelivr.net/npm/remixicon@4.2.0/fonts/remixicon.css"
rel="stylesheet"
/>
</head>
Then in your Leptos Components
use leptos_remix_icon::Icon;
use leptos::{view, IntoView, component};
#[component]
pub fb Button(){
view!{
<button> Star on Github
<Icon icon="github-fill" class="text-gray-500"/>
// with size
<Icon icon="github-fill" size="xxs" />
</button>
}
}
Development
To use Remix Icon locally
-
Download the CSS file from https://cdn.jsdelivr.net/npm/remixicon@2.5.0/fonts/remixicon.css
-
Add the downloaded file
remix.css
topublic
folder -
Add the following line to your
index.html
<!--index.html-->
<head>
...
<link data-trunk rel="copy-dir" href="./public/" />
<head/>
see the CDN and local assets examples
License
This project is licensed under the MIT License - see the LICENSE file for details
Acknowledgments
Dependencies
~19–31MB
~507K SLoC