Windows — Fluent JS behaviour

Dialog, info bar & tip

Fluent’s three messengers: the ContentDialog with Primary/Secondary/Close buttons, the InfoBar in three severities with its close, and the TeachingTip with its directional tail pointing at its target.

Documentation

Real scenarios

The component as it is used in a product — not a specimen grid.

Three messengers, one stage

Save opens the ContentDialog with its three buttons over a scrim; the info bars dismiss one by one; the teaching tip points its tail at the share button and folds on ✕ or an outside click. Escape closes everything.

Sales report — Editor Unsaved changes

Fourth-quarter sales grew 18% year over year, led by the northern region.

Churn fell to 2.1% and the average basket grew by one item.

The dialog, the bars and the tip all live inside the stage — nothing ever escapes it.

Important props

Important props
Prop Type Default What it does
content-dialog buttons '3' At most three buttons: transparent primary/secondary, a stronger close.
info-bar severity 'info · success · error' Three severities with a faint colour bar and a system icon.
teaching-tip tail 'directional' The tail aims at the target; ✕ or an outside click dismisses.

Snippet

<dialog class="fldlg">
    <h2>ذخیره تغییرات؟</h2>
    <footer>
        <button data-primary>ذخیره</button>
        <button data-secondary>ذخیره‌نکردن</button>
        <button data-close>لغو</button>
    </footer>
</dialog>

<style>
.fldlg { border-radius: 8px; padding: 24px; inline-size: min(90vw, 448px);
         box-shadow: 0 32px 64px #00000040; background: #f3f3f3; }
.fldlg footer { display: flex; justify-content: flex-end; gap: 8px; margin-block-start: 24px; }
[data-primary] { background: #fdfdfdfd; border: 1px solid #0000003d; border-block-end-color: #0000003d; }
</style>