Skip to content

Goal Tile

Beta
Get Ritla UI

A savings goal in a two-column grid: icon, name, saved of target and a progress bar.

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 goal-tile

    Also works with shadcn: npx shadcn@latest add @ritla/goal-tile

  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

goal-tile.tsx
import { GoalTile } from "@/components/ui/goal-tile";<GoalTile name="Dream car" detail="JOD 12,567 of 25,000" progress={50} progressLabel="50% saved" />

API reference

GoalTile

PropTypeDefaultDescription
name / detailReactNodeNoneThe goal and saved of target.
progressnumberNone0 to 100.
progressLabelstringNoneThe progress in words.
iconIconComponentTargetIconThe icon in the chip.
hrefstringNoneMakes the whole tile a link.

Accessibility

ARIA

  • The bar is a progress bar named by progressLabel.

Arabic and RTL notes

Mirrors

  • Content and the bar's fill start from the right.

Does not mirror

  • Amounts in the detail stay as the app writes them.
Numerals
Figures the app formats (prices, balances) arrive as text; the component keeps them left to right with <bdi dir="ltr">.
Arabic typography
label-14 Semibold name, body-12 detail.