DateTile

A 48 tile with day number and month.

$ npx shadcn@latest add https://mahrdesign.faizintifada.com/r/date-tile.json

Tones and loading

neutral (default: holidays, history, payslip months) · accent (upcoming or waiting only) · today (white + 2px ring) · muted (cancelled or rejected) · loading = a 48 muted square, same size.

25Des30Des17Des3Jul

When to use

  • The leading slot of a date ListRow: leave requests, holidays, payslip months (the payday).
  • Lists sorted by date, where the date is the first thing the user looks for.

When not to use

  • A whole month at once → MonthCalendar.
  • A date inside a sentence or a table cell → plain text "Rabu, 16 Des".
  • A date range → one tile for the first day; the range goes in the row title ("Rabu–Kamis, 30–31 Des").
  • Picking a date → DateField.

Do and don't

DoAccent only for what is still aheadIn "Permintaan saya" the 30 Des request is teal (waiting), the past rows are grey. The eye finds the open item first.
Don'tStatus colours in the tileA green tile for "Disetujui" and a red one for "Ditolak" repeats the Badge and turns a list of dates into a traffic light.

Installation

Add DateTile with the shadcn CLI (your project needs a components.json and the MaHR theme: https://mahrdesign.faizintifada.com/r/theme.json), or copy the files by hand.

terminal
bunx --bun shadcn@latest add https://mahrdesign.faizintifada.com/r/date-tile.json

API

import { DateTile } from "@/components/mahr/date-tile"
PropTypeDefaultDescription
dateDate | string (ISO)–Day 18/20 600 tabular; month 14/16 600 from the closed id-ID list (Jan … Des). aria-label = full date.
tone"neutral" | "accent" | "today" | "muted""neutral"Closed set.
moduleModuleId"cuti"Colours tone="accent" only.
loadingbooleanfalseMuted 48 square, no text.