current theme: placeholder

component :: Notice

The .notice component is useful to bring something to the attention of the reader/user, as well as provide feedback on user interaction.

File NameclassSource
component.notice.css.noticeGithub

HTML

Available modifiers

Available modifiersDescription
.noticeDefault style. Base colors.
.notice + .notice-infoInformation. Primary colors.
.notice + .notice-dangerError/Danger. Reds.
.notice + .notice-warningWarning. Oranges.
.notice + .notice-confirmConfirmation/Success. Greens.

When using HTML, you’ll need to include the SVG icons “manually.” All the icons are available on Github. If you’d like to use different icons, Lucide is a great resource.

Custom properties

The following custom properties are available in the default theme:

PropertyColor
--notice-spacingPadding inside Notice.
--notice-text-colorDefault text color.
--notice-background-colorDefault background color.
--notice-border-colorDefault border color.
--notice-border-widthDefault border width.
--notice-border-radiusDefault border radius.

Astro component

PropTypeDefaultDescription
titlestringundefinedText for the notice header. (Optional.)
typestringundefinedinfo, danger, warning, confirm.
extraClassstringundefinedAdditional CSS, useful for helper classes.

Available styles

Examples

HTML examples