Docs Quickstart Figma Flowbite
1.3.0
Getting started
Customize
Components
API Reference NEW
components / Class

ButtonComponent

No documentation has been provided.

See Also

Properties

NameTypeDescription
color
ModelSignal<keyof ButtonColors>

Set the button color

contentClasses
inherited from BaseComponent
Signal<TClass>

Computed signal storing the component classes used in its template

customStyle
ModelSignal<{ root?: { base?: { default?: string | undefined; span?: string | undefined; } | undefined; color?: { [x: string]: { solid?: string | undefined; outline?: string | undefined; } | undefined; [x: number]: { solid?: string | undefined; outline?: string | undefined; } | undefined; } | undefined; gradientMonochrome?: { [x: string]: string | undefined; blue?: string | undefined; cyan?: string | undefined; green?: string | undefined; lime?: string | undefined; pink?: string | undefined; purple?: string | undefined; red?: string | undefined; teal?: string | undefined; } | undefined; gradientDuoTone?: { purpleToBlue?: { solid?: string | undefined; outline?: string | undefined; } | undefined; cyanToBlue?: { solid?: string | undefined; outline?: string | undefined; } | undefined; greenToBlue?: { solid?: string | undefined; outline?: string | undefined; } | undefined; purpleToPink?: { solid?: string | undefined; outline?: string | undefined; } | undefined; pinkToOrange?: { solid?: string | undefined; outline?: string | undefined; } | undefined; tealToLime?: { solid?: string | undefined; outline?: string | undefined; } | undefined; redToYellow?: { solid?: string | undefined; outline?: string | undefined; } | undefined; } | undefined; size?: { [x: string]: string | undefined; xs?: string | undefined; sm?: string | undefined; md?: string | undefined; lg?: string | undefined; xl?: string | undefined; } | undefined; isPill?: { enabled?: string | undefined; disabled?: string | undefined; } | undefined; isDisabled?: { enabled?: string | undefined; disabled?: string | undefined; } | undefined; } | undefined; span?: { base?: string | undefined; isPill?: { enabled?: string | undefined; disabled?: string | undefined; } | undefined; size?: { [x: string]: string | undefined; xs?: string | undefined; sm?: string | undefined; md?: string | undefined; lg?: string | undefined; xl?: string | undefined; } | undefined; } | undefined; }>

Set the custom style for this button

fill
ModelSignal<keyof ButtonFill>

Set the button fill

flowbiteId
r
inherited from BaseComponent
WritableSignal<Guid>

Auto generated GUID for each flowbite-angular component

Its default value is 00000000-0000-0000-0000-000000000000, and is set to a random GUID inside the afterNextRender hook

gradientDuoTone
ModelSignal<"purpleToBlue" | "cyanToBlue" | "greenToBlue" | "purpleToPink" | "pinkToOrange" | "tealToLime" | "redToYellow" | undefined>

Set the button gradient duotone

gradientMonochrome
ModelSignal<keyof ButtonMonochromeColors | undefined>

Set the button gradient monochrome

injector
r
inherited from BaseComponent
Injector

Injector instance injected to be used as an injector context where there is no default one.

Example usage
public ngOnInit(): void {
  afterNextRender(
     () => {},
     { injector: this.injector }
  );
}
isDisabled
ModelSignal<boolean>

Set if the button is disabled

isPill
ModelSignal<boolean>

Set if the button is pill

size
ModelSignal<keyof ButtonSizes>

Set the button size

themeService
r
ButtonThemeService

Service injected used to generate class

Methods

fetchClass()

implements BaseComponent

Function to load component's classes

Presentation
fetchClass(): ButtonClass;
Returns

init()

inherited from BaseComponent

Function loaded during OnInit lifecycle hook. It initialize requirments for the component.

Presentation
init(): void;
Returns
void

ngOnInit()

inherited from BaseComponent

Initialize component.

A call to verify and init function is done. Then a new Guid is set in the afterNextRender hook.

Presentation
ngOnInit(): void;
Returns
void
Flowbite

© 2019-2024 Flowbite™ is a registered trademark. All Rights Reserved.