Skip to main content
.buttonStyle(style: ButtonStyleComponent): Component;

Parameters

style
ButtonStyleComponent
A component that implements a buttonStyle function. The function receives a label property and returns the styled button appearance.

Support

Button Style Implementation

Button style components must implement a buttonStyle function that receives the button’s label as a property:
const buttonStyleBody = ({ label }) => {
    return label
            .font('headline')
            .bold()
            .background(Color('blue')).foregroundStyle(Color('white))
            .cornerRadius(24)
}

Usage

Basic usage

Button("Custom Button", () => {})
    .buttonStyle(RoundedButtonStyle())