enes

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.

Attention

This is an attention message.

Warning

This is a warning message.

Success

This is a success message.

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.

Information

This is an informational message.

Attention

This is an attention message.

Warning

This is a warning message.

Critical

This is a critical message.

Success

This is a success message.

Style

The style prop determines the layout of the InfoBar.

Inline Style

This is an inline styled InfoBar.

Multiline Style

This is a multiline styled InfoBar.

Hide Close Button

The hideCloseButton prop allows you to hide the close button in the InfoBar.

Without Close Button

This InfoBar does not have a close button.

With Close Button

This InfoBar has a close button.

Component Props

NameTypeDescription
statusstringThe status of the InfoBar. Possible values: 'information', 'attention', 'warning', 'critical', 'success'.
stylestringThe style of the InfoBar. Possible values: 'inline', 'multiline'.
titlestringThe title of the InfoBar.
iconSnippet | ComponentThe icon to display in the InfoBar.
iconSizenumberThe size of the icon in pixels. Default: 20.
hideCloseButtonbooleanWhether to hide the close button. Default: false.
childrenSnippetThe child elements to render inside the InfoBar.