For most buttons, use the btn class. Its light background has cDL05 text, mixed from 95% cDark and 5% cLight to
match Infinipose's plus icons. Add primary for an accent background with cAD90 text, mixed from 90% cDark and
10% cAcc to match its import and export icons.
Two Joined Buttons
Wrap two ordinary btn buttons in a btn-split container. Each half runs its own action and can contain text, an
icon or both. This uses the same shape, separator and interaction styling as SplitButton, with no component or
context-menu root required. Omit either Icon below for a text-only action.
No action selected
Use the same variant on both buttons: btn, btn primary or btn dark. Add box-btn to both for less rounded
corners. Both labels can wrap on narrow screens. Disabled and loading states belong to each button
independently. Use type="button" unless an action should submit a form. Tab reaches each enabled action, and
Enter or Space activates it. With text and an icon, place Icon directly inside the button and wrap the text in a
span.
Split Buttons
The main button runs the default action. Click the down arrow or right-click either half to open options
anchored to the whole button. Both halves use the same normal, primary or dark styling, with a separator between
them. Tab reaches each action separately; Enter or Space activates it.
Mount one CtxMenuRoot in your app layout. SplitButton takes the same menu configuration as other context menus,
plus a menuLabel for the arrow's accessible name. Use disabled or loading to block both halves. Popup footer
buttons support this through their menu option; see Popups.
No action selected
Icon Buttons
Or you can also use it in combination with an icon. Jhana will auto-detect
any direct svg or img child. Icon follows the button's text color by default, including primary buttons and
hover/focus states. Set color only when the icon needs a different color. In case you need an only-icon no-text
button, you should add the icon class.
Spinner Buttons
To indicate progress, wrap a Spinner in an empty container inside the button. Use a fields grid and put the
button group in a field-accessory to center it beside the input itself. Labels and hints occupy separate rows;
see Layout and Fields for the shared alignment convention.
1000ms
Action Buttons
Set label once: it names the icon button for assistive technology and supplies its Jhana tooltip. Help appears
after 800 ms on hover, immediately on keyboard focus, or on a native touch long press. A normal click or tap
runs the action. An optional title replaces the tooltip text; it does not create a native browser tooltip. Use
an empty title to disable the automatic tooltip. See Help and Tooltips for a
working action example. Disabled buttons keep their muted appearance on hover and press.