Crates.io | leptos-remix-icon |
lib.rs | leptos-remix-icon |
version | 1.0.3 |
source | src |
created_at | 2024-05-16 23:12:03.803957 |
updated_at | 2024-05-26 17:56:56.28861 |
description | Easily integrate Remix icons in Leptos applications |
homepage | |
repository | https://github.com/opeolluwa/leptos-remix-icon |
max_upload_size | |
id | 1242561 |
size | 20,235 |
Integrate Open Source Remix Icon into Leptos Application
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>
}
}
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
to public
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
This project is licensed under the MIT License - see the LICENSE file for details