Skip to content
  • Android
  • iOS
  • Web

Button

Run an action from a labelled button.

Engine API NButtonnayan-ui/components

Live examples

Example.tsx

Press a button to see the result.

Attributes

NButton attributes
NameTypeDefaultDetails
disabledbooleanfalsePrevents interaction.
classNamestringOptionalSupported Tailwind-style utilities, resolved entirely in Rust. See the engine README.
isOutlinebooleanfalseUses a transparent background with an outline.
isLoadingbooleanfalseShows the loading label and disables the button.
loadingTextstringLoading…Label shown while the button is loading.
leftIconReactNodeOptionalContent displayed before the button label.
rightIconReactNodeOptionalContent displayed after the button label.
childrenReactNodeOptionalThe button label or content.
onPress(() => void)OptionalCalled when the user activates the button.

Tags