### Install MCP Icon Server for yew-shortcuts Source: https://github.com/madoshakalaka/yew-shortcuts/blob/master/README.md Provides instructions for installing the MCP Icon Server, which offers FontAwesome icon search and code generation for `yew-shortcuts`. The installation involves navigating to the `mcp-icon-server` directory and running an install script, which builds the server, installs it, and provides instructions for integrating with Claude Code. ```bash cd mcp-icon-server ./install.sh ``` -------------------------------- ### Enable Full SVG Mode for FontAwesome Icons Source: https://github.com/madoshakalaka/yew-shortcuts/blob/master/README.md Explains how to enable the 'full-svg' feature in `yew-shortcuts` to use FontAwesome icons with a standard 640x640 viewBox. This is useful for maintaining consistent icon boundaries. The example shows the Cargo.toml configuration and how to apply the `full=true` prop in the Yew component. ```toml # Cargo.toml [dependencies] yew-shortcuts = { git = "https://github.com/Madoshakalaka/yew-shortcuts", features = ["full-svg"] } ``` ```rust // Use full 640×640 viewBox html! { } ``` -------------------------------- ### Add yew-shortcuts Dependency to Cargo.toml Source: https://github.com/madoshakalaka/yew-shortcuts/blob/master/README.md Demonstrates how to add the `yew-shortcuts` crate as a dependency to a Rust project's `Cargo.toml` file, specifying it to be fetched directly from its GitHub repository. ```toml [dependencies] yew-shortcuts = { git = "https://github.com/Madoshakalaka/yew-shortcuts" } ``` -------------------------------- ### Simplify Variable Cloning with `cs!` Macro Source: https://github.com/madoshakalaka/yew-shortcuts/blob/master/README.md Illustrates the usage of the `cs!` macro from `yew-shortcuts` to simplify the cloning of multiple variables within closures. It contrasts the verbose manual cloning with the concise macro usage. ```rust use yew_shortcuts::cs; cs!(state, onclick, name); ``` -------------------------------- ### Use FontAwesome Icons in Yew Source: https://github.com/madoshakalaka/yew-shortcuts/blob/master/README.md Demonstrates how to use FontAwesome icons within Yew components using the `yew-shortcuts` crate. It shows importing icons and rendering them as `FontAwesomeSvg` components. Only the icons used are included in the final binary due to dead code elimination. ```rust use yew_shortcuts::fontawesome::{icons, FontAwesomeSvg}; // Only this icon will be included in your final binary html! { } ``` -------------------------------- ### Simplify Yew Component Definition with `#[comp]` Source: https://github.com/madoshakalaka/yew-shortcuts/blob/master/README.md Shows how to use the `#[comp]` attribute macro from `yew-shortcuts` to streamline Yew function component definitions. It combines the functionality of `#[yew_autoprops::autoprops]` and `#[yew::function_component]` into a single, cleaner attribute. ```rust use yew_shortcuts::comp; #[comp] fn MyComponent(name: &str) -> Html { html! {
{name}
} } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.