- Android
- iOS
- Web
Button
A Button component is a fundamental UI element that allows users to trigger actions or events, such as submitting a form, opening a dialog, or navigating to another page. Buttons are interactive and typically styled to stand out, making it easy for users to identify and interact with them. They can come in various types, such as primary, secondary, or disabled, depending on their purpose or state.
Example.tsx
| Name | Type | Default | Details |
|---|---|---|---|
| disabled | boolean | false | Prevents interaction. |
| className | string | Optional | Supported Tailwind-style utilities, resolved entirely in Rust. See the engine README. |
| isOutline | boolean | false | Uses a transparent background with an outline. |
| isLoading | boolean | false | Shows the loading label and disables the button. |
| loadingText | string | Loading… | Label shown while the button is loading. |
| leftIcon | ReactNode | Optional | Content displayed before the button label. |
| rightIcon | ReactNode | Optional | Content displayed after the button label. |
| children | ReactNode | Optional | The button label or content. |
| onPress | (() => void) | Optional | Called when the user activates the button. |