Skip to content
Razor catalogue

On this page

@addTagHelper *, Webority.Ui.Razor

Default

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.

Default
Show code
<app-row-actions>
    <app-row-action label="Edit" icon="pencil" href="#edit" />
    <app-row-action label="Duplicate" icon="copy" href="#duplicate" />
    <app-row-action label="Delete" icon="trash-2" href="#delete" />
</app-row-actions>

Danger

Use danger only for an action that destroys something.

Danger
Show code
<app-row-actions>
    <app-row-action label="Edit" icon="pencil" href="#edit" />
    <app-row-action label="Delete" icon="trash-2" href="#delete" tone="AppRowActionTone.Danger" />
</app-row-actions>

No icon

An action without an icon is a menu row at every width.

No icon
Show code
<app-row-actions>
    <app-row-action label="Edit" icon="pencil" href="#edit" />
    <app-row-action label="Rename" href="#rename" />
    <app-row-action label="Copy link" href="#copy" />
</app-row-actions>

Show label

From sm up the action is a small labelled button; below sm it is the menu.

Show label
Show code
<app-row-actions>
    <app-row-action label="Approve" icon="tick-circle" href="#approve" show-label="true" />
    <app-row-action label="Reject" icon="close-circle" href="#reject" show-label="true" tone="AppRowActionTone.Danger" />
</app-row-actions>

Disabled with a reason

Say why an action is unavailable; the reason reaches the icon's label and the menu row.

Disabled with a reason
Show code
<app-row-actions>
    <app-row-action label="Edit" icon="pencil" href="#edit" disabled="true" disabled-reason="Locked by the owner" />
    <app-row-action label="Delete" icon="trash-2" href="#delete" tone="AppRowActionTone.Danger" />
</app-row-actions>

Conditional entry

Wrap an entry in a Razor condition to leave it out of the row for some records.

Conditional entry
Show code
<app-row-actions>
    <app-row-action label="Edit" icon="pencil" href="#edit" />
    @if (canArchive)
    {
        <app-row-action label="Archive" icon="box-seam" href="#archive" />
    }
</app-row-actions>

On a phone

Below sm the icon buttons are hidden and the menu is the one control, so every action stays reachable by touch.

The same list, narrow
Show code
<app-row-actions menu-label="More actions for Invoice 104">
    <app-row-action label="Edit" icon="pencil" href="#edit" />
    <app-row-action label="Delete" icon="trash-2" href="#delete" tone="AppRowActionTone.Danger" />
</app-row-actions>

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.

view edit danger
React, generated from the controls
<AppRowActions items={items} />
Razor, the same props
<app-row-actions>
    <app-row-action label="View" icon="eye" href="#view" />
    <app-row-action label="Edit" icon="pencil" href="#edit" />
</app-row-actions>

11 props. The 1 most used come first.

Used on most screens 1 props

PropTypeDefaultDescription
menu-labeldefault More actions string More actions The menu trigger's accessible name and tooltip.

Less common 10 props

PropTypeDefaultDescription
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.