ToggleButtonToggle Button are mainly used to switch between two opposing states, typically "On" and "Off."
It provides clear and immediate visual feedback about the current state of a setting or option, f.e- favorite, like.
- Overview
- Dev
Usage ExamplesToggleButton is being used in MediaItem to mark image as favorite/liked.
Button Types & StateToggle Button coloring doesn’t support color tokens, meaning in dark mode they don’t invert
Style: Light BG
| Type | Off (Border style: $grey10; 2px) | On (Border style: none) |
|---|---|---|
| Love | ||
| Favorite |
Style: Dark BG
| Type | Off (Border $systemWhite; 2px) | On (Border: $systemWhite; 1px) |
|---|---|---|
| Love | ||
| Favorite |
PlaygroundCode Example
APIThis is the list of additional props for the component