InfoBar
The InfoBar control is for displaying app-wide status messages to users that are highly visible yet non-intrusive. There are built-in severity levels to easily indicate the type of message shown, as well as the option to include your own call to action or hyperlink button. Since the InfoBar is inline with other UI content, it can remain visible or be dismissed by the user.
Usage
<script lang="ts">
import { InfoBar } from 'fluentui-svelte';
</script>
<InfoBar status="information" title="Information">
<p>This is an informational message.</p>
</InfoBar> Component API
A brief explanation of the props that really need explaining. You can see the rest of the props here.
Status
The status prop determines the visual style and meaning of the InfoBar.
Style
The style prop determines the layout of the InfoBar.
Hide Close Button
The hideCloseButton prop allows you to hide the close button in the InfoBar.
Component Props
| Name | Type | Description |
|---|---|---|
status | string | The status of the InfoBar. Possible values: 'information', 'attention', 'warning', 'critical', 'success'. |
style | string | The style of the InfoBar. Possible values: 'inline', 'multiline'. |
title | string | The title of the InfoBar. |
icon | Snippet | Component | The icon to display in the InfoBar. |
iconSize | number | The size of the icon in pixels. Default: 20. |
hideCloseButton | boolean | Whether to hide the close button. Default: false. |
children | Snippet | The child elements to render inside the InfoBar. |
