Buttons

FloSports Brand has three button styles; primary, secondary, & over image. In addition the brand has three button sizes; btn-sm, btn, btn-lg.

Button Tags

The .btn classes are designed to be used with the <button> element. However, you can also use these classes on <a> or <input> elements (though some browsers may apply a slightly different rendering).

When using button classes on <a> elements that are used to trigger in-page functionality (like collapsing content), rather than linking to new pages or sections within the current page, these links should be given a role="button" to appropriately convey their purpose to assistive technologies such as screen readers.

Primary

Primary buttons are are Ignite Red with White text.

Link
<button class="btn btn-primary" type="submit">Button</button>
<a class="btn btn-primary" href="#" role="button">Link</a>
<input class="btn btn-primary" type="button" value="Input">
<input class="btn btn-primary" type="submit" value="Submit">
<input class="btn btn-primary" type="reset" value="Reset">

Sizes

Heights are set by adding .btn, .btn-lg or .btn-sm. Small buttons .btn-sm have a height of 32px. Base btns .btn have a height of 40px. Large buttons .btn-lg have a height of 52px. Buttons have min-width of 154px, then have a dynamic width based on character counts and padding. Buttons widths can also be adjusted by adding a .col-span-# (# = 1-12) or by adding .w-100, to take up 100% of the parent element.

Height and Min-width

<button type="button" class="btn btn-sm btn-primary">Small button</button>
<button type="button" class="btn btn-primary">Button</button>
<button type="button" class="btn btn-lg btn-primary">Large button</button>

Width Span Columns

<button type="button" class="btn btn-sm btn-primary col-6">Small button col-6</button>
<button type="button" class="btn btn-primary col-3">Button col-3</button>
<button type="button" class="btn btn-lg btn-primary col-8">Large button co-8</button>

Width Span 100%

<button type="button" class="btn btn-lg btn-primary w-100">Large button w-100</button>

Secondary

Secondary buttons are are White with Ignite Red text.

Link
<button class="btn btn-secondary" type="submit">Button</button>
<a class="btn btn-secondary" href="#" role="button">Link</a>
<input class="btn btn-secondary" type="button" value="Input">
<input class="btn btn-secondary" type="submit" value="Submit">
<input class="btn btn-secondary" type="reset" value="Reset">

Sizes

Heights are set by adding .btn, .btn-lg or .btn-sm. Small buttons .btn-sm have a height of 32px. Base btns .btn have a height of 40px. Large buttons .btn-lg have a height of 52px. Buttons have min-width of 154px, then have a dynamic width based on character counts and padding. Buttons widths can also be adjusted by adding a .col-span-# (# = 1-12) or by adding .w-100, to take up 100% of the parent element.

Height and Min-width

<button type="button" class="btn btn-sm btn-secondary">Small button</button>
<button type="button" class="btn btn-secondary">Button</button>
<button type="button" class="btn btn-lg btn-secondary">Large button</button>

Width Span Columns

<button type="button" class="btn btn-sm btn-secondary col-3">Small button col-3</button>
<button type="button" class="btn btn-secondary col-4">Button col-4</button>
<button type="button" class="btn btn-lg btn-secondary col-4">Large button col-4</button>

Width Span 100%

<button type="button" class="btn btn-secondary w-100">Small button w-100</button>

Over Image

These buttons are used on top of an image. Transparent background with a white border and white text. On hover the background is white and the text is dark.

TODO: Add Outline Button FLO-11207

Sizes

Heights are set by adding .btn, .btn-lg or .btn-sm. Small buttons .btn-sm have a height of 32px. Base btns .btn have a height of 40px. Large buttons .btn-lg have a height of 52px. Buttons have min-width of 154px, then have a dynamic width based on character counts and padding. Buttons widths can also be adjusted by adding a .col-span-# (# = 1-12) or by adding .w-100, to take up 100% of the parent element.

TODO: Add Outline Button FLO-11207

Block Level Buttons

Create block level buttons—those that span the full width of a parent—by adding .btn-block.

<button type="button" class="btn btn-primary btn-lg btn-block">Block level button</button>
<button type="button" class="btn btn-secondary btn-lg btn-block">Block level button</button>

States

Disabled

Make buttons look inactive by adding the disabled boolean attribute to any <button> element.

<button type="button" class="btn btn-lg btn-primary" disabled>Primary button</button>

<button type="button" class="btn btn-secondary btn-lg" disabled>Button</button>

The .disabled class uses pointer-events: none to try to disable the link functionality of <a>s, but that CSS property is not yet standardized. In addition, even in browsers that do support pointer-events: none, keyboard navigation remains unaffected, meaning that sighted keyboard users and users of assistive technologies will still be able to activate these links. So to be safe, add a tabindex="-1" attribute on these links (to prevent them from receiving keyboard focus) and use custom JavaScript to disable their functionality.

Disable text wrapping

If you don’t want the button text to wrap, you can add the .text-nowrap class to the button. In Sass, you can set $btn-white-space: nowrap to disable text wrapping for each button.

Active

Buttons will appear pressed (with a darker background, darker border, and inset shadow) when active. There’s no need to add a class to <button>s as they use a pseudo-class. However, you can still force the same active appearance with .active (and include the aria-pressed="true" attribute) should you need to replicate the state programmatically.

<a href="#" class="btn btn-primary btn-lg active" role="button" aria-pressed="true">Primary link</a>
<a href="#" class="btn btn-secondary btn-lg active" role="button" aria-pressed="true">Link</a>

System Extras

​ Settings inherited from forking Bootstrap 4. These are not part of the design system, yet could be beneficial in the future.

Solid

<button type="button" class="btn btn-primary">Primary</button>
<button type="button" class="btn btn-secondary">Secondary</button>
<button type="button" class="btn btn-success">Success</button>
<button type="button" class="btn btn-danger">Danger</button>
<button type="button" class="btn btn-warning">Warning</button>
<button type="button" class="btn btn-info">Info</button>
<button type="button" class="btn btn-light">Light</button>
<button type="button" class="btn btn-dark">Dark</button>

<button type="button" class="btn btn-link">Link</button>

Outline buttons

In need of a button, but not the hefty background colors they bring? Replace the default modifier classes with the .btn-outline-* ones to remove all background images and colors on any button.

<button type="button" class="btn btn-outline-primary">Primary</button>
<button type="button" class="btn btn-outline-secondary">Secondary</button>
<button type="button" class="btn btn-outline-success">Success</button>
<button type="button" class="btn btn-outline-danger">Danger</button>
<button type="button" class="btn btn-outline-warning">Warning</button>
<button type="button" class="btn btn-outline-info">Info</button>
<button type="button" class="btn btn-outline-light">Light</button>
<button type="button" class="btn btn-outline-dark">Dark</button>

Font-based sizing

<button type="button" class="btn btn-primary display-1 d-block">Display 1 Button</button>
<button type="button" class="btn btn-primary display-2 d-block">Display 2 Button</button>
<button type="button" class="btn btn-primary display-3 d-block">Display 3 Button</button>
<button type="button" class="btn btn-primary btn-lg display-4 d-block">Display 4 Large Button</button>
<button type="button" class="btn btn-primary btn-sm h3 d-block">H3 Small Button</button>