Modus UI

Ledger Row

Web (React)

A list row that glides aside on a swipe to reveal a drawer of actions, set like an entry in a printed ledger.

Card-coloured rows with serif copy and mono action labels sit on the paper; the drawer is a muted tone and the action takes the theme's primary ink. Swipe past the commit point to fire the first action outright.

Modus / Ledger Row

Installation

CLI

npx @modus-ui/cli add glide-ledger-row

Manual

  1. Copy the code from the component tab.
  2. Create a file at components/ui/glide-ledger-row.tsx.
  3. Paste the code.

Usage

tsx
import { GlideLedgerRow } from "@/components/ui/glide-ledger-row";

export default function Example() {
  return (
    <GlideLedgerRow label="Folio 12">
      <span className="px-4 font-serif">Proof returned with notes</span>
    </GlideLedgerRow>
  );
}

Props

PropTypeDefaultDescription
childrenany--
actionsanyDEFAULT_ACTIONS-
actionColorstring"hsl(var(--primary))"-
drawerColorstring"hsl(var(--muted))"-
rowColorstring"hsl(var(--card))"-
textColorstring"hsl(var(--foreground))"-
heightnumber64-
radiusnumber16-
actionWidthnumber80-
directionstring"left"-
snapBouncenumber0.2-
resistancenumber0.55-
collapseMsnumber200-
commitAtnumber0.6-
fullSwipebooleantrue-
disabledbooleanfalse-
openany--
onOpenChangeany--
onActionany--
onCommitany--
closeOnActionbooleantrue-
hapticbooleantrue-
labelstring"Ledger entry"-
styleany--

Comments

  • No comments yet.