Skip to main content
ButtonStyleDefinition
required
The button style definition object.

Returns

A ButtonStyleComponent. Call it, with no arguments or with props to customize its appearance per-use, and pass the result to the .buttonStyle() modifier on any Button.

Usage

Basic button style

With custom props

Applying a button style

Button styles are applied using the .buttonStyle() modifier. Call the style with no arguments, or with props to customize per-use.

Press feedback with gradient

Notes

  • Button styles do not support view modifiers on the style itself — they only style button appearances.
  • The label in ButtonStyleConfiguration is the content passed as the first argument to Button(). It can be a string (rendered as Text) or a custom component tree.
  • The isPressed state updates automatically when the user touches or clicks the button.
  • When calling the style with props (e.g., MyStyle({ color: "red" })), those props are available as the second argument to the body function.
  • The style must be assigned to exports.default to be recognized as a button style component.

See Also