Skip to content

RowMenu

The "⋯" of a row or a record: its everyday actions without opening it, destructive ones last and in red. A press on it never opens the row.

Language
Appearance

In a list row

Ana Torres · +57 300 555 0101
import { PencilSimpleIcon, PhoneIcon, ProhibitIcon, WhatsappLogoIcon } from '@phosphor-icons/react';
import { RowMenu } from '@arbol-ai/ui';

<div className="rounded-card flex max-w-md items-center justify-between border px-4 py-2">
  <span className="text-sm">Ana Torres · +57 300 555 0101</span>
  <RowMenu
    actions={[
      { label: 'Edit', icon: <PencilSimpleIcon /> },
      { label: 'Call', icon: <PhoneIcon />, href: 'tel:+573005550101' },
      {
        label: 'WhatsApp',
        icon: <WhatsappLogoIcon />,
        href: 'https://wa.me/573005550101',
        target: '_blank',
      },
      { label: 'Deactivate', icon: <ProhibitIcon />, isDestructive: true },
    ]}
    label="Actions for Ana Torres"
  />
</div>

Source

The examples above are src/components/row-menu/row-menu.examples.tsx, which the library’s tests render too.

Type to search…

↑↓ navigate↵ selectEsc close