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

Returns

A ButtonStyleComponent that can be passed to the .buttonStyle() modifier on any Button. The returned style can also be called with props to customize its appearance per-use.

Usage

Basic button style

With custom props

Applying a button style

Button styles are applied using the .buttonStyle() modifier. Pass the style directly or call it 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