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>

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.

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

NameTypeDefaultDescription
status'information' | 'attention' | 'warning' | 'critical' | 'success''information'The severity of the message, which picks the icon and the colors.
style'inline' | 'multiline''inline'Lays the message out on a single line, or stacked below the title.
titlestringThe title of the InfoBar.
iconSnippet | ComponentCustom icon, rendered instead of the one the `status` would pick on its own.
iconSizenumber20The size of the icon in pixels.
hideCloseButtonbooleanRemoves the button that dismisses the InfoBar.
childrenSnippetThe message of the InfoBar.
Element Attributes (div)