Actions

IconButton

A button that is just an icon, for toolbars and compact rows.

iOSSwiftUI ButtonAndroidCompose IconButtonRenders in a Screen or an Island
IconButton on iOS
iOSSwiftUI Button
IconButton on Android
AndroidCompose IconButton

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.

PropTypeDefaultDescription
name*IconName—

The icon, one of the app's.

disabledbooleanfalse

Draws the icon in btn.content.disabled and stops the button responding to presses.

onPress() => void—

Called when the button is pressed.

testIDstring—

Test identifier, forwarded to the native view on iOS — Android ignores it.

name*
IconName

The icon, one of the app's.

disabledfalse
boolean

Draws the icon in btn.content.disabled and stops the button responding to presses.

onPress
() => void

Called when the button is pressed.

testID
string

Test identifier, forwarded to the native view on iOS — Android ignores it.

Platform notes

  • name is one of your own icons — see Icons.