Represents the API for an alert component.
close():
void
Triggers alert closing programmatically (same as clicking on the close button (×)).
void
open():
void
Triggers the alert to be displayed for the user.
void
Represents the directives for an alert component.
transitionDirective:
Directive
the transition directive, piloting what is the visual effect of going from hidden to visible
Represents the properties for the alert component.
animated:
boolean
If true
, alert closing will be animated.
Animation is triggered when clicked on the close button (×),
via the .close()
function or the visible prop is changed
true
animatedOnInit:
boolean
If true
, alert opening will be animated.
Animation is triggered when the .open()
function is called
or the visible prop is changed
false
ariaCloseButtonLabel:
string
Accessibility close button label
'Close'
className:
string
CSS classes to be applied on the widget main container
''
dismissible:
boolean
If true
, alert can be dismissed by the user.
The close button (×) will be displayed and you can be notified of the event with the (close) output.
true
onHidden: () =>
void
Callback called when the alert is hidden.
void
() => {}
onShown: () =>
void
Callback called when the alert is shown.
void
() => {}
onVisibleChange: (
visible
) =>void
Callback called when the alert visibility changed.
• visible: boolean
void
() => {}
transition:
TransitionFn
The transition function will be executed when the alert is displayed or hidden.
Depending on the value of animatedOnInit
, the animation can be optionally skipped during the showing process.
async () => {}
visible:
boolean
If true
the alert is visible to the user
true
Represents the state of an alert component.
ariaCloseButtonLabel:
string
Accessibility close button label
'Close'
className:
string
CSS classes to be applied on the widget main container
''
dismissible:
boolean
If true
, alert can be dismissed by the user.
The close button (×) will be displayed and you can be notified of the event with the (close) output.
true
hidden:
boolean
Is true
when the alert is hidden. Compared to visible
, this is updated after the transition is executed.
visible:
boolean
If true
the alert is visible to the user
true
AlertWidget:
Widget
<AlertProps
,AlertState
,AlertApi
,AlertDirectives
>
Represents an alert widget with specific properties, state, API, and directives.
createAlert(
props
?):AlertWidget
Create an AlertWidget with given config props
• props?: PropsConfig
<AlertProps
>
an AlertWidget
getAlertDefaultConfig():
AlertProps
Retrieve a shallow copy of the default alert config
the default alert config