13Buttons

Mostly copied from Foundation except using BEM classes. Not using Foundation padding since it is inflexible and can only be defined in with rem units. Use em padding instead to allow padding to remain consistent with font-size. Buttons may have an icon. When present, the icon is placed on the left hand side of the label text and matches the style and behavior of the button.

.button

.button .button--small

.button .button--disabled

.button .button--secondary

.button .button--secondary .button--small

.button .button--secondary .button--disabled

.button .button--facebook

.button .button--twitter

.button .button--small-expand

.button .button--medium-expand

.search-card__button .sy-rounded-focus

.search-card__button .search-card__button--secondary .sy-rounded-focus

.user-logout .button button--secondary .button--expand

Examples with an icon

.button .button--medium-expand

.button .button--secondary

.button .button--secondary with icon only

Show Markup

<div class="kss-button-box">
    <p>.button</p>
    <button class="button">button</button>
</div>
<div class="kss-button-box">
    <p>.button .button--small</p>
    <button class="button button--small">small button</button>
</div>
<div class="kss-button-box">
    <p>.button .button--disabled</p>
    <button class="button button--disabled">button disabled</button>
</div>
<div class="kss-button-box">
    <p>.button .button--secondary</p>
    <button class="button button--secondary">button</button>
</div>
<div class="kss-button-box">
    <p>.button .button--secondary .button--small</p>
    <button class="button button--secondary button--small">small button</button>
</div>
<div class="kss-button-box">
    <p>.button .button--secondary .button--disabled</p>
    <button class="button button--secondary button--disabled">button disabled</button>
</div>
<div class="kss-button-box">
    <p>.button .button--facebook</p>
    <button class="button button--facebook">
        <svg class="svg-icon svg-icon--white" role="presentation" ><use xlink:href="/static/svg/sprite/symbol/sprite.svg#icon--facebook-sign-in"></use></svg>
        Facebook button
    </button>
</div>
<div class="kss-button-box">
    <p>.button .button--twitter</p>
    <button class="button button--twitter">
        <svg class="svg-icon svg-icon--white" role="presentation" ><use xlink:href="/static/svg/sprite/symbol/sprite.svg#icon--social-twitter"></use></svg>
        Twitter button
    </button>
</div>
<div class="kss-button-box">
    <p>.button .button--small-expand</p>
    <button class="button button--small-expand">button</button>
</div>
<div class="kss-button-box">
    <p>.button .button--medium-expand</p>
    <button class="button button--medium-expand">button</button>
</div>
<div class="kss-button-box">
    <p>.search-card__button .sy-rounded-focus</p>
    <button style="display: inline-block;" class="search-card__button sy-rounded-focus">button</button>
</div>
<div class="kss-button-box">
    <p>.search-card__button .search-card__button--secondary .sy-rounded-focus</p>
    <button style="display: inline-block;" class="search-card__button search-card__button--secondary sy-rounded-focus">
        <svg style="bottom: -2px;" class="svg-icon svg-icon--medium-navy" role="presentation"><use xlink:href="/static/svg/sprite/symbol/sprite.svg#icon--preferences"></use></svg>
        <span>button</span>
    </button>
</div>
<div class="kss-button-box">
    <p>.user-logout .button button--secondary .button--expand</p>
    <button style="display: inline-block;" class="user-logout button button--secondary button--expand test-logout show-for-large">button</button>
</div>

<style type="text/css">
    .btns-example-block {
        display: flex;
    }

    .btns-example-block h5 {
        width: 300px;
    }

    .btns-example-block hr {
        width: 100%;
    }
</style>
<div class="btns-example-block">
    <h5>Examples with an icon</h5>
    <hr>
</div>

<div class="kss-button-box">
    <p>.button .button--medium-expand</p>
    <button class="button button--medium-expand">
        <svg class="svg-icon svg-icon--white svg-icon--small mrh" role="presentation" ><use xlink:href="/static/svg/sprite/symbol/sprite.svg#icon--external"></use></svg>
        Complete Next Steps
    </button>
</div>
<div class="kss-button-box">
    <p>.button .button--secondary</p>
    <button class="button button--secondary">
        <svg class="svg-icon svg-icon--black" role="presentation" ><use xlink:href="/static/svg/sprite/symbol/sprite.svg#icon--filter"></use></svg>
        Filter
    </button>
</div>
<div class="kss-button-box">
    <p>.button .button--secondary with icon only</p>
    <button class="button button--secondary">
        <svg class="svg-icon svg-icon--black" role="presentation" ><use xlink:href="/static/svg/sprite/symbol/sprite.svg#icon--message"></use></svg>
    </button>
</div>



13.1Primary Buttons

Primary buttons carry a strong visual weight and are used for priority actions. The high priority action (primary action) is the easiest to identify—it’s the action that leads directly to the user’s goal. Consequently there should be only one primary button in any given context (on a form, on a page, on a page segment or subform).

13.2Secondary Buttons

Secondary buttons carry less visual weight and are used for secondary actions on a page or component. Use a secondary button for a less significant action.

13.3Mobile Buttons

On mobile resolutions buttons should be used in size small. Additionally, new type of button may be used - icon button which is a button that contains only an icon and no (visible) accompanying text

Examples of search card button group

Examples of regular button group

Show Markup

<div class="btns-example-block">
    <h5>Examples of search card button group</h5>
    <hr>
</div>
<div class="search-card__button-group">
    <button class="search-card__button search-card__button--secondary sy-rounded-focus">
        <svg class="svg-icon svg-icon--deep-medium-navy" role="presentation"><use xlink:href="/static/svg/sprite/symbol/sprite.svg#icon--cancel-circle"></use></svg>
        <span>Decline</span>
    </button>
    <button class="search-card__button sy-rounded-focus">
        <svg class="svg-icon svg-icon--white" role="presentation"><use xlink:href="/static/svg/sprite/symbol/sprite.svg#icon--check-open-circle"></use></svg>
        <span>Enroll</span>
    </button>    
</div>
<div class="btns-example-block">
    <h5>Examples of regular button group</h5>
    <hr>
</div>
<div class="sy-button-group">
    <a href="" class="button ">
        Enroll Your Organization
    </a>
    <span>or</span>
    <a href="" class="button button--secondary">
        Download Info Packet
    </a>
</div>


13.4.1Modal Button Groups

Buttons are placed on the footer of a modal. The buttons are placed side by side on desktop, with the primary button on the right hand side. Buttons stack full width on mobile with the primary button at the bottom and secondary buttons above it.

13.4.2Form/Pane Button Groups

Buttons are placed side by side on forms and panes. The primary button is aligned to the right with secondary buttons aligned to left of the primary button. A secondary button may also be aligned to the left when it is not related to the primary button, e.g., it’s being used for previous/next type navigation which is separate from primary and secondary action on the form. On mobile, form buttons do not stack (but they probably should; this work remains to be done).

13.4.3Button/Link Hierarchy

Buttons and links can be used together on a component in which case the hierarchy of available actions should be represented per the pyramid above where primary button represents the most likely/desired action and secondary link represents the least likely/useful action to take.

buttons-hierarchy
Show Markup

<img class="mb1" src="/styleguide/images/buttons_hierarchy.png" alt="buttons-hierarchy">


13.5Action Buttons

An Action Button lets the user select from a number of items. The button shows the label, leading icon as well as an down arrow that indicates a menu for selecting another item. After user choose an item in a action button’s menu, the menu closes, and the app performs the chosen action.

Show Markup

<head>
    <title></title>
    <style>
      .disabled-hover:hover {
        transform: none;
        transition: none;
      }
    </style>
</head>

<div class="search-card search-card--actions disabled-hover" style="border: none;">
    <div class="search-card__footer--buttons" style="border: none; justify-content: flex-start;">
        <form class="" action="#" method="get">
            <div class="search-card__button-group search-card__button-group--application-actions">
                <div class="search-card__button search-card__button dropdown js-open-dropdown search-card__button--full-width js-click"
                   tabindex="0" data-toggle="drop-application-1780" aria-controls=""
                   data-is-focus="false" data-yeti-box="" aria-haspopup="true"
                   aria-expanded="false" id="dqx2vh-dd-anchor">
                    <svg class="svg-icon svg-icon--white svg-icon--large" role="presentation" aria-hidden="true">
                        <use
                            xlink:href="/static/svg/sprite/symbol/sprite.3ad9c295bfa4.svg#icon--binoculars"></use>
                    </svg>
                    <span class="mrh">Actions</span>
                    <svg class="svg-icon svg-icon--white svg-icon--small" role="presentation" aria-hidden="true">
                        <use
                            xlink:href="/static/svg/sprite/symbol/sprite.3ad9c295bfa4.svg#icon--angle-down"></use>
                    </svg>
                </div>
                <div id="drop-application-1780" class="dropdown-pane shadow has-position-top has-alignment-right"
                     data-position="top" data-alignment="right" data-close-on-click="true" data-dropdown=""
                     aria-labelledby="dqx2vh-dd-anchor" aria-hidden="true" data-yeti-box="drop-application-1780"
                     data-resize="drop-application-1780" data-e="nt0pbn-e" style="top: 97.9843px; left: 997.996px;">
                    <ul class="applications-dropdown">
                        <li class="dropdown-pane__list-item">
                            <a href="/opportunity/applications/1780/" target="_blank" class="view-application">
                                <svg class="svg-icon svg-icon--deep-medium-navy svg-icon--large" role="presentation"
                                     aria-hidden="true">
                                    <use
                                        xlink:href="/static/svg/sprite/symbol/sprite.3ad9c295bfa4.svg#icon--eye"></use>
                                </svg>
                                <span>View Application</span>
                            </a>
                        </li>
                        <li class="dropdown-pane__list-item">
                            <a href="#" class="js-next-steps ga-card-open-next-steps" data-card-index-for-modal="1"
                               data-test="next-steps-button">
                                <svg class="svg-icon svg-icon--deep-medium-navy svg-icon--large" role="presentation"
                                     aria-hidden="true">
                                    <use
                                        xlink:href="/static/svg/sprite/symbol/sprite.3ad9c295bfa4.svg#icon--newspaper"></use>
                                </svg>
                                <span>Next Steps</span>
                            </a>
                        </li>
                        <li class="dropdown-pane__list-item">
                            <a href="/messages/?listing=558&amp;location=applied" class="js-msg-host">
                                <svg class="svg-icon svg-icon--deep-medium-navy svg-icon--large" role="presentation"
                                     aria-hidden="true">
                                    <use
                                        xlink:href="/static/svg/sprite/symbol/sprite.3ad9c295bfa4.svg#icon--message"></use>
                                </svg>
                                <span>Message Host</span>
                            </a>
                        </li>
                        <li class="dropdown-pane__list-item">
                            <a href="#" class="js-cancel-application">
                                <svg class="svg-icon svg-icon--deep-medium-navy svg-icon--large" role="presentation"
                                     aria-hidden="true">
                                    <use
                                        xlink:href="/static/svg/sprite/symbol/sprite.3ad9c295bfa4.svg#icon--cancel-circle"></use>
                                </svg>
                                <span>Cancel Application</span>
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </form>
    </div>
</div>


<script src="/static/js/OpportunitiesApplicationReview.js"></script>


13.6Filter Buttons

Filter buttons are clickable pills that allow a user to drill down more specific content. There are drop-down filter buttons and stand-alone filter buttons. Drop-down filter buttons trigger a drop down with additional options for the user to select from with a submit button. Stand-alone filter buttons activate the filter when selected.

Drop-down Filter Buttons

Stand-alone Filter Buttons

Time Interval Filter Buttons

Last 12 months Last 12 months

Disabled filter buttons

Show Markup

<div id="_filter-button" class="row">
    <div class="columns small-12">
        <h4 class="heading--micro color-deep-medium-navy">Drop-down Filter Buttons</h4>
    </div>
    <div class="columns small-12 filter-button__group filter-button__group--scroll">
        <div class="filter-pills">
            <a tabindex="0" class="button button--rounded filter-button show-for-small-only js-mobile-filters-toggle
                filter-button--active" href="" data-mobiledropdown="filter-dropdown-activelysearchingfilter">
                <span class="tag__label">Actively Searching (1)</span>
                <svg class="svg-icon angle-down svg-icon--small" role="presentation" ><use xlink:href="/static/svg/sprite/symbol/sprite.svg#icon--angle-down"></use></svg>
            </a>
            <a tabindex="0" class="ml0 button button--rounded filter-button show-for-medium filter-button--active"
               data-toggle="filter-dropdown-activelysearchingfilter">
                    <span class="tag__label">Actively Searching (1)</span>
                    <svg class="svg-icon angle-down svg-icon--small" role="presentation" ><use xlink:href="/static/svg/sprite/symbol/sprite.svg#icon--angle-down"></use></svg>
            </a>
            <div class="dropdown-pane"
                 id="filter-dropdown-activelysearchingfilter"
                 data-position="bottom"
                 data-alignment="left"
                 data-close-on-click="true"
                 data-dropdown>
                    <div class="row collapse">
                        <div class="small-12 columns">
                            <form class="mb0">
                                <div class="pane pane--list pane--filter search-pane--filter">
                                    <div class="filter__heading show-for-small-only">
                                        <h2 class="heading--micro left">
                                            Filters
                                        </h2>
                                        <a tabindex="0" class="button--text right js-mobile-filters-toggle mb0 show-for-small-only" data-mobiledropdown="filter-dropdown-activelysearchingfilter">
                                            <svg class="svg-icon svg-icon--black" role="img" ><use xlink:href="/static/svg/sprite/symbol/sprite.svg#icon--close"></use></svg>
                                        </a>
                                        <span class="category-list__clear-all sy-hide hide-for-small-only">
                                            <a class="link--primary" href="">(Clear All)</a>
                                        </span>
                                    </div>
                                    <div class="filter__content pt1 pbh">
                                        <div class="js-category-list-section ">
                                            <div class="category-list__header">
                                                <h4 class="category-list__heading js-expander__toggle cursor-pointer">
                                                    <label for="id_activelysearching_0">Actively Searching</label>
                                                </h4>
                                                <span class="category-list__clear-section">
                                                    <a class="link--primary" href="">(Clear)</a>
                                                </span>
                                            </div>
                                            <ul class="category-list category-list--checkboxes category-list--collapsible ">
                                                <li class="category-list__item">
                                                    <div class="choice-listing">
                                                        <input checked="checked" id="id_activelysearching_0" name="activelysearching" type="radio" value="false">
                                                        <label class="choice-listing__label" for="id_activelysearching_0">
                                                            No
                                                        </label>
                                                    </div>
                                                </li>
                                                <li class="category-list__item">
                                                    <div class="choice-listing">
                                                        <input id="id_activelysearching_1" name="activelysearching" type="radio" value="true">
                                                        <label class="choice-listing__label" for="id_activelysearching_1">
                                                            Yes
                                                        </label>
                                                    </div>
                                                </li>
                                            </ul>
                                        </div>
                                    </div>
                                    <div class="filter__footer">
                                        <input class="button button--primary" type="submit" value="Apply Filter">
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
            </div>

        </div>
        <div class="filter-pills">
            <a class="button button--rounded filter-button show-for-small-only js-mobile-filters-toggle"
                href="" data-mobiledropdown="filter-dropdown-corpsmemberstatusfilter">
                <span class="tag__label">Service Status </span>
                <svg class="svg-icon angle-down svg-icon--small" role="presentation" ><use xlink:href="/static/svg/sprite/symbol/sprite.svg#icon--angle-down"></use></svg>
            </a>
            <a tabindex="0" class="button button--rounded filter-button show-for-medium"
               data-toggle="filter-dropdown-corpsmemberstatusfilter">
                    <span class="tag__label">Service Status </span>
                    <svg class="svg-icon angle-down svg-icon--small" role="presentation" ><use xlink:href="/static/svg/sprite/symbol/sprite.svg#icon--angle-down"></use></svg>
            </a>
            <div class="dropdown-pane"
                 id="filter-dropdown-corpsmemberstatusfilter"
                 data-position="bottom"
                 data-alignment="left"
                 data-close-on-click="true"
                 data-dropdown>
                    <div class="row collapse">
                        <div class="small-12 columns">
                            <form class="mb0">
                                <div class="pane pane--list pane--filter search-pane--filter">
                                    <div class="filter__heading show-for-small-only">
                                        <h2 class="heading--micro left">
                                            Filters
                                        </h2>
                                        <a tabindex="0" class="button--text right js-mobile-filters-toggle mb0 show-for-small-only" data-mobiledropdown="filter-dropdown-corpsmemberstatusfilter">
                                            <svg class="svg-icon svg-icon--black" role="img" ><use xlink:href="/static/svg/sprite/symbol/sprite.svg#icon--close"></use></svg>
                                        </a>
                                        <span class="category-list__clear-all sy-hide hide-for-small-only">
                                            <a class="link--primary" href="">(Clear All)</a>
                                        </span>
                                    </div>
                                    <div class="filter__content pt1 pbh">
                                        <div class="js-category-list-section ">
                                            <div class="category-list__header">
                                                <h4 class="category-list__heading js-expander__toggle cursor-pointer">
                                                    <label for="id_corpsmemberstatus_0">Service Status</label>
                                                </h4>
                                                <span class="category-list__clear-section sy-hide">
                                                    <a class="link--primary" href="">(Clear)</a>
                                                </span>
                                            </div>
                                            <ul class="category-list category-list--checkboxes category-list--collapsible ">
                                                <li class="category-list__item">
                                                    <div class="choice-listing">
                                                        <input id="id_corpsmemberstatus_0" name="corpsmemberstatus" type="checkbox" value="served">
                                                        <label class="choice-listing__label" for="id_corpsmemberstatus_0">
                                                            Served
                                                        </label>
                                                    </div>
                                                </li>
                                                <li class="category-list__item">
                                                    <div class="choice-listing">
                                                        <input id="id_corpsmemberstatus_1" name="corpsmemberstatus" type="checkbox" value="serving">
                                                        <label class="choice-listing__label" for="id_corpsmemberstatus_1">
                                                            Serving
                                                        </label>
                                                    </div>
                                                </li>
                                            </ul>
                                        </div>
                                    </div>
                                    <div class="filter__footer">
                                        <input class="button button--primary" type="submit" value="Apply Filter">
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
        </div>
    </div>
    <div class="columns small-12">
        <h4 class="heading--micro color-deep-medium-navy">Stand-alone Filter Buttons</h4>
    </div>
    <div class="columns small-12 mb1">
        <a class="button button--rounded filter-button--thin js-location-button ga-location-pill filter-button--active ml0" href="#">Washington, DC</a>
        <a class="button button--rounded filter-button--thin js-location-button ga-location-pill" href="#">Los Angeles, CA</a>
    </div>
    <div class="columns small-12">
        <h4 class="heading--micro color-deep-medium-navy">Time Interval Filter Buttons</h4>
    </div>
    <div id="data-analytics-filters" class="columns small-12 filter-button__group filter-button__group--scroll">
        <div class="filter-pills">
            <a class="button button--rounded filter-button show-for-small-only js-mobile-filters-toggle filter-button--active"
                href="" data-mobiledropdown="filter-dropdown-timeinterval">
                <span class="tag__label">Last 12 months</span>
                <svg class="svg-icon angle-down svg-icon--small" role="presentation" ><use xlink:href="/static/svg/sprite/symbol/sprite.svg#icon--angle-down"></use></svg>
            </a>
            <a tabindex="0" class="ml0 button button--rounded filter-button show-for-medium filter-button--active"
               data-toggle="filter-dropdown-timeinterval">
                    <span class="tag__label">Last 12 months</span>
                    <svg class="svg-icon angle-down svg-icon--small" role="presentation" ><use xlink:href="/static/svg/sprite/symbol/sprite.svg#icon--angle-down"></use></svg>
            </a>
            <div class="dropdown-pane"
                 id="filter-dropdown-timeinterval"
                 data-position="bottom"
                 data-alignment="left"
                 data-close-on-click="true"
                 data-dropdown>
                    <div class="row collapse">
                        <div class="small-12 columns">
                            <form class="mb0">
                                <div class="pane pane--list pane--filter search-pane--filter">
                                    <div class="filter__heading show-for-small-only">
                                        <h2 class="heading--micro left">
                                            Filters
                                        </h2>
                                        <a tabindex="0" class="button--text right js-mobile-filters-toggle mb0 show-for-small-only" data-mobiledropdown="filter-dropdown-timeinterval">
                                            <svg class="svg-icon svg-icon--black" role="img" ><use xlink:href="/static/svg/sprite/symbol/sprite.svg#icon--close"></use></svg>
                                        </a>
                                        <span class="category-list__clear-all sy-hide hide-for-small-only">
                                            <a class="link--primary" href="">(Clear All)</a>
                                        </span>
                                    </div>
                                    <div class="filter__content pt1 pbh">
                                        <div class="data-analytics-time_units mb2">
                                            <div class="js-category-list-section ">
                                                <div class="category-list__header">
                                                    <h4 class="category-list__heading js-expander__toggle cursor-pointer">
                                                        <label for="id_corpsmemberstatus_0">Time Units</label>
                                                    </h4>
                                                    <span class="category-list__clear-section sy-hide">
                                                        <a class="link--primary" href="">(Clear)</a>
                                                    </span>
                                                </div>
                                                <ul class="category-list category-list--checkboxes category-list--collapsible ">
                                                    <li class="category-list__item">
                                                        <div class="choice-listing">
                                                            <input id="id_months" name="units" type="radio" value="months" checked>
                                                            <label class="choice-listing__label" for="id_months">
                                                                Months
                                                            </label>
                                                        </div>
                                                    </li>
                                                    <li class="category-list__item">
                                                        <div class="choice-listing">
                                                            <input id="id_years" name="units" type="radio" value="years">
                                                            <label class="choice-listing__label" for="id_years">
                                                                Years
                                                            </label>
                                                        </div>
                                                    </li>
                                                </ul>
                                            </div>
                                        </div>
                                        <div class="js-category-list-section">
                                            <div class="category-list__header">
                                                <h4 class="category-list__heading js-expander__toggle cursor-pointer">
                                                    <label for="id_date_range">Date Range</label>
                                                </h4>
                                                <span class="category-list__clear-section sy-hide" style="display: none;">
                                                    <a class="link--primary" tabindex="-1" href="">(Clear)</a>
                                                </span>
                                            </div>
                                            <div class="mt1 mb1">
                                                <select disabled id="id_date_range" class="pr2 mb0 analytics-filter" name="date_range" required>
                                                        <option value="last_12_months" selected>Last 12 months</option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="filter__footer">
                                        <input class="button button--primary" type="submit" value="Apply Filter">
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    <div class="columns small-12">
        <h4 class="heading--micro color-deep-medium-navy">Disabled filter buttons</h4>
    </div>
    <div class="filter-pills__main-container">
        <div class="filter-pills__pills-container filter-button__group filter-button__group--scroll">
                <div class="filter-pills js-anchor mbh" data-anchor-point="tab-nav">
                    <a disabled class="button button--rounded filter-button show-for-small-only js-mobile-filters-toggle">
                        <span class="tag__label">Last 12 Months </span>
                        <svg class="svg-icon angle-down svg-icon--small" role="presentation" aria-hidden="true"><use xlink:href="/static/svg/sprite/symbol/sprite.svg#icon--angle-down"></use></svg>
                    </a>
                    <a disabled class="button button--rounded filter-button show-for-medium js-click">
                        <span class="tag__label" aria-hidden="true">Last 12 Months </span>
                        <span class="show-for-sr">Last 12 Months </span>
                        <svg class="svg-icon angle-down svg-icon--small" role="presentation" aria-hidden="true"><use xlink:href="/static/svg/sprite/symbol/sprite.svg#icon--angle-down"></use></svg>
                    </a>
                </div>
        </div>
    </div>
</div>