leptos-remix-icon

Crates.ioleptos-remix-icon
lib.rsleptos-remix-icon
version1.0.3
sourcesrc
created_at2024-05-16 23:12:03.803957
updated_at2024-05-26 17:56:56.28861
descriptionEasily integrate Remix icons in Leptos applications
homepage
repositoryhttps://github.com/opeolluwa/leptos-remix-icon
max_upload_size
id1242561
size20,235
Adeoye Adefemi (opeolluwa)

documentation

README

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

  1. Download the CSS file from https://cdn.jsdelivr.net/npm/remixicon@2.5.0/fonts/remixicon.css

  2. Add the downloaded file remix.css to public folder

  3. 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

Remix Icon Team

Commit count: 14

cargo fmt