Buttons
Group buttons in menus to unlock advanced layout options.
Assign data-ts="Buttons"
attribute to a menu
to initialize it as a
Buttons menu.
When in menus, buttons stack vertically and stretch to fill the width. You can omit the
ts-button
attribute on buttons, it is implied. You can also
omit the ts-tertiary
classname on the buttons, it is
assumed by default.
Button layouts
The menu
can be assigned a classname to layout the buttons horizontally.
The classname ts-t-t
indicates that two buttons should both display text
instead of icons. If you add both, the layout will take care of hiding one or the other. A
special classname ts-join
has been added to join the buttons together. We
support the following permutations.
This implementation is likely to be refactored
for more flexibility, so the
following list of classnames may become deprecated in the future.
The classname shown on buttons should in all cases go on the
menu
element (and not on the button
elements).
If you find a bug or need a feature…