Skip to main content

IconButton

Inputs & Controls

IconButton

Compact tappable icon with ripple + state layer feedback.

Usage

Place inline actions inside Appbar, lists, or cards.

Highlights

  • Size tokens (sm, md, lg)
  • Supports toggle/disabled states

When to use it

  • Actions are purely iconographic.
  • You need secondary actions adjacent to content.

Examples

Default

Preview (Web)
import { IconButton } from 'react-native-molecules/components/IconButton';

export default function Example() {
  return <IconButton name="home-outline" onPress={() => console.log('Pressed')} />;
}
PropTypeDefaultDescription
accessibilityLabelstring | undefinedAccessibility label for the button. This is read by the screen reader when the user taps the button.
onPress(((event: GestureResponderEvent) => void) & ((e: GestureResponderEvent) => void) & ((e: GestureResponderEvent) => void)) | undefinedFunction to execute on press.
disabledboolean | undefinedWhether the button is disabled. A disabled button is greyed out and `onPress` is not called on touch.
nameRequiredstringIcon to display.
variantIconButtonVariant | undefinedMode of the icon button. By default there is no specified mode - only pressable icon will be rendered.
selectedboolean | undefinedWhether icon button is selected. A selected button receives alternative combination of icon and container colors.
sizenumber | "sm" | "md" | "xs" | "lg" | undefinedSize of the icon.
type"material-community" | "feather" | undefinedType of the icon. Default is material Should be a number or a Design Token
animatedboolean | undefinedWhether an icon change is animated.
styleStyleProp<TextStyle>backgroundColor and color will be extracted from here and act as buttonBackgroundColor and iconColor
iconStyleStyleProp<TextStyle>
iconPropsOmit<IconProps, "style" | "color" | "size" | "name" | "type"> | undefined
colorstring | undefinedcolor of the icon
stateLayerPropsViewProps | undefinedProps for the state layer
Defined in react-native-molecules/components/IconButton