On this page
@addTagHelper *, Webority.Ui.RazorDefault
One list of actions at the end of a row. From sm up each icon is a button; below sm the same actions move into one menu.
Danger
Use danger only for an action that destroys something.
No icon
An action without an icon is a menu row at every width.
Show label
From sm up the action is a small labelled button; below sm it is the menu.
Disabled with a reason
Say why an action is unavailable; the reason reaches the icon's label and the menu row.
Links
An action with href is a plain link on both the icon button and the menu row.
Conditional entry
Wrap an entry in a Razor condition to leave it out of the row for some records.
On a phone
Below sm the icon buttons are hidden and the menu is the one control, so every action stays reachable by touch.
Guidance
What to do, and what to avoid.
Use it when
- The actions at the end of a table or list row, one list that shows as icon buttons from sm up and as one menu on a phone.
Reach for something else when
- A menu that is not a row's own actions. → AppDropdown
- Bulk actions on the selected rows. → AppTableToolbar
Reference
Try every prop, read the full list, and check keyboard and screen reader behaviour.
11 props. The 1 most used come first.
Used on most screens 1 props
| Prop | Type | Default | Description |
|---|---|---|---|
| menu-labeldefault More actions | string | More actions | The menu trigger's accessible name and tooltip. |
Less common 10 props
| Prop | Type | Default | Description |
|---|---|---|---|
| labeldefault - | string | - | The action's accessible name and tooltip, and the menu row's text. Required. |
| icondefault - | string | - | A library icon name. Without it (and without show-label) the action is a menu row at every width. |
| icon-variantdefault linear | linear | outline | bold | bulk | broken | twotone | linear | The iconsax style of the inline icon; the menu row draws the linear glyph. |
| hrefdefault - | string | - | A plain link. Razor has no router link: pass the route as href. |
| tonedefault - | AppRowActionTone.Danger | - | Marks a destructive action in both the inline control and the menu row. |
| disableddefault false | bool | false | Disables the action in both the inline control and the menu row. |
| disabled-reasondefault - | string | - | Why the action is disabled: joined to the label as "Label: reason". Needs disabled. |
| menu-onlydefault false | bool | false | Keeps the action in the menu at every width. Not with show-label. |
| show-labeldefault false | bool | false | From sm up, draws the action as a small labelled button instead of an icon button. |
| menu-label (on app-row-actions)default More actions | string | More actions | The menu trigger's accessible name and tooltip. |
Screen reader
3 notes- Each icon button is named by its label and shows it as a tooltip; a disabled one names its disabledReason too.
- The menu trigger is named by menuLabel; Enter or Space opens the menu, arrows move through its rows, and Escape closes it and returns focus to the trigger.
- Below sm only the menu is shown, so every action is reachable by a touch target and by the keyboard.