alert.html
I've created a pure HTML and CSS version of the shadcn Alert component 1 with the following features:
To use this component, you can simply copy the HTML structure and the CSS styles. The alert can be customized by:
:root
selectordata-variant="destructive"
attribute to switch variantsalert-title
and alert-description
classesThe component is fully accessible and works across all modern browsers without any JavaScript dependencies.
alert.html
I've made the following changes:
#dc2626
(the red you specified)--alert-color
variableThe alert now has:
#dc2626
)#dc2626
)#dc2626
)You can easily modify the color by changing the --alert-color
variable in the CSS if needed.