Button's active css styling/animation is not the same with mobile and web #3622
chardskarth
started this conversation in
General
Replies: 2 comments 1 reply
-
This is why we need to use dioxus-motion, an animation library for dioxus. (Promotion). Just kidding. Can you drop the button element with css? I can try during my spare time. |
Beta Was this translation helpful? Give feedback.
1 reply
-
After having a look, Mobile browsers render the :active pseudo-class differently. #[component]
pub fn Button(text: String) -> Element {
rsx! {
button { class: "
btn btn-outline my-2 mx-8 p-4
bg-violet-500 hover:bg-violet-600
active:bg-violet-700 active:scale-95
active:shadow-inner
transform transition-all duration-150 ease-in-out
shadow-lg hover:shadow-xl
origin-center
rounded-lg
text-white font-semibold
",
"{text}"
}
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
dioxus.active.button.mov
Is there a way to make the button feel like it's being clicked (while it's being hold down).
Beta Was this translation helpful? Give feedback.
All reactions