CamoIconButton
An icon-only button. contentDescription names the action ("Close", "Add to favorites"), not the icon.
A non-null checked makes it a toggle; tooltip shows on hover, keyboard focus and long press.
API
- Kotlin
- Dart
public fun CamoIconButton(
icon: @Composable () -> Unit,
contentDescription: String,
onClick: () -> Unit,
modifier: Modifier = Modifier,
appearance: Appearance? = null,
tone: Tone = Tone.Default,
enabled: Boolean = true,
checked: Boolean? = null,
loading: Boolean = false,
tooltip: String? = null,
interactionSource: MutableInteractionSource? = null,
)
| Name | Type | Default |
|---|---|---|
icon | @Composable () -> Unit | required |
contentDescription | String | required |
onClick | () -> Unit | required |
modifier | Modifier | Modifier |
appearance | Appearance? | null |
tone | Tone | Tone.Default |
enabled | Boolean | true |
checked | Boolean? | null |
loading | Boolean | false |
tooltip | String? | null |
interactionSource | MutableInteractionSource? | null |
Design notes
Why CamoIconButton works this way, its states and its edge cases: contributor docs.