Row Button¶
A low emphasis icon button for table and list rows.
Decision¶
| When | Use |
|---|---|
| The edit, save, and copy actions in a row | Row Button |
| An action with a label | Button |
Usage¶
<button type="button" class="stolon-row-btn" title="Edit"><span class="material-icons">edit</span></button>
Classes: stolon-row-btn, stolon-row-arrows.
States and Modifiers¶
saveturns the icon accent on hover.destructiveturns the icon red on hover, for a button that deletes.successforces the success color and full opacity.dirtyforces the warning color and full opacity, for an unsaved change on the row.movemarks an up or down arrow and draws its chevron at the secondary chevron size.stolon-row-arrowsholds a pair of them side by side at the end of a row.- A disabled row button fades and loses its hover.
Gotchas¶
- Give an icon only button a
titleoraria-label. - Stolon builds the move arrows of the Ordered List, the Sortable Card List, and the Repeater from it, as well as the close button of a Dialog, the icon of a Help Hint, the clear button of a Search Field, and the copy button of a Copy Field.
Reference¶
Generated from the code by scripts/build-docs.mjs. Edit the code, not this section.
| Class | What it looks like |
|---|---|
stolon-row-btn |
Low emphasis icon button for table and list rows, with save, success, and dirty states |
stolon-row-btn.stolon-destructive |
A row button that destroys data, red on hover, as the destructive button variant |
stolon-row-btn.stolon-move |
Up or down row button that moves its row, with a secondary chevron |
stolon-row-arrows |
Up and down row buttons side by side at the end of a row |
Example¶
Example Code¶
<!-- title: Row Button -->
<div style="display: flex; gap: 8px; align-items: center;">
<button type="button" class="stolon-row-btn" title="Edit"><span class="material-icons">edit</span></button>
<button type="button" class="stolon-row-btn stolon-save" title="Save"><span class="material-icons">save</span></button>
<button type="button" class="stolon-row-btn stolon-success" title="Saved"><span class="material-icons">check</span></button>
<button type="button" class="stolon-row-btn stolon-dirty" title="Unsaved change"><span class="material-icons">save</span></button>
</div>