Skip to content

Promo Card

Beta
Get Ritla UI

One offer or nudge with a title, one line, a link and art; at most one per screen.

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 promo-card

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

  2. Dependencies it brings

    @phosphor-icons/react

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

promo-card.tsx
import { PromoCard } from "@/components/ui/promo-card";<PromoCard variant="tint" title="Invite a friend" description="You both get JOD 5 when they open an account." action={{ label: "Invite now", href: "/invite" }} />

Examples

Dashboard sidebar

EnglishMirroredArabic
LTR →

API reference

PromoCard

PropTypeDefaultDescription
variant"light" | "dark" | "tint""light"Figma's Style.
title / descriptionReactNodeNoneThe offer and one line.
action{ label, href }NoneThe link.
artReactNodeNoneThe 88px art at the end.
headingLevel2 | 3 | 42The title's heading level.

Accessibility

ARIA

  • An aside, so it reads as secondary to the page.
  • The art is decorative.

Arabic and RTL notes

Mirrors

  • Text on the right, art on the left; the link arrow points left.

Does not mirror

  • Art you pass in keeps its own rules.
Numerals
Amounts in the copy are the app's text.
Arabic typography
label-16 Semibold title, body-12 line, label-14 Medium link.