Interface de contrôle des tests
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-775" id="modal-775" title="Modal simple">
    Modal simple
</button>
<dialog id="modal-775" class="fr-modal" role="dialog" aria-labelledby="modal-775-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-775">Fermer</button>
                    </div>
                    <div class="fr-modal__content">
                        <h1 id="modal-775-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-778" id="modal-778" title="Modal SM">
    Modal SM
</button>
<dialog id="modal-778" class="fr-modal" role="dialog" aria-labelledby="modal-778-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-778">Fermer</button>
                    </div>
                    <div class="fr-modal__content">
                        <h1 id="modal-778-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-781" id="modal-781" title="Modal LG">
    Modal LG
</button>
<dialog id="modal-781" class="fr-modal" role="dialog" aria-labelledby="modal-781-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-781">Fermer</button>
                    </div>
                    <div class="fr-modal__content">
                        <h1 id="modal-781-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-784" id="modal-784" title="Modal formulaire">
    Modal formulaire
</button>
<dialog id="modal-784" class="fr-modal" role="dialog" aria-labelledby="modal-784-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-784">Fermer</button>
                    </div>
                    <div class="fr-modal__content">
                        <h1 id="modal-784-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" id="modal-784" title="Modal formulaire">
                                Modal formulaire
                            </button>
                        </form>
                    </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-787" id="modal-787" title="Modale avec zone d'action">
    Modale avec zone d&#39;action
</button>
<dialog id="modal-787" class="fr-modal" role="dialog" aria-labelledby="modal-787-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-787">Fermer</button>
                    </div>
                    <div class="fr-modal__content">
                        <h1 id="modal-787-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" id="modal-787" title="Label bouton">
                                    Label bouton
                                </button>
                            </li>
                            <li>
                                <button class="fr-btn fr-fi-checkbox-circle-line fr-btn fr-fi-checkbox-circle-line fr-btn--secondary" id="modal-787" title="Label bouton">
                                    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-790" id="modal-790" title="Modale ancrée en haut">
    Modale ancrée en haut
</button>
<dialog id="modal-790" class="fr-modal fr-modal--top" role="dialog" aria-labelledby="modal-790-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-790">Fermer</button>
                    </div>
                    <div class="fr-modal__content">
                        <h1 id="modal-790-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" id="modal-790" title="Label bouton">
                                    Label bouton
                                </button>
                            </li>
                            <li>
                                <button class="fr-btn fr-fi-checkbox-circle-line fr-btn fr-fi-checkbox-circle-line fr-btn--secondary" id="modal-790" title="Label bouton">
                                    Label bouton
                                </button>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</dialog>