Origami Frontend Components & Services

Readme: o-ft-buttons

o-ft-buttons has a support status of "dead". This means that there are no plans to fix any issues with this component, and it may stop working at any point. More information on the status of this component is available in the README. If you still rely on this component or have concerns, please contact the Origami team.

This module is now deprecated, please use o-buttons instead.


Standard FT-branded buttons.

Buttons come in four themes:

and two sizes:

and have 6 different states:

Button width is determined by its content.

Browser support

The following browser features are used but will degrade gracefully:

Mixins

Various Sass mixins are provided to obtain styles for buttons in all their states and variants. Also, when $o-ft-buttons-is-silent: false;, the module outputs a set of classes that are also documented in each section.

Default button

These are the base styles that must be called in addition to any of the other mixins listed below.

Example Sass:

.my-button-class {
    @include oFtButtons();
}

Example HTML:

<button class="my-button-class">Standard</button>

Silent mode off: .o-ft-buttons

Grouped buttons

Include grouped button styles. It accepts one argument:
- Base buttons class

Example Sass:

.my-button-group-class {
    @include oFtButtonsGroup(my-button-class);
}

Example HTML:

<div class="my-button-group-class">
    <button class="my-button-class">John</button><!--
 --><button class="my-button-class">Paul</button><!--
 --><button class="my-button-class">George</button><!--
 --><button class="my-button-class">Ringo</button>
</div>

Silent mode off: .o-ft-buttons-group

Pagination buttons

Include pagination buttons styles. It accepts one argument:
- Base buttons class

Example Sass:

.my-button-pagination-class {
    @include oFtButtonsPagination(my-button-class);
}

Example HTML:

<div class="my-button-pagination-class">
    <button class="my-button-class">1</button><!--
 --><button class="my-button-class">2</button><!--
 --><button class="my-button-class">3</button><!--
 --><button class="my-button-class">4</button>
</div>

Silent mode off: .o-ft-buttons-pagination

Big button modifier

Include the big button styles.

Example Sass:

.my-button-class--big {
    @include oFtButtonsSize(big);
}

Example HTML:

<button class="my-button-class my-button-class--big">Big button</button>

Silent mode off: .o-ft-buttons--big

'Standout' button modifier

Include the standout button styles.

Example Sass:

.my-button-class--standout {
    @include oFtButtonsTheme(standout);
}

Example HTML:

<button class="my-button-class my-button-class--standout">Standout button</button>

Silent mode off: .o-ft-buttons--standout

'Inverse' button modifier

Include the inverse button styles.

Example Sass:

.my-button-class--inverse {
    @include oFtButtonsTheme(inverse);
}

Example HTML:

<button class="my-button-class my-button-class--inverse">Inverse button</button>

Silent mode off: .o-ft-buttons--inverse

'Uncolored' button modifier

Include the uncolored button styles.

Example Sass:

.my-button-class--uncolored {
    @include oFtButtonsTheme(uncolored);
}

Example HTML:

<button class="my-button-class my-button-class--uncolored">Uncolored button</button>

Silent mode off: .o-ft-buttons--inverse

Deprecated

The --faux modifier is now deprecated and will be removed in next major release.
The .o-ft-buttons__pagination wasn't following the BEM convention properly and will be removed in next major release. Use ..o-ft-buttons-pagination instead.
The .o-ft-buttons__group wasn't following the BEM convention properly and will be removed in next major release. Use .o-ft-buttons-group instead.

Icons for use in buttons

This is now deprecated and will be removed in next major release

Status
dead Origami v1 (Bower)
Switch component view

GitHub: o-ft-buttons

Install o-ft-buttons

If using the Build Service, add o-ft-buttons@^1.7.8 to your link tag.

If using the npm package manager for a Manual Build, run npm install --save-peer "@financial-times/o-ft-buttons@^1.7.8".

Help & Support

o-ft-buttons is maintained directly by the Origami team. If you have any questions about o-ft-buttons or Origami in general, we are happy to help. 😊

Slack: #ft-origami
Email: origami.support@ft.com

Feedback / Issues

To report a bug or request features please create an issue on Github. For support or general feedback please get in touch 😊

Slack: #ft-origami
Email: origami.support@ft.com