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

AlertComponent

Decorators:@Component
Selectors:flowbite-alert
Extends:BaseComponent<AlertClass>
Implements:OnInit

No documentation has been provided.

See Also

Properties

NameTypeDescription
additionalContent
ModelSignal<TemplateRef<unknown> | null>

Set the additional content

color
ModelSignal<"primary" | "dark" | "blue" | "green" | "red" | "yellow">

Set the indicator color

contentClasses
inherited from BaseComponent
Signal<TClass>

Computed signal storing the component classes used in its template

customStyle
ModelSignal<{ root?: { base?: string | undefined; color?: { primary?: string | undefined; dark?: string | undefined; blue?: string | undefined; green?: string | undefined; red?: string | undefined; yellow?: string | undefined; } | undefined; hasBorder?: { enabled?: string | undefined; disabled?: string | undefined; } | undefined; hasBorderAccent?: { enabled?: string | undefined; disabled?: string | undefined; } | undefined; } | undefined; closeButton?: { base?: string | undefined; color?: { primary?: string | undefined; dark?: string | undefined; blue?: string | undefined; green?: string | undefined; red?: string | undefined; yellow?: string | undefined; } | undefined; } | undefined; }>

Set the custom style for this alert

domSanitizer
r
DomSanitizer

DomSanitizer service

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

hasBorder
ModelSignal<boolean>

Set if the alert has border

hasBorderAccent
ModelSignal<boolean>

Set if the alert has border accent

icon
ModelSignal<TemplateRef<unknown> | null>

Set the custom icon

iconRegistry
r
IconRegistry

IcoRegistry service

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 }
  );
}
isDismissable
ModelSignal<boolean>

Set if the alert is dismissable

onDismiss
ModelSignal<(() => void) | undefined>

Set the function called when the alert is dismissed

themeService
r
AlertThemeService

Service injected used to generate class

Methods

fetchClass()

implements BaseComponent

Function to load component's classes

Presentation
fetchClass(): AlertClass;
Returns

init()

overrides 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

onDismissClick()

Call the onDismiss function if it's not undefined

Presentation
onDismissClick(): void;
Returns
void
Flowbite

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