Actions
IconButton
A button that is just an icon, for toolbars and compact rows.
iOSSwiftUI ButtonAndroidCompose IconButtonRenders in a Screen or an Island


Import
ts
import {IconButton} from '@hzblj/kara-ui'Props
A button that is just an icon — a plain SwiftUI Button on iOS, Material's IconButton on Android.
| Prop | Type | Default | Description |
|---|---|---|---|
| name* | IconName | — | The icon, one of the app's. |
| disabled | boolean | false | Draws the icon in |
| onPress | () => void | — | Called when the button is pressed. |
| testID | string | — | Test identifier, forwarded to the native view on iOS — Android ignores it. |
disabledfalse
booleanDraws the icon in btn.content.disabled and stops the button responding to presses.
onPress
() => voidCalled when the button is pressed.
testID
stringTest identifier, forwarded to the native view on iOS — Android ignores it.
Platform notes
nameis one of your own icons — see Icons.

