Inline Notification
import {InlineNotificationModule} from "@qualcomm-ui/angular/inline-notification"Examples
Simple
The simple API bundles all subcomponents together into a single directive.
<div
class="w-96"
description="Description"
dismissable
label="Label"
q-inline-notification
></div>Child Directives
Provide child directives to customize specific elements while keeping the simple API's default structure.
<div class="w-96" dismissable q-inline-notification>
<div q-inline-notification-label>Label</div>
<div q-inline-notification-description>Description</div>
</div>Composite
Build with the composite API for granular control. This API requires you to provide each subcomponent, but gives you full control over the structure.
<div class="w-96" q-inline-notification-root>
<span q-inline-notification-icon></span>
<button q-inline-notification-close-button></button>
<div q-inline-notification-label>Label</div>
<div q-inline-notification-description>Description</div>
<button q-inline-notification-action q-link>Action</button>
</div>Emphasis (color)
Control the visual emphasis with different colors: info, success, warning, danger, and neutral. Customize these with the emphasis prop.
<div emphasis="info" label="info" q-inline-notification></div>
<div emphasis="success" label="success" q-inline-notification></div>
<div emphasis="warning" label="warning" q-inline-notification></div>
<div emphasis="danger" label="danger" q-inline-notification></div>
<div emphasis="neutral" label="neutral" q-inline-notification></div>Dismissable
Add dismiss functionality to the simple notification using the dismissable prop. Use the q-inline-notification-close-button directive when using the composite API.
<div dismissable label="Label" q-inline-notification></div>
<div q-inline-notification-root>
<span q-inline-notification-icon></span>
<div q-inline-notification-label>Label</div>
<button q-inline-notification-close-button></button>
</div>Action
Include a link or action in notifications using the q-inline-notification-action directive.
<div
class="w-96"
description="Description for action demo"
label="Label"
q-inline-notification
>
<button q-inline-notification-action q-link>Action</button>
</div>Layout
Choose between inline and stacked layouts using the layout property. Stacked layout places the description and action below the content.
<div
description="Description for horizontal"
dismissable
label="Horizontal"
q-inline-notification
>
<div q-inline-notification-action q-link>Action</div>
</div>
<div
description="Description for vertical"
dismissable
label="Vertical"
orientation="vertical"
q-inline-notification
>
<button q-inline-notification-action q-link>Action</button>
</div>API
q-inline-notification
The q-inline-notification directive extends the q-inline-notification-root directive with the following properties:
| Prop | Type | Default |
|---|---|---|
Optional description text for the notification. | string | |
To customize the element, provide it using the directive instead:
<div q-inline-notification-description>...</div> | ||
When true, renders a close button that dismisses the notification on click. | boolean | false |
To customize the close button, provide it using the directive instead:
<button q-inline-notification-close-button>...</button> | ||
Optional heading text for the notification. | string | |
To customize the element, provide it using the directive instead:
<div q-inline-notification-label>...</div> | ||
string<div q-inline-notification-description>...</div>
booleantrue, renders a close button that dismisses the notification on click.<button q-inline-notification-close-button>...</button>
string<div q-inline-notification-label>...</div>
Composite API
q-inline-notification-root
| Prop | Type | Default |
|---|---|---|
The document's text/writing direction. | 'ltr' | 'rtl' | "ltr" |
Governs the color of the notification and its icon. | | 'info' | 'info' |
A root node to correctly resolve the Document in custom environments. i.e.,
Iframes, Electron. | () => | |
id attribute. If
omitted, a unique identifier will be generated for accessibility. | string | |
The layout of the notification's elements. | | 'horizontal' | 'horizontal' |
| 'status' | 'status' | |
Function invoked when the notification is dismissed | void |
'ltr' | 'rtl'
| 'info'
| 'success'
| 'warning'
| 'danger'
| 'neutral'
| 'loading'
() =>
| Node
| ShadowRoot
| Document
string| 'horizontal'
| 'vertical'
voidq-inline-notification-icon
InlineNotificationIconComponent| Attribute / Property | Value |
|---|---|
class | 'qui-notification__icon' |
data-part | 'status-icon' |
data-scope | 'inline-notification' |
class'qui-notification__icon'data-part'status-icon'data-scope'inline-notification'q-inline-notification-label
| Prop | Type |
|---|---|
id attribute. If
omitted, a unique identifier will be generated for accessibility. | string |
string| Attribute / Property | Value |
|---|---|
class | 'qui-notification__label' |
data-part | 'heading' |
data-scope | 'inline-notification' |
class'qui-notification__label'data-part'heading'data-scope'inline-notification'q-inline-notification-description
| Prop | Type |
|---|---|
id attribute. If
omitted, a unique identifier will be generated for accessibility. | string |
string| Attribute / Property | Value |
|---|---|
class | 'qui-notification__description' |
data-part | 'description' |
data-scope | 'inline-notification' |
class'qui-notification__description'data-part'description'data-scope'inline-notification'q-inline-notification-close-button
InlineNotificationCloseButtonComponent| Attribute / Property | Value |
|---|---|
class | 'qui-notification__close-button' |
data-part | 'close-trigger' |
data-scope | 'inline-notification' |
class'qui-notification__close-button'data-part'close-trigger'data-scope'inline-notification'q-inline-notification-action
| Attribute / Property | Value |
|---|---|
class | 'qui-notification__action' |
data-orientation | | 'horizontal' |
data-part | 'action' |
data-scope | 'inline-notification' |
class'qui-notification__action'data-orientation| 'horizontal'
| 'vertical'
data-part'action'data-scope'inline-notification'