Tally UI

CartLineActions

Action buttons overlay for cart line items such as remove or edit

Import

import { CartLineActions } from '@tallyui/components';

Usage

<CartLineActions
  actions={[
    { id: 'remove', label: 'Remove', onPress: () => handleRemove() },
  ]}
>
  <CartLine item={item} />
</CartLineActions>

Wraps any cart line content and renders a row of action buttons alongside it. Each action gets a pressable button with a label and optional icon slot.

Props

PropTypeDefaultDescription
childrenReactNoderequiredCart line content to wrap
actionsCartAction[]requiredArray of action button definitions
classNamestringOverride container styles

CartAction

interface CartAction {
  id: string;
  label: string;
  onPress: () => void;
  color?: string;      // Text color class (defaults to 'text-danger')
  iconSlot?: ReactNode; // Optional icon before the label
}

Live demo

On this page