SIcon
this is a icon container, better than Image
![]()
properties:
in property <MouseCursor> mouse-cursor: mouse cursor of the iconin property <Themes> theme: SurrealismUI themesin property <image> source: icon sourcein-out property <brush> colorize: icon colorin property <ImageFit> image-fit: icon image fitin property <ImageRendering> image-rendering: image renderingin-out property <RotationProps> rotation: image rotationin property <int> source-clip-x: icon clip xin property <int> source-clip-y: icon clip yin property <int> source-clip-height: icon clip heightin property <int> source-clip-width: icon clip widthout property <bool> has-hover: icon has hover
functions
pure public function get-colorize()->brush: get icon color
callbacks:
callback clicked: run if you click the icon
example
#![allow(unused)] fn main() { SIcon{ height: 30px; width: 30px; colorize: self.get-colorize(); source: @image-url("../../icons/sd-card.svg"); theme: Themes.Primary; } }