Retour

Modale (modal)

La modale permet de concentrer l’attention de l’utilisateur exclusivement sur une tâche ou un élément d’information, sans perdre le contexte de la page en cours. Ce composant nécessite une action de l’utilisateur afin d'être clôturé ou ouverte.

Documentation

Modale simple

Titre de la modale

Lorem ipsum dolor sit amet, consectetur adipiscing, incididunt, ut labore et dolore magna aliqua. Vitae sapien pellentesque habitant morbi tristique senectus et. Diam maecenas sed enim ut. Accumsan lacus vel facilisis volutpat est. Ut aliquam purus sit amet luctus. Lorem ipsum dolor sit amet consectetur adipiscing elit ut.

<button class="fr-btn" data-fr-opened="false" aria-controls="modal-807">
    Modal simple
</button>
<dialog id="modal-807" class="fr-modal" role="dialog" aria-labelledby="modal-807-title">
    <div class="fr-container fr-container--fluid fr-container-md">
        <div class="fr-grid-row fr-grid-row--center">
            <div class="fr-col-12 fr-col-md-8 fr-col-lg-6">
                <div class="fr-modal__body">
                    <div class="fr-modal__header">
                        <button class="fr-link--close fr-link" aria-controls="modal-807">Fermer</button>
                    </div>
                    <div class="fr-modal__content">
                        <h1 id="modal-807-title" class="fr-modal__title">
                            <span class="fr-fi-arrow-right-line fr-fi--lg"></span>
                            Titre de la modale
                        </h1>
                        <p>Lorem [...] elit ut.</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</dialog>

Modale SM

Titre de la modale

Lorem ipsum dolor sit amet, consectetur adipiscing, incididunt, ut labore et dolore magna aliqua. Vitae sapien pellentesque habitant morbi tristique senectus et. Diam maecenas sed enim ut. Accumsan lacus vel facilisis volutpat est. Ut aliquam purus sit amet luctus. Lorem ipsum dolor sit amet consectetur adipiscing elit ut.

<button class="fr-btn" data-fr-opened="false" aria-controls="modal-810">
    Modal SM
</button>
<dialog id="modal-810" class="fr-modal" role="dialog" aria-labelledby="modal-810-title">
    <div class="fr-container fr-container--fluid fr-container-md">
        <div class="fr-grid-row fr-grid-row--center">
            <div class="fr-col-12 fr-col-md-6 fr-col-lg-4">
                <div class="fr-modal__body">
                    <div class="fr-modal__header">
                        <button class="fr-link--close fr-link" aria-controls="modal-810">Fermer</button>
                    </div>
                    <div class="fr-modal__content">
                        <h1 id="modal-810-title" class="fr-modal__title">
                            <span class="fr-fi-arrow-right-line fr-fi--lg"></span>
                            Titre de la modale
                        </h1>
                        <p>Lorem [...] elit ut.</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</dialog>

Modale LG

Titre de la modale

Lorem ipsum dolor sit amet, consectetur adipiscing, incididunt, ut labore et dolore magna aliqua. Vitae sapien pellentesque habitant morbi tristique senectus et. Diam maecenas sed enim ut. Accumsan lacus vel facilisis volutpat est. Ut aliquam purus sit amet luctus. Lorem ipsum dolor sit amet consectetur adipiscing elit ut.

<button class="fr-btn" data-fr-opened="false" aria-controls="modal-813">
    Modal LG
</button>
<dialog id="modal-813" class="fr-modal" role="dialog" aria-labelledby="modal-813-title">
    <div class="fr-container fr-container--fluid fr-container-md">
        <div class="fr-grid-row fr-grid-row--center">
            <div class="fr-col-12 fr-col-md-10 fr-col-lg-8">
                <div class="fr-modal__body">
                    <div class="fr-modal__header">
                        <button class="fr-link--close fr-link" aria-controls="modal-813">Fermer</button>
                    </div>
                    <div class="fr-modal__content">
                        <h1 id="modal-813-title" class="fr-modal__title">
                            <span class="fr-fi-arrow-right-line fr-fi--lg"></span>
                            Titre de la modale
                        </h1>
                        <p>Lorem [...] elit ut.</p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</dialog>

Modale formulaire

Titre de la modale

Légende pour l’ensemble de champs

<button class="fr-btn" data-fr-opened="false" aria-controls="modal-816">
    Modal formulaire
</button>
<dialog id="modal-816" class="fr-modal" role="dialog" aria-labelledby="modal-816-title">
    <div class="fr-container fr-container--fluid fr-container-md">
        <div class="fr-grid-row fr-grid-row--center">
            <div class="fr-col-12 fr-col-md-8 fr-col-lg-6">
                <div class="fr-modal__body">
                    <div class="fr-modal__header">
                        <button class="fr-link--close fr-link" aria-controls="modal-816">Fermer</button>
                    </div>
                    <div class="fr-modal__content">
                        <h1 id="modal-816-title" class="fr-modal__title">
                            <span class="fr-fi-arrow-right-line fr-fi--lg"></span>
                            Titre de la modale
                        </h1>
                        <form action="">
                            <div class="fr-form-group">
                                <fieldset class="fr-fieldset">
                                    <legend class="fr-fieldset__legend" id='text-legend'>
                                        Légende pour l’ensemble de champs
                                    </legend>
                                    <div class="fr-fieldset__content">
                                        <div class="fr-input-group">
                                            <label class="fr-label" for="text-1">Label champs de saisie
                                            </label>
                                            <input class="fr-input" type="text" id="text-1" name="text-1">
                                        </div>
                                        <div class="fr-input-group">
                                            <label class="fr-label" for="text-2">Label champs de saisie
                                            </label>
                                            <input class="fr-input" type="text" id="text-2" name="text-2">
                                        </div>
                                        <div class="fr-input-group">
                                            <label class="fr-label" for="text-3">Label champs de saisie
                                            </label>
                                            <input class="fr-input" type="text" id="text-3" name="text-3">
                                        </div>
                                    </div>
                                </fieldset>
                            </div>
                            <button class="fr-btn" title="Envoyer">
                                Label bouton
                            </button>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</dialog>

Modale avec iframe

Titre de la modale

Lorem ipsum dolor sit amet, consectetur adipiscing, incididunt, ut labore et dolore magna aliqua. Vitae sapien pellentesque habitant morbi tristique senectus et. Diam maecenas sed enim ut. Accumsan lacus vel facilisis volutpat est. Ut aliquam purus sit amet luctus. Lorem ipsum dolor sit amet consectetur adipiscing elit ut.

<button class="fr-btn" data-fr-opened="false" aria-controls="modal-819">
    Modal iframe
</button>
<dialog id="modal-819" class="fr-modal" role="dialog" aria-labelledby="modal-819-title">
    <div class="fr-container fr-container--fluid fr-container-md">
        <div class="fr-grid-row fr-grid-row--center">
            <div class="fr-col-12 fr-col-md-8 fr-col-lg-6">
                <div class="fr-modal__body">
                    <div class="fr-modal__header">
                        <button class="fr-link--close fr-link" aria-controls="modal-819">Fermer</button>
                    </div>
                    <div class="fr-modal__content">
                        <h1 id="modal-819-title" class="fr-modal__title">
                            <span class="fr-fi-arrow-right-line fr-fi--lg"></span>
                            Titre de la modale
                        </h1>
                        <p>Lorem [...] elit ut.</p>
                        <div class="fr-responsive-vid">
                            <iframe title="titre de l’iframe" class="fr-responsive-vid__player" src="https://www.youtube.com/embed/HyirpmPL43I" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</dialog>

Modal avec zone d'action

Titre de la modale

Lorem ipsum dolor sit amet, consectetur adipiscing, incididunt, ut labore et dolore magna aliqua. Vitae sapien pellentesque habitant morbi tristique senectus et. Diam maecenas sed enim ut. Accumsan lacus vel facilisis volutpat est. Ut aliquam purus sit amet luctus. Lorem ipsum dolor sit amet consectetur adipiscing elit ut.

<button class="fr-btn" data-fr-opened="false" aria-controls="modal-822">
    Modale avec zone d&#39;action
</button>
<dialog id="modal-822" class="fr-modal" role="dialog" aria-labelledby="modal-822-title">
    <div class="fr-container fr-container--fluid fr-container-md">
        <div class="fr-grid-row fr-grid-row--center">
            <div class="fr-col-12 fr-col-md-8 fr-col-lg-6">
                <div class="fr-modal__body">
                    <div class="fr-modal__header">
                        <button class="fr-link--close fr-link" aria-controls="modal-822">Fermer</button>
                    </div>
                    <div class="fr-modal__content">
                        <h1 id="modal-822-title" class="fr-modal__title">
                            <span class="fr-fi-arrow-right-line fr-fi--lg"></span>
                            Titre de la modale
                        </h1>
                        <p>Lorem [...] elit ut.</p>
                    </div>
                    <div class="fr-modal__footer">
                        <ul class="fr-btns-group fr-btns-group--right fr-btns-group--inline-reverse fr-btns-group--inline-lg fr-btns-group--icon-left">
                            <li>
                                <button class="fr-btn fr-fi-checkbox-circle-line fr-btn--icon-left">
                                    Label bouton
                                </button>
                            </li>
                            <li>
                                <button class="fr-btn fr-fi-checkbox-circle-line fr-btn--icon-left fr-btn--secondary">
                                    Label bouton
                                </button>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</dialog>

Modal avec zone d'action ancré en haut

Titre de la modale

Lorem ipsum dolor sit amet, consectetur adipiscing, incididunt, ut labore et dolore magna aliqua. Vitae sapien pellentesque habitant morbi tristique senectus et. Diam maecenas sed enim ut. Accumsan lacus vel facilisis volutpat est. Ut aliquam purus sit amet luctus. Lorem ipsum dolor sit amet consectetur adipiscing elit ut.

<button class="fr-btn" data-fr-opened="false" aria-controls="modal-825">
    Modale ancrée en haut
</button>
<dialog id="modal-825" class="fr-modal fr-modal--top" role="dialog" aria-labelledby="modal-825-title">
    <div class="fr-container fr-container--fluid fr-container-md">
        <div class="fr-grid-row fr-grid-row--center">
            <div class="fr-col-12 fr-col-md-8 fr-col-lg-6">
                <div class="fr-modal__body">
                    <div class="fr-modal__header">
                        <button class="fr-link--close fr-link" aria-controls="modal-825">Fermer</button>
                    </div>
                    <div class="fr-modal__content">
                        <h1 id="modal-825-title" class="fr-modal__title">
                            <span class="fr-fi-arrow-right-line fr-fi--lg"></span>
                            Titre de la modale
                        </h1>
                        <p>Lorem [...] elit ut.</p>
                    </div>
                    <div class="fr-modal__footer">
                        <ul class="fr-btns-group fr-btns-group--right fr-btns-group--inline-reverse fr-btns-group--inline-lg fr-btns-group--icon-left">
                            <li>
                                <button class="fr-btn fr-fi-checkbox-circle-line fr-btn--icon-left">
                                    Label bouton
                                </button>
                            </li>
                            <li>
                                <button class="fr-btn fr-fi-checkbox-circle-line fr-btn--icon-left fr-btn--secondary">
                                    Label bouton
                                </button>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</dialog>

Paramètres d’affichage

Choisissez un thème pour personnaliser l’apparence du site.