Inline Alert

Alert messages for important information.

Syntax

<InlineAlert slots="text" variant="info" />

Your alert message here.

Parameters

Examples

Info (Default)

data-slots=text
This is an info alert.

Help

data-slots=text
data-variant=help
This is an help alert.

Error

data-slots=text
data-variant=error
This is an error alert.

Success

data-slots=text
data-variant=success
This is a success alert.

Warning

data-slots=text
data-variant=warning
This is a warning alert.

Neutral

data-slots=text
data-variant=neutral
This is a neutral alert.

Richer Inline Alert

data-variant=help
data-slots=heading, text1, text2, text3, text4
Alternative steps:
Step 1: This is faux step text for the text1 slot. This is faux step text for the text1 slot. This is faux step text for the text1 slot. This is faux step text for the text1 slot. This is faux step text for the text1 slot.
Step 2: This is faux step text for the text2 slot. This is faux step text for the text2 slot. This is faux step text for the text2 slot.
Step 3: This is faux step text for the text3 slot.
Step 4: This is faux step text for the text4 slot. This is faux step text for the text3 slot.

Inline alert with code

data-slots=header, code
data-variant=info
Example for inline alert with code
function greet(name) {
  return "Hello, " + name + "!";
}

console.log(greet("Inline Alert")); // Output: Hello, Inline Alert!!