Skip to content

scale

Utilities for scaling elements uniformly or independently along X, Y, and Z axes.

Interactive Iced
Rust · WASM
Iced + ISS preview demonstrating scale
Click scale presets to transform the live Iced widget
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"));
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)
  • Visual scaling does not change layout dimensions; use zoom-* if surrounding layout should reflow with the scaled size.

zoom · rotate · translate · transform-origin