buttonVariant()
Enables (or disables) the specified button style variant.
buttonVariant(
variant: string,
enabled?: BindingOrValue<boolean | undefined>,
): this;
Notes
- Standard button style variants can be enabled using specific builder methods, e.g. ghost(). Using this method to set custom variants is possible, but not encouraged for regular use.
Parameters
- variant — The variant name.
- enabled — True to enable, or a binding; defaults to true.
Return value
The builder instance for chaining.
Related
class ButtonBuilder static
A builder class for creating UIButton instances.
