Icon Styling
Customize how icons appear in your app with various styling options.
Icon Sizes
Control icon size to match your design:
// Size modifiers
.icon !star -size:tiny
.icon !star -size:small
.icon !star -size:medium
.icon !star -size:large
.icon !star -size:huge
// In context
.button "Rate" [rate] -icon:!star -size:large
.text "5 stars" -icon:!star -size:tiny
Icon Colors
Make icons match your color scheme:
// Basic colors
.icon !heart -color:red
.icon !check -color:green
.icon !info -color:blue
.icon !warning -color:orange
// In buttons
.button "Like" {set $liked = true} -icon:!heart -color:pink
.button "Delete" [confirm] -icon:!trash -color:red
Icon Effects
Rotation
.icon !refresh -rotate:90
.icon !arrow-down -rotate:180
.icon !spinner -spin // Continuous rotation
Animation
// Pulse effect
.icon !notification -pulse
// Bounce effect
.icon !bell -bounce
// Fade in
.icon !new -fade-in
Combining with Text
// Icon before text
.text "Loading..." -icon:!spinner -spin
// Icon after text
.text "External Link" -icon-after:!external-link
// Icon with spacing
.text "Settings" -icon:!gear -icon-spacing:large
Accessibility
Always provide context for icons:
// Icon-only button needs label
.button "" [menu] -icon:!menu -label:"Open menu"
// Decorative icons
.text "Success!" -icon:!check -decorative
More content coming soon…