QUI React

Inline Alert

An alert displays a short, important message in a way that attracts the user’s attention without interrupting the user’s task. It is used to provide feedback to the user about an operation or to notify the user about something important.

import {QInlineAlert} from "@qui/react"

Examples

Showcase

The default style variant is neutral, and the dismissable property determines whether the close icon is rendered.

Note
All Major credit cards are acceptable for purchase
import {ReactNode} from "react"
import {Plus, XSquare} from "lucide-react"
import {QButton, QInlineAlert, useNotification} from "@qui/react"
export default function Showcase(): ReactNode {
const {notify} = useNotification()
return (
<div className="grid justify-center">
<QInlineAlert
description="All Major credit cards are acceptable for purchase"
dismissable
iconButtonProps={{
onClick: () => {
notify({
notification: {
color: "negative",
icon: XSquare,
label: (
<span>
<span>Dismissed Triggered</span>
</span>
),
},
})
},
}}
label="Note"
>
<QButton color="primary" size="s" startIcon={Plus} variant="fill">
Action
</QButton>
</QInlineAlert>
</div>
)
}

Colors

There are 5 status colors available, configurable via the color input.

Payment Options
Enter your billing address and payment method to complete your purchase.
Payment Options
Enter your billing address and payment method to complete your purchase.
Payment Options
Enter your billing address and payment method to complete your purchase.
Payment Options
Enter your billing address and payment method to complete your purchase.
Payment Options
Enter your billing address and payment method to complete your purchase.
import {ReactNode} from "react"
import {QInlineAlert} from "@qui/react"
export default function Status(): ReactNode {
return (
<div className="grid justify-center">
<div className="flex w-[460px] flex-col gap-8">
<QInlineAlert
description="Enter your billing address and payment method to complete your purchase."
label="Payment Options"
/>
<QInlineAlert
color="informative"
description="Enter your billing address and payment method to complete your purchase."
label="Payment Options"
/>
<QInlineAlert
color="positive"
description="Enter your billing address and payment method to complete your purchase."
label="Payment Options"
/>
<QInlineAlert
color="warning"
description="Enter your billing address and payment method to complete your purchase."
label="Payment Options"
/>
<QInlineAlert
color="negative"
description="Enter your billing address and payment method to complete your purchase."
label="Payment Options"
/>
</div>
</div>
)
}

API

Props

Name & DescriptionOption(s)Default
Label text – the alert's primary message.
ReactNode
The component used for the root node. It can be a React component or element.
| ElementType
| ComponentType
'div'
Content of the Alert.
ReactNode
The className property of the Element interface gets and sets the value of the class attribute of the specified element.
string
The style variant of the alert.
| 'neutral'
| 'informative'
| 'positive'
| 'warning'
| 'negative'
"neutral"
Optional description text shown below the label.
ReactNode
Render a close icon that dismisses the alert when clicked.
boolean
false
lucide-angular icon. If supplied, this will override the icon from the variant input. Refer to the above snippets for examples.
| LucideIcon
| ReactNode
Props passed to the Dismiss Icon when dismissable is true.
Partial<QIconButtonProps>
{}
The style global attribute contains CSS styling declarations to be applied to the element.
CSSProperties
Deprecated since v0.5.0, use color instead
Related symbols:
| 'neutral'
| 'informative'
| 'positive'
| 'warning'
| 'negative'
If true, surround the description text in the Wrap Balancer component.
boolean
false
Description
Label text – the alert's primary message.
Type
| ElementType
| ComponentType
Default
'div'
Description
The component used for the root node. It can be a React component or element.
Description
Content of the Alert.
Type
string
Description
The className property of the Element interface gets and sets the value of the class attribute of the specified element.
Type
| 'neutral'
| 'informative'
| 'positive'
| 'warning'
| 'negative'
Default
"neutral"
Description
The style variant of the alert.
Description
Optional description text shown below the label.
Type
boolean
Default
false
Description
Render a close icon that dismisses the alert when clicked.
Type
| LucideIcon
| ReactNode
Description
lucide-angular icon. If supplied, this will override the icon from the variant input. Refer to the above snippets for examples.
Type
Partial<QIconButtonProps>
Default
{}
Description
Props passed to the Dismiss Icon when dismissable is true.
Description
The style global attribute contains CSS styling declarations to be applied to the element.
Type
| 'neutral'
| 'informative'
| 'positive'
| 'warning'
| 'negative'
Description
Deprecated since v0.5.0, use color instead
Related symbols
Related symbols:
Type
boolean
Default
false
Description
If true, surround the description text in the Wrap Balancer component.