pub fn HoverEffects() -> ElementExpand description
A component that creates a shadow effect on hover.
§Example
use dioxus::prelude::*;
use by_components::effects::HoverEffects;
#[component]
pub fn App() -> Element {
rsx! {
div {
HoverEffects {}
button { "Hover me" }
a { "Hover me" }
div { class: "hover-effect", "hover me" }
div { "Don't hover me" }
}
}
}§Output
It shows a shadow effect on all of and tags. It also shows a shadow effect on the element starting with the class name “hover-effect”.