Canvas Design System
Main Site Tokens

Modal Footer

Standardized left/right button layout for modal footers. Replaces custom footer HTML across 30+ modals.

Two Buttons (Default)

<?= ws_modal_footer([
    'cancel' => ['text' => 'Cancel', 'id' => 'cancelBtn'],
    'primary' => ['text' => 'Export Now', 'id' => 'exportBtn'],
]) ?>

Three Buttons (Left Action)

<?= ws_modal_footer([
    'left' => ['text' => 'Download .ics', 'icon' => 'download',
               'id' => 'downloadBtn', 'variant' => 'ghost'],
    'cancel' => ['text' => 'Cancel', 'id' => 'cancelBtn'],
    'primary' => ['text' => 'Send Invite', 'id' => 'sendBtn', 'icon' => 'send'],
]) ?>

Single Full-Width Button

<?= ws_modal_footer([
    'primary' => ['text' => 'Add Activity', 'id' => 'addBtn', 'fullWidth' => true],
]) ?>

API

ParamTypeDefaultDescription
cancelarraynull{text, id, class}
primaryarraynull{text, id, icon, class, fullWidth}
leftarraynull{text, id, icon, variant, class}
idstringnullFooter element ID