Import
import { Alert , AlertTitle , AlertDescription } from '@strongtie/design-system/alert' ;
Usage
< Alert >
< AlertTitle > Quality Control </ AlertTitle >
< AlertDescription >
Check lumber moisture (below 19%).
</ AlertDescription >
</ Alert >
Props variant
"default" | "destructive"
default: "default"
The variant of the alert.
Styling Classes The following CSS classes are applied by the Alert components:
alert – Root alert container
alert-title – Title of the alert
alert-description – Description/content of the alert
Usage Examples Basic
With Icon
Destructive Variant
< Alert >
< AlertTitle > Quality Control </ AlertTitle >
< AlertDescription >
Check lumber moisture (below 19%).
</ AlertDescription >
</ Alert >
For more examples, visit the Storybook . < StudsAlert AllowClose = "false"
Title = "This is a default alert"
Icon = "notifications"
Variant = "AlertStyle.Default" >
Check lumber moisture (below 19%).
</ StudsAlert >
Parameters If true, the alert can be closed.
Variant
"Default" | "Destructive"
default: "AlertStyle.Default"
The variant of the alert.
Event callback that is triggered when the visibility of the alert changes.
Event callback that is triggered when the alert is closed.
Attributes
Dictionary<string, object>
Specifies additional custom attributes that will be rendered by the component.
MouseEnter
EventCallback<ElementReference>
Gets or sets the callback that is invoked when the mouse enters an item.
MouseLeave
EventCallback<ElementReference>
Gets or sets the callback that is invoked when the mouse leaves an item.
A callback that will be invoked when the user right-clicks the component. Commonly used to display a context menu.
Culture
CultureInfo
default: "CultureInfo.CurrentCulture"
Gets or sets the culture used to display localizable data (numbers, dates). Set by default to “CultureInfo.CurrentCulture”.
Gets or sets the inline CSS style.
Gets or sets a value indicating whether this “T:Studs.StudsComponent” is visible. Invisible components are not rendered.
Usage Examples Basic
With Icon
Destructive Variant
Not Closable
< StudsAlert Title = "Quality Control" >
Check lumber moisture (below 19%).
</ StudsAlert >
Styling Classes The following CSS classes are applied by the Alert components:
alert – Root alert element, with variant modifier (alert -default or alert -destructive)
-default – Modifier for default variant (e.g., alert -default)
-destructive – Modifier for destructive variant (e.g., alert -destructive)
alert-container – Container for the alert content
alert-icon – Icon element
alert-message – Wrapper for the message and title
alert-title – Title element
alert-content – Content/description element
For more examples, visit the Storybook .