scale
Utilities for scaling elements uniformly or independently along X, Y, and Z axes.
Interactive Iced
Rust · WASM
Examples
Section titled “Examples”use iced::widget::button;use iss::{tw, TwExt};
let btn = button(label).on_press(Msg::Go).tw(tw!("px-4 py-2 bg-blue-600 hover:scale-105 active:scale-95 rounded-lg"));use iss::typed::*;
let style = IssStyle::new().hover(|s| s.scale(105)).active(|s| s.scale(95));Class Reference
Section titled “Class Reference”| Tailwind Class | CSS Property / Effect | iss::typed Builder |
|---|---|---|
scale-<n> / -scale-<n> |
scale: <n>% <n>%; |
.scale(95) / .scale(105) |
scale-x-<n> / scale-y-<n> / scale-z-<n> |
Per-axis scaling; |
.scale_x(110) / .scale_y(90) |
scale-3d / scale-none |
3D scaling or reset; |
.scale_none() |
scale-[1.08] |
Arbitrary scale factor; |
.scale_factor(1.08) |
Behavior Notes
Section titled “Behavior Notes”- Visual scaling does not change layout dimensions; use
zoom-*if surrounding layout should reflow with the scaled size.
Related Utilities
Section titled “Related Utilities”zoom · rotate · translate · transform-origin