This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
IconButton
用于显示原生 Material3 图标按钮的 Jetpack Compose IconButton 组件。
Expo UI 提供四种图标按钮组件,与 Jetpack Compose 官方的 IconButton API 相匹配:IconButton、FilledIconButton、FilledTonalIconButton 和 OutlinedIconButton。所有变体共享相同的 props,并接受可组合内容作为子元素。


安装
If you are installing this in an existing React Native app, make sure to install expo in your project.
用法
基本图标按钮
不带背景的标准图标按钮,通常用于工具栏操作。
图标按钮变体
使用不同的图标按钮组件来体现不同程度的强调效果。
API
import { IconButton, FilledIconButton, FilledTonalIconButton, OutlinedIconButton, } from '@expo/ui/jetpack-compose';
Components
Type: React.Element<IconButtonProps>
A filled icon button with a solid background.
Type: React.Element<IconButtonProps>
A filled tonal icon button with a muted background.
Type: React.Element<IconButtonProps>
A standard icon button with no background.
boolean • Default: trueWhether the icon button is enabled for user interaction.
Type: React.Element<IconButtonProps>
An outlined icon button with a border and no fill.