Skip to content

Checkbox Card

Get Ritla UI

A list row chosen with a checkbox, with an icon or picture at the start, a headline and supporting text. The whole row is clickable.

Ritla scan of this preview: 41 of 41 checks3 breakpointsScanned

Open in Figma

Preview

Mirrored is the same English content laid out right to left: it separates a mirroring bug from a translation one.

PreviewCode
EnglishMirroredArabic
LTR →

Installation

  1. Add the component

    npx ritla add checkbox-card

    Also works with shadcn: npx shadcn@latest add @ritla/checkbox-card

  2. Or copy by hand

    Installing by hand copies the component's source into your project. The source comes with a Ritla UI license, so the CLI is the short way to the same files.

Usage

checkbox-card.tsx
import { CheckboxCard } from "@/components/ui/checkbox-card";<CheckboxCard leading={CreditCardIcon} description="Ending 4242" trailingText="SAR 2,450">Everyday card</CheckboxCard>

Examples

Box at the start, disabled

leading="checkbox" puts the box at the start; disabled grays out the whole row.

EnglishMirroredArabic
LTR →

API reference

CheckboxCard

Also takes Checkbox's value and state props.

PropTypeDefaultDescription
childrenReactNodeNoneFigma's Headline.
overline / description / trailingTextReactNodeNoneFigma's Overline, Supporting text and Trailing text.
leadingIconComponent | ReactNode | "checkbox"NoneFigma's Leading type: an icon, a node (avatar or image), or checkbox to put the box at the start.

Accessibility

Keyboard

Keys are written for left-to-right. In right-to-left the arrow keys swap: the one pointing toward the reading direction moves forward.

KeyAction
TabSpaceTab to the box; Space toggles.

ARIA

  • The box is named by the headline and linked to the supporting text; the whole row is a <label>.
  • Focus tints the row and shows the focus ring around the box.

Arabic and RTL notes

Mirrors

  • The icon sits at the start (the right), the box at the end (the left).

Does not mirror

  • Non-directional icons and the check don't mirror.
Numerals
Amounts in the trailing text follow numerals through formatNumber.
Arabic typography
The headline is body-16 Medium; the overline and trailing text are label-12 (14px under Arabic), the supporting text body-12 (also 14px under Arabic).

Checks it passes

The Ritla checks this component satisfies by construction. Used as documented, it does not bring these defects onto your page.

  • R050Arabic text falling back past the declared font family (measured, declared, or a webfont that failed to load)
  • R051letter-spacing applied to Arabic text (breaks the connected script)
  • R042Clipped text: content wider than its box with overflow hidden and no ellipsis
  • R043Fixed-pixel-width container whose Arabic text exceeds the space