Skip to content
العربية
182 pages

All components

Every component on one page, with its first example. Open a name for all its examples and the code.

Brand 4

Mark

The flat % mark. Never mirror, shade or redraw it. Decorative unless it has a label.

icon
en
ar
icon-en
icon-ar
row
stack
Logo

The logo in 7 versions, from one geometry. Icon at the reading start; use icon + the page language in headers. Never redraw it.

1,250

48,000

RiyalSign

The Saudi riyal sign (SAMA), drawn as SVG because fonts do not have it yet. Use Money for amounts.

Made in KSA
MadeInKsa

“Made in KSA” with the flag, in the page language.

Text 11

We build

Software studio

Design. Build. Run.

Display

Large page and section titles. Arabic gets weight 700, no negative tracking and a taller line by itself; do not add leading-* or tracking-*.

Heading level 1

Heading level 2

Heading level 3

Heading level 4

Heading level 5
Heading level 6
Heading

Headings h1–h6. level sets the element, size can change the look without changing the outline.

Percent designs and builds software for companies in Saudi Arabia.

Percent designs and builds software for companies in Saudi Arabia.

Percent designs and builds software for companies in Saudi Arabia.

Percent designs and builds software for companies in Saudi Arabia.

The shift state could not be read.

Text

Body text in four sizes and three tones (fg, fg-2, fg-3). All tones pass WCAG AA. tone="danger" is the state colour for a shortfall or a refused state shown as a coloured value or line, not a box.

Selected work
Label

Small section label: mono and upper case in English, plain in Arabic.

Run bun test or press ⌘ K

Code, Kbd

Inline code and keys. Always left to right, also inside Arabic text.

They shipped the first version in six weeks.
Client, logistics company
Blockquote

A quote with an optional source.

What we collect

We keep only what you send through the form. Read your rights.

  • Name and email
  • Your message
Prose

Styles rich text (privacy pages, case studies): headings, lists, links, code.

Results for design

Highlight

Inverted text for search matches.

ExpandableText

A long text, for example an error, cut at one line (lines). A click, a tap, Enter or Space opens the full text and details. A text that fits stays plain text. With open and onOpenChange the parent controls it, so another control can open it.

1,250,0001.3M42%
FormattedNumber

Numbers with Western digits in both languages; compact units in words in Arabic.

Layout 11

Container size="sm"
Container

Page width and the page gutter (5vw).

Section with small spacing
Section

A page section with vertical spacing in three sizes.

1
2
3
1
2
3
Stack, Inline

Vertical and wrapping horizontal groups with a gap from the spacing scale.

1
2
3
4
5
6
min 10rem
min 10rem
min 10rem
min 10rem
min 10rem
Grid

Fixed columns from 768 px, or as many columns of a minimum width as fit. masonry: each child moves up into the free space of its column, so cards of very different heights (a long details card, a short refunds card) leave no gaps between rows. The reading and tab order stay the DOM order. The server renders a normal grid; the browser measures the children after mount, so use gap (not margins) for the space.

5
7
Split

Two columns from 768 px, stacked on phones.

Main: lines, history
Notes
DetailLayout

A record page: the main column (lines, history) and a side column (customer, totals) at 2:1 from 768 px, and one column on phones with the main column first. A wide table scrolls inside its column and never makes the page wider. sideLabel names the side column for screen readers.

Above

Start

End

Separator

A 1 px line, horizontal or vertical.

Item 1

Item 2

Item 3

Item 4

Item 5

Item 6

Item 7

Item 8

Item 9

Item 10

Item 11

Item 12

Item 13

Item 14

Item 15

Item 16

Item 17

Item 18

Item 19

Item 20

ScrollArea

A scrolling box with thin scroll bars in the Percent style.

surface
raised
outline
Surface

Card background: surface, raised or outline, with the radius tokens.

Inside the gutter
Full width
Bleed

Full width inside a Container: cancels the page gutter.

Actions 6

Button

Primary (one per view), secondary, ghost, danger and link. Loading keeps the width. Icon-only buttons need aria-label (a type error without it). size="sm" (and the small icon button, Toggle, SegmentedControl items, the NumberInput step buttons and menu rows) follows --p-control-h-xs: 32 px as before, and 44 px inside data-density="touch" on a touch screen. blocked keeps the button visible but refuses the press, and shows the reason on hover, focus and tap.

ButtonGroup

Related buttons in a labelled group.

Toggle

An on/off button (aria-pressed).

SegmentedControl, ToggleGroup

One choice that is always set (SegmentedControl), or several on/off choices (ToggleGroup). In SegmentedControl the fill slides to the chosen option (no slide with reduced motion). wrap lets the options go to more rows when the row is too narrow, for a filter with many options on a phone. The fill moves to the chosen option on any row.

SA03 8000 0000 6080 1016 7519
CopyButton

Copies a value and announces “Copied”. label replaces “Copy” as the text, or as the name of an icon-only button (“Copy host”).

Forms 19

As on your ID

Enter a valid email address.

Optional
Field

Label, control, hint, error and counter. The control inside gets its id, aria-describedby and aria-invalid automatically.

Optional
0 of 200 characters
FormField

Binds a react-hook-form field to Field: label, hint, the field's error message and the ids. Import it from @percentsa/ui/react-hook-form. react-hook-form is an optional peer: @percentsa/ui alone does not need it. Controls with onValueChange (PhoneInput, Combobox, Autocomplete, DatePicker) take field.onChange in render. max shows a character counter of the value.

Input

Text field. start and end hold icons or units inside the box.

0 of 500 characters
Textarea

Grows with the text up to 24 rem, then scrolls.

Select

A short list of options.

Type to filter

Combobox

A select you can type into, for long lists. Matching ignores case, accents and Arabic letter forms (أ/ا, ة/ه, ى/ي). Server search: onQueryChange gets each typed query, options are the results as given, and loading shows “Searching”; the app debounces the query. valueLabel names a chosen value that is not in the results. limit shows the first matches and how many more there are. onCreate adds a last option, Add «text», when no option has that label.

Type any text; suggestions open on focus

Autocomplete

A text input with suggestions. The typed text is always the value; a suggestion only fills it in. No row is highlighted until you press Down or Up. Rows can show a detail. Server search: onQueryChange gets each typed query and suggestions are shown as given; loading and unavailable show a status row, and emptyText shows a row when nothing matches. openOnFocus opens the list when focus comes from a pointer or the Tab key. token suggests for one part of the text, such as one item of a comma list. mono is for names, hashes and paths. start puts an icon before the text; the list then has the width of the whole field.

Checkbox

A yes/no choice with a label and optional description.

RadioGroup

One choice from a short list, arrow keys move between options.

How do you want to work?
ChoiceCardGroup

Large choices with descriptions. Native inputs: they post with the form before JavaScript loads.

Services

Choose any

ChipGroup

Pill-shaped choices in a row. Native inputs.

Switch

An on/off setting that applies at once.

40 – 120

Slider

A value or a range. Inside Field one thumb takes the field label; a range is a group with the field label, and its thumbs are named Minimum and Maximum (or thumbLabels).

NumberInput

A number with step buttons. Accepts Arabic digits.

UnitInput

A number with its unit, for example a time or a size.

Contact preference

Choose one.

Fieldset

Groups choices under a legend with a hint and an error.

Honeypot

An invisible field that only bots fill. Reject the form on the server when it has a value.

Saudi forms and dates 15

Stored as: —

PhoneInput

GCC phone number with a country menu. Accepts Arabic digits, spaces and +966; store normalizePhone(). The country names come from the strings (countries). With a name, the form also posts the country code as <name>-country (or countryName), also without JavaScript.

Letters and digits in any order, Arabic or English.

Stored as: —

PlateInput

One field for a car plate: letters and digits in any order, Arabic or Latin letters, Western or Arabic digits. A live plate shows under it. A letter that is not on plates, more than 3 letters or more than 4 digits shows what to fix. Keep the text, and store the result of parsePlate(): Arabic letters and Western digits, leading zeros kept.

Enter the code we sent to your phone

OtpInput

One box per digit. Paste and SMS autofill fill all boxes. Left to right in Arabic too.

Arabic digits work too

parseAmount: null

MoneyInput

An amount in riyals with the Riyal sign on the left. Arabic digits and separators become Western.

IbanInput

Saudi IBAN in groups of four, checked with mod-97. A placeholder replaces the built-in one.

NationalIdInput, CrInput, VatInput

National ID or iqama (10 digits, check digit), commercial registration (10 digits), VAT number (15 digits).

Optional
NationalAddress

All parts of the Saudi national address, including the short address.

FileDrop

Drop zone around a real file input. Refuses files that are too large or of the wrong type.

Square, PNG or JPG

ImageField

An image upload with a preview, Replace and Remove. A wrong type or a file over maxSizeMb (default 2) is refused before the upload. upload sends the file and returns its URL; while it runs the field shows a spinner. A failed upload keeps the old image and says so. name posts the URL with the form.

Ramadan 1447 AH

SunMonTueWedThuFriSat

value: 2026-02-18

Calendar

Gregorian or Hijri (Umm al-Qura) month grid; each day also shows its number in the other calendar. Weeks start on Sunday. The month and year lists go to any month: the years from min to max, else 100 years back and 10 years forward; months outside min and max are disabled. mode="range" chooses a date range: the first day is the start, the second the end.

DatePicker

A field that opens the Calendar. It posts an ISO date whatever calendar is shown.

value: 09:00

TimeInput

A time of day on the 12-hour clock: an hour 1–12, a minute (steps of minuteStep, default 5) and AM/PM, ص/م in Arabic. It reads left to right in both languages. A step from 11 to 12 crosses noon or midnight, as on a clock. The value is "HH:mm" in 24 hours, and name posts it. hourCycle="h23" (or the PercentProvider setting) shows hours 00–23 and no AM/PM; the value does not change. formatTimeOfDay takes the same option.

value: —

DateTimePicker

A DatePicker and a TimeInput. It sends a value only when both parts are set. name posts "YYYY-MM-DDTHH:mm", a wall time with no zone: the app decides the zone.

DateRangePicker

A date range for list filters, with the presets today, yesterday, this week, this month and last month. A preset applies at once; a range open at one end is valid (“From 12/09/2026”). The range reads left to right in both languages. In a toolbar, size="sm" gives it the height of the buttons next to it. defaultCalendar sets the calendar shown first.

2026-12-01 – 2026-12-31

PeriodPicker

A report period: a month, a quarter, a year or a custom date range. calendar="hijri" gives Umm al-Qura months, quarters (3 months) and years (“1448 AH”); the value is Gregorian ISO days in both calendars. The lists end on today, newest first: 24 months, 8 quarters, 5 years. A change of kind keeps the end of the current period, so September 2026 becomes Q3 2026, then 2026. A custom range with one day chosen is that day; a cleared range goes back to this month. kinds limits the choice. For reports with a custom range: presets are the preset buttons of the range (the DateRangePicker ids, for example today, yesterday, last7Days, last30Days; default as in DateRangePicker), weekStart is the first day of the week in the range calendar and in "This week" (0 Sunday … 6 Saturday; default 0), and clearTo is the period a cleared custom range goes back to (default: this month).

Overlays 12

Dialog

A modal window with a title, a close button and an optional footer. fullScreenOnPhone fills the screen below 768 px. returnFocusTo names the element that gets the focus when the dialog closes, for example a section heading after a link in the dialog moved the person there. Without it, the focus goes back to the element that had the focus when the dialog opened. It works only without trigger. The element must take the focus (a heading needs tabIndex={-1}).

AlertDialog

Asks before something that cannot be undone. Focus starts on Cancel. returnFocusTo names the element that gets the focus when the dialog closes, for example a section heading after a link in the dialog moved the person there. Without it, the focus goes back to the element that had the focus when the dialog opened. It works only without trigger. The element must take the focus (a heading needs tabIndex={-1}).

OnceValueDialog

Shows a new value one time, for example a token. It closes only with Done. returnFocusTo names the element that gets the focus when the dialog closes, for example a section heading after a link in the dialog moved the person there. Without it, the focus goes back to the element that had the focus when the dialog opened. The element must take the focus (a heading needs tabIndex={-1}).

ActionDialog

Asks before an action with an effect: the record at the top, then the choices, then “What happens”, which is read aloud when it changes. confirmName asks for the typed name, and reason for a reason (reason.maxLength limits its length). stays lists what does not change, and confirmLabel replaces the typed-name line. cancelLabel replaces the word on the cancel button. The first focus goes to the first choice, else to Cancel. returnFocusTo names the element that gets the focus when the dialog closes, for example a section heading after a link in the dialog moved the person there. Without it, the focus goes back to the element that had the focus when the dialog opened. The element must take the focus (a heading needs tabIndex={-1}).

Sheet

A panel from a side or the bottom. end is right in English and left in Arabic. On touch, drag it toward its side to close it: past 30 % of its size or with a flick, else it springs back. A bottom sheet drags from its handle and header, or from the content when that is scrolled to the top. A mouse never drags. Sliders, text fields, horizontal scrollers, menus opened from the sheet and parts marked data-sheet-no-drag keep their own drag. size="lg" makes a side sheet 56rem wide (the default is 28rem), for a document made from another document; a bottom sheet ignores it. returnFocusTo names the element that gets the focus when the panel closes, for example a section heading after a link in the panel moved the person there. Without it, the focus goes back to the element that had the focus when the panel opened. It works only without trigger. The element must take the focus (a heading needs tabIndex={-1}).

Popover

Floating content next to its trigger. label gives it an accessible name.

Tooltip

A short label for icon buttons. Not for important information.

DropdownMenu

A menu of actions from a button. Items: label, icon, shortcut, danger, separators and headings.

Right-click here
ContextMenu

A right-click menu for an area. Offer the same actions somewhere visible too.

Toast

Short messages at the bottom. Place <Toaster /> once, in the root layout, and call toast() anywhere. A toast made while no Toaster is on the page is dropped.

The banner shows at the bottom of the page until a choice is made.

ConsentBanner

Cookie consent for analytics (PDPL). Reject is as easy as accept; the server reads the choice with readConsent().

Feedback 10

New version

Version 2.4 is live.

Message sent

Alert

A message in the page. Errors and warnings are announced at once. collapsible folds it on a phone (below 768 px) to the icon, the title and a Show button.

NewDraftv2.4
Badge

A small label or count.

DesignWebRiyadh
Tag

A removable label (filters, chosen items).

DraftSentPaidDue soonOverdue
StatusBadge

A status in a badge, in five tones: neutral, info, success, warning, danger. The colour is on the dot only, and neutral (a ring) and info (a grey dot) differ by shape.

LivePausedDegradedDownAgent:
StatusDot

Green is allowed only on status dots (here and in StatusBadge). Always with text. Text with a link or a time inside stays one text.

LoadingLoadingLoading
Spinner

Loading indicator from the % mark. Opacity only, so it also plays with reduced motion. With a provider brand it shows the brand's spinner, else a plain ring.

Skeleton

Grey blocks while content loads.

No projects yet

Projects you start appear here.

EmptyState

What to show when there is nothing yet, with the next action. tone="error" shows a load error, announced at once; onRetry adds a “Try again” button. variant="plain" has no dashed frame, for an empty state inside a table, a card or a sheet (DataTable uses it for its own).

Not found

This page or record does not exist, or it was deleted.

No access

Ask an administrator for access.Needed permission: Export orders

NotFound, Forbidden

Pages for a record that does not exist and for a page the user may not open, with built-in text in both languages. back links to the list; permission names the permission to ask for.

Data display 22

Masar

Booking app for clinics
Mobile

12,400 bookings in the first month.

Live

Sadeem dashboard

The whole card is one link. The copy button still works.
Updated 2 days ago
Card

A block of content with a title, description, action and footer. With href the whole card is one link, and buttons inside still work. The title is an h3; headingLevel changes it. density="compact" is for dense records: p-4 in place of p-6, a text-base title and a smaller header gap. With onSelect the whole card is one button instead (a pickable tile: a product, a template, a choice); the title is its text, 2 lines at most with the full text in title. disabled dims it and stops the press (a sold-out product). media puts an image above the header at the full width of the card, for example <Thumbnail size="fill" />.

Invoice lines
ItemQuantityAmount
Design sprint118,000
Development (hours)12054,000
Hosting (1 year)12,400
Table

A styled native table that scrolls sideways on small screens. Put numbers in cells with align="end" so the digits line up. TableHead is a column header (scope="col": text-xs, muted, one line, h-10). scope="row" makes a row header (a form line label) and looks like a body cell: py-3, text-sm, text-fg, normal weight, and it wraps. wrap lets a column header wrap onto more lines, and its height follows the text.

Invoices
Status
INV-1062Nakhla FoodsOverdue6,000
INV-1061MasarPaid6,250
INV-1060Najm LogisticsDue6,500
INV-1059Bayt CoffeeOverdue6,750
INV-1058Wadi TechPaid7,000

DataTable

A table with sorting, row selection, pages, loading and empty states. For server data, control sort and page and give pageCount; the table then shows the rows as given. rowHref makes the whole row a link to the record (the first cell is the link; Ctrl-click opens a new tab), and the checkbox and buttons in the row still work. rowActions adds a “⋯” menu to each row. The first cell of a row with rowHref is font-medium. With cards, each row is a card below 768 px (and in the cards view of viewKey): the first cell is the title, the other cells show their header, and hideOnCard columns are left out. A row holds as many cards as fit, each at least 18rem wide, so a phone shows one card in a row; group headers and totals take the full row. A column's description is a muted second line under its value (null, undefined and "" show nothing); in the first column of a row with rowHref it comes after the link, and links in it stay clickable. A column's cardSlot changes how its cell sits on the card, on cards only (below 768 px and in the cards view; the table rows do not change), and not for the first column, which is the card title: "end" at the end of the title line, "meta" in one wrapped line under the title, "block" full width under the meta (long text); none of them shows the header, and a cell with no value shows nothing. cardDescription: "block" on the title column shows its description on the cards as a full-width block after the meta line, not under the title; the table view does not change. density="compact" is for dense lists: cell py-2, header row h-9, card rows p-3 with gap-y-1. The default empty state is EmptyState variant="plain". For reports, totals adds a total row at the foot, and groupBy puts the rows in groups (in the order they first appear; a sort works inside each group), each with a header row (groupHeader) and a subtotal row (groupTotals). With groupBy the table shows all rows, without pages. density="print" is for a printed report: small cells (text-xs, px-1 py-1), a header row h-8 with wrapping text, no scroll box (the table is as wide as the page), no cards and no sticky header; totals and group rows take the same small cells. The caller leaves out pages and row links in a print copy. viewKey adds a Table and Cards switch at the end of the toolbar row and keeps the choice in the browser for each list. Below 768 px the list shows cards and no switch. titleColumn names the column that holds the row link and is the card title, when the first column is a small value such as a level badge or a time; the row checkbox and the row menu take their names from it, unless rowLabel is set. rowLabel makes the row link an empty link with that name, so the title cell keeps its own content and its own links work (a log line with links in it). It also names the row checkbox and the row menu. cardTitle gives each card its own title, for example the order and the customer when the customer column is hidden on cards. The table view keeps the title cell.

Invoices
Status
INV-1040MasarPaid1,500
INV-1041Nakhla FoodsOverdue11,250
INV-1042Raha ClinicsDue11,000
INV-1043SadeemPaid10,750
INV-1044Wadi TechOverdue10,500
INV-1045Bayt CoffeeDue10,250
INV-1046Najm LogisticsPaid10,000
INV-1047MasarOverdue9,750
INV-1048Nakhla FoodsDue9,500
INV-1049Raha ClinicsPaid9,250
ColumnsMenu

Shows and hides table columns. It takes the DataTable's columns and lists those that can be hidden (hideable: false keeps a column); give the hidden keys to DataTable as hiddenColumns. The example also shows pageSizeOptions (a rows-per-page choice that goes back to page 1) and stickyHeader (the table scrolls in its own box and the header row stays in view).

  • Booking app · 2026
    Live
  • Operations dashboard · 2025
    180,000
  • Bayt Coffee
    Online store · in progress
  • Project proposal
    PDF · 2.4 MB
List

Rows with an icon, title, description and a trailing value or action, with dividers between them. With href a row is one link. With onSelect a row is one button instead (the title is its text; controls in trailing still work), and disabled dims it. move adds move up and move down buttons for an ordered list: you pass the row's index, the count and onMove(from, to), and reorder in your state (give the rows stable keys, and data-flip to make them glide). The first row's up button and the last row's down button are disabled. After the move the focus stays on the same button (on the other one when the row reaches an end) and the new place is announced in the page language (one live region per List); label names the row (default: the title when it is a string). Inside data-density="touch" the rows and buttons are finger-sized on a touch screen.

Client
Masar
Services
Product design, mobile app, hosting
Start date
1 March 2026
Budget
240,000
Status
Live
DescriptionList

Terms and their details, such as project facts. layout="columns" puts them side by side from 768 px of the screen. layout="auto" does it when the list itself is 28rem wide or more (a container query), so a list in a narrow cell stays stacked; the list must not take its width from its content. density="compact" makes the rows tighter (py-2 in place of py-3). cols={2} or cols={3} puts the pairs in columns, row by row (a container query on the list, so a list in a narrow card has fewer columns, down to one); the lines run across each row, and a last row with fewer pairs stretches them. layout still sets each pair: stack (term above details, columns of at least 8rem: short money rows such as a cash summary), columns (term beside details, columns of at least 18rem), auto (stacked, beside each other when each column is 28rem or more).

Revenue
184,250
Increase +12.4%
vs last month
Active users
12,480
No change 0%
Churn
2.4%
Increase +0.6%
Higher is worse
Stat

A key number with its change and an optional chart. The arrow is neutral; use tone="danger" only when the change is bad. The tile is a container: the value size and the padding follow the width of the tile, not the screen. From 15rem the value is text-3xl with p-5; from 12rem text-2xl; from 10rem text-xl; below that text-lg, with p-4 under 15rem. So four money tiles in a row, or two on a phone (about 158 px each), hold an amount with decimals. The label, change and hint keep their sizes. The tile takes its width from its parent (a grid cell, flex-1 or a width); in a parent that sizes to its content it is 9rem wide.

  1. 09:12
    Order placed
    Done
  2. 09:14
    Paid with mada
    Done
  3. 11:40
    Packed
    Riyadh warehouse
  4. Tomorrow
    Out for delivery
  5. Tomorrow
    Delivered
Timeline

Events or steps in order, with the line on the start side. A step can show its state, its duration and a detail. A failed step opens to show its detail.

CPU42 %
  • Alert at 90 %
MemoryAbove limit93 %
  • Alert at 90 %
Disk160 GB
  • Used 120 GB
  • Held 40 GB
Network61 %

From the last report

Storage
Storage35 %
UsageMeter

How much of a limit is in use. Above the limit line, the value shows in the warning color. hideLabel keeps the label for screen readers only, for a meter that is the value of a summary fact with its own visible label.

Main website

  • Domainfromold.example.comtoshop.example.com
  • Memoryfrom512 MBto1 GB

Shop

  • PortfromNot setto8080
  • API keyChanged (value hidden)

The site restarts after saving.

4 changes: Domain, Memory, Port, API key
ChangeList

What a save changes: each value before and after. Secret values show only as changed.

Most websites take four to eight weeks.

Accordion

Sections that open and close, one at a time or several. The arrow keys move between headers. Closed panels stay in the page, hidden: search engines see them, find-in-page opens them, and their content mounts at page load (load heavy media on open).

  • Contracts
    • NDA.pdf
  • Brief.docx
Tree

Nested items such as files or categories. Full keyboard use; the left and right arrows swap in Arabic.

Total
1,150
Paid
500
Balance
650
Due 3 Mar
Branch
Not set
Note
Deliver to the side entrance of the warehouse before noon
RecordSummary

The 1 to 6 key facts of a record in one dense strip, for example under its header: a label, a value and an optional hint per cell. Cells follow the width of the strip itself (a container query, not the screen): one row from 56rem, 3 per row from 36rem (all when there are 4 or fewer), 2 per row below. media sits at the start (a Thumbnail), above the cells on narrow strips. An empty value shows “Not set”, long text is cut at 2 lines with the full text in the title, href makes the value a link, and loading shows a skeleton in each cell. label names the strip (default “Summary”). More than 6 items is a warning in development. In a report, the strip shows the totals of a period (sales, returns, VAT, net) above the table. An item with status shows a dot and a word at value size. An item with wrap shows its whole value, not cut at 2 lines, for a state sentence that a person must read on a phone.

Hidden
MaskedValue

A secret value shown as dots. Reveal can ask first (confirm); the app reads the value and writes its audit log in onReveal. confirm.action sets the confirm button text (default “Show”). open and onOpenChange control the dialog, for example to open it from a row menu; they work only with confirm. After a reveal the value has Copy and Hide. Give each record its own key, so a shown value does not stay when the record changes.

Connect

Host and port
203.0.113.10:5432
User
app_user
Password
Hidden
Command
psql -h 203.0.113.10 -p 5432 -U app_user -d shop_example
ConnectionCard

How to reach a service: rows of host and port, user, a masked password and a command, each ready to copy. copyLabel names a row’s copy button (“Copy host”). A long value breaks onto more lines and never makes the page wider.

Thumbnail

A small square image with a fallback icon: product photos, line images, uploaded files. The sizes are sm (40 px, lines and rows), md (64 px, files and lists) and lg (96 px, galleries and summaries). The icon shows when there is no src or the image does not load; fallback changes it. alt is required: it names the image, the icon and the link. caption is one line under the image, cut with the full text in the title. With href the whole thumbnail is a link. For an upload field use ImageField; for a person use Avatar. size="fill" takes the full width of its box at 4:3, for a tile image (see the media of Card).

Avatar, AvatarGroup

A person's picture, or their initials when there is none. A group shows the first few and a count of the rest.

app/root.tsx
import { PercentProvider } from "@percentsa/ui";

export function App({ lang, children }: { lang: "en" | "ar"; children: React.ReactNode }) {
  return <PercentProvider lang={lang}>{children}</PercentProvider>;
}
CodeBlock

Code with line numbers, a file name and a copy button, always left to right. For syntax colours, pass highlighted children (for example from Shiki); copy still copies the plain code.

  • number: "INV-2026-0142"
  • … } 3 items
  • total: 1150
  • paid: true
  • refund: null
  • … ] 2 items
}
JsonViewer

Shows JSON data as a tree that opens and closes. Deep levels start closed and show their item count.

Build finished
  1. 10:00:00compilercompiler · step 1 of 40 done
  2. 10:00:01bundlerbundler · step 2 of 40 done
  3. 10:00:02compilercompiler · step 3 of 40 done
  4. 10:00:03bundlerbundler · step 4 of 40 done
  5. 10:00:04compilercompiler · step 5 of 40 done
  6. 10:00:05bundlerbundler · step 6 of 40 done
  7. 10:00:06compilercompiler · step 7 of 40 done
  8. 10:00:07bundlerbundler · step 8 of 40 done
  9. 10:00:08compilercompiler · step 9 of 40 done
  10. 10:00:09bundlerbundler · step 10 of 40 done
  11. 10:00:10compilercompiler · step 11 of 40 done
  12. 10:00:11bundlerbundler · step 12 of 40 done
  13. Error10:00:12compilercompiler · error: cannot find module "./missing-12"
  14. 10:00:13bundlerbundler · step 14 of 40 done
  15. 10:00:14compilercompiler · step 15 of 40 done
  16. 10:00:15bundlerbundler · step 16 of 40 done
  17. 10:00:16compilercompiler · step 17 of 40 done
  18. 10:00:17bundlerbundler · step 18 of 40 done
  19. 10:00:18compilercompiler · step 19 of 40 done
  20. 10:00:19bundlerbundler · step 20 of 40 done
  21. 10:00:20compilercompiler · step 21 of 40 done
  22. 10:00:21bundlerbundler · step 22 of 40 done
  23. 10:00:22compilercompiler · step 23 of 40 done
  24. 10:00:23bundlerbundler · step 24 of 40 done
  25. 10:00:24compilercompiler · step 25 of 40 done
  26. 10:00:25bundlerbundler · step 26 of 40 done
  27. 10:00:26compilercompiler · step 27 of 40 done
  28. 10:00:27bundlerbundler · step 28 of 40 done
  29. 10:00:28compilercompiler · step 29 of 40 done
  30. 10:00:29bundlerbundler · step 30 of 40 done
  31. 10:00:30compilercompiler · step 31 of 40 done
  32. Error10:00:31bundlerbundler · error: cannot find module "./missing-31"
  33. 10:00:32compilercompiler · step 33 of 40 done
  34. 10:00:33bundlerbundler · step 34 of 40 done
  35. 10:00:34compilercompiler · step 35 of 40 done
  36. 10:00:35bundlerbundler · step 36 of 40 done
  37. 10:00:36compilercompiler · step 37 of 40 done
  38. 10:00:37bundlerbundler · step 38 of 40 done
  39. 10:00:38compilercompiler · step 39 of 40 done
  40. 10:00:39bundlerbundler · step 40 of 40 done
LogViewer

Log lines with time, source and text. While live, it follows new lines only when the reader is at the end; else “Jump to newest” shows. Search marks the matches, and right click or a long press copies a line. Arrow keys move between lines. Shift+F10 opens the line menu. Ctrl+C or Cmd+C copies the current line.

Press Escape, then Tab, to leave the editor.

    Change an image version to “latest” to see an error on its line.

    CodeEditor

    An editor for code and settings files, with line numbers, search and errors on their lines. It is a controlled field: value and onValueChange. diagnostics marks lines ({ line, message }, 1-based) and marks each with an error line, a gutter mark and a visible list under the editor (“Line 2: message”; a diagnostic whose line is not in the text shows in the list without a mark, and without “Line” when the line is not a whole number of 1 or more); validate in your own code, the editor does not. language is yaml (default) or text. readOnly keeps focus, selection, search and copy. label names the editor for screen readers, and minLines sets its least height. The code is always left to right; the error list and the hint follow the page direction. Tab indents, so to leave the editor with the keyboard press Escape, then Tab (with text selected, press Escape twice); an editable editor shows this hint while it has focus, and screen readers read it as its description. CodeMirror makes it heavy, so it has its own entry, @percentsa/ui/code-editor: the root entry does not load it. Its words (search, errors) come from the provider strings. errorList={false} keeps the line marks and the gutter marks but draws no list under the editor, for a page that shows its own list (make that list a polite live region, as the built-in list is).

    CodeDiff

    Two versions of a text side by side, with the changed lines and words marked. Read only. It has the same entry as CodeEditor, @percentsa/ui/code-editor, and the same look.

    Boards and calendars 2

    To do2

    • Write the briefContent
    • Book user interviewsResearch

    In progress2

    • Design the checkoutDesign
    • Set up paymentsBuild

    Review1

    • Review the Arabic copyContent

    Done1

    • Brand coloursDesign
    Kanban

    Columns of cards for a workflow. Drag a card with the mouse, or use its Move menu with the keyboard, touch or a screen reader; every move is announced. For a work board (orders, tickets, jobs) leave out onMove: there is no drag and no Move menu, and the actions are the content of renderCard. Each column can have a server count (null shows an ellipsis until it is known), a state (loading shows two skeleton cards on the first read; error shows the error and “Try again”, and the loaded cards stay above it), its own empty text, and pages: with hasMore a “Load more” button ends the column and the next page also loads by itself, once per page, when the end scrolls into view. fill makes the board as high as its parent with each column scrolling by itself; columnWidth="fill" shares the width (at least 14rem) and the row scrolls sideways when the columns do not fit; phone="switch" shows one column below 768 px with a switch (title and count) that scrolls in its own box, and column with onColumnChange lets the app keep the shown column in the address; density="compact" tightens the cards. A column with no cards now shows “No items” (before, nothing).

    December 2026

    1. Wednesday 2 December 2026

    2. Thursday 3 December 2026

    3. Friday 4 December 2026

    4. Saturday 5 December 2026

    5. Sunday 6 December 2026

    6. Sunday 13 December 2026

    Choose an event.

    CalendarView

    A month of events in the Gregorian or Hijri calendar. Up to 3 events show per day, the rest in a list; below 768 px it shows only the days that have events.

    Charts 6

    • Orders
    • Returns
    Orders and returns by month
    MonthOrdersReturns
    Jan42040
    Feb51052
    Mar48038
    Apr62061
    May70055
    Jun81049
    LineChart

    Values over time as lines. Series take the brand chart colours (--p-chart-1 to --p-chart-5; default greys) and also differ by dash pattern and marker shape; patterns={false} removes the dashes. In Arabic time runs from right to left. Focus the chart and use the arrow keys to read each value. limit draws a dashed line with its label; a value at 90 % of the limit or more shows in the warning colour. With onSelectPoint, a click or Enter on the chosen point opens it. On touch, the first tap shows the value and a second tap on the same point opens it. The limit label has a halo in --p-chart-surface (default the page colour; Card sets it to its own surface), so it stays readable over the line.

    • Website
    • App
    • Store
    Visits by channel
    MonthWebsiteAppStore
    Jan1,200800300
    Feb1,500900350
    Mar1,4001,300320
    Apr1,9001,500400
    May2,3001,700380
    Jun2,6002,100450
    AreaChart

    Values over time as filled areas, side by side or stacked to show the total. limit draws a dashed line with its label; a value at 90 % of the limit or more shows in the warning colour. With onSelectPoint, a click or Enter on the chosen point opens it. On touch, the first tap shows the value and a second tap on the same point opens it. The limit label has a halo in --p-chart-surface (default the page colour; Card sets it to its own surface), so it stays readable over the area.

    • Actual
    • Plan
    Signed contracts: plan and actual
    QuarterActualPlan
    Q1110120
    Q2150140
    Q3155160
    Q4190180
    BarChart

    Compares values by category: vertical or horizontal bars, grouped or stacked. Bars after the first series are hatched; patterns={false} removes the hatches when the brand colours differ enough.

    9,000Visits
    • Search46.7%
    • Direct28.9%
    • Social16.7%
    • Email7.8%
    Visits by source
    CategoryVisits by source
    Search4,200
    Direct2,600
    Social1,500
    Email700
    DonutChart

    Parts of a whole, with a total in the centre and a legend with percentages. Use it for five parts or fewer.

    Orders this week

    1,284

    Sparkline

    A small line without axes for KPI cards. It is hidden from screen readers unless you give it a title.

    • Website
    • App
    • Store
    • Partners
    • New62%
    • Waiting for reply38%
    ChartLegend

    Names the series with the same line or fill as the chart. Charts with more than one series show it by themselves.

    App patterns 20

    Inbox

    Payment received from Nakheel Co.

    Invoice 1042 is due tomorrow

    Huda commented on the Q3 report

    AppShell

    The frame of an app: a sidebar on the start side from 1024 px and in a sheet on smaller screens, a sticky header, and the page in <main>. Controls are compact unless density is comfortable. The embedded option drops the <header> and <main> landmarks and the skip link, for a shell inside a page that has its own. Without sidebar (a driver or partner app, a kiosk, a shop tablet screen) there is no sidebar column, no menu button and no sheet, and the header row shows at every width; the page centres its content with Container. The app draws its own logo and passes it in header. fill makes the shell as high as the screen and <main> a flex column with min-h-0: give the page box flex-1 min-h-0 and it takes the rest and scrolls inside its own regions (a till, a board, a calendar; the shell itself does not scroll). density="touch" gives finger-sized controls on a coarse pointer (44 to 48 px) and the compact sizes on a mouse.

    Orders

    128 orders
    PageHeader

    The top of a list or record page: the title with status badges, a meta line, a back link to the list, one primary action, secondary actions and a “⋯” menu. Below 768 px the primary action is full width and “More actions” opens the rest; secondary buttons stay mounted, so their dialogs keep working. Danger items go last. sticky keeps it under the AppShell header from 768 px. Menu items take a description, for example why an item is disabled. back also takes several links, for example “Client / Project”. Below 768 px, a dialog that opens from a “More actions” item gives the focus back to “More actions”.

    PrintArea

    Prints one part of a page on A4, portrait or landscape, black on white in every theme. The header repeats at the top of every page, and the page numbers are at the bottom. Nothing else on the page prints, also not an open sheet. The area is hidden on screen. Render the rows before print() (with flushSync when they change in the same click). Over 500 rows, turn the print button off and show tooManyRowsToPrint: export the list, or filter it.

    Sara Alotaibi
    Sidebar

    App navigation in sections, with icons, badges and the current page marked; the mark slides to the new page (no slide with reduced motion). It collapses to an icon rail with tooltips. The collapse button shows its words ("Collapse sidebar") beside the icon while the sidebar is expanded; in the rail it is the icon alone, and the words are its tooltip and accessible name. toggleLabel={false} turns the words off. They come from the provider strings collapseSidebar and expandSidebar; an app overrides them with strings. Give PercentProvider the router's location, and a clicked link shows a pending bar at once, until the new page is there. An item can have children: it stays a link to its own href, and a chevron button beside it folds the child links (one level; the children of a child are not shown). The group starts open when it or a child is current, and it opens when the current page moves into it. defaultOpen opens it at first, and defaultOpen={false} keeps it folded even when the current page is inside; then the parent shows the selected look without aria-current. The button name is the label with the strings showSubItems and hideSubItems. The icon rail shows no children. An item without href is a plain row, for a status such as "Loading clients…": it is not a link, not focusable, never current, and has no children; it keeps the height and layout of a link row, in a quieter colour, so the list does not move when links replace it. The app gives the live role to the label (role="status") so a screen reader announces the text when it changes. A section can fold (collapsible): its title shows badge while folded, the choice is kept in the browser under id, and a current page inside opens it. An item can show a status dot (danger, warning) with statusLabel for screen readers and as a tooltip.

    Profile

    How this part of your account works.

    Email me about changes

    SideNav

    In-page navigation for an area with many sections, such as an app's settings. Groups of router links, each with a small heading; the current page has aria-current="page" and the Sidebar's selected look. By default it is a compact column that fills its box: the app sets the width and puts the section next to it, for example grid gap-8 md:grid-cols-[15rem_minmax(0,1fr)]. sticky keeps the column in view while the page scrolls, under the AppShell header (--p-sticky-top); it scrolls on its own when it is taller than the screen, with its scrollbar hidden; wheel, touch and keyboard scrolling still work. For your own scroll box, the class scrollbar-none (from @percentsa/ui/styles.css) hides the scrollbar the same way (Tailwind's own scrollbar-none plus the WebKit rule). To show the scrollbar again, put scrollbar-auto in className. variant="list" is the same groups as a full-width list with each description under its label and a chevron at the end: the area's home on a phone (description shows only there). Show the column from 768 px and the list below it. Labels wrap; they are never cut. iconOnly (column only) turns the column into an icon column: each item is its icon in a 44 px box, the label is the tooltip and the link's accessible name, group headings stay for screen readers only, and a badge is a small dot (its value stays for screen readers). An item without an icon shows the first letter of its label (a label that is not text shows nothing, so give it an icon). iconOnly has no effect on variant="list". The part has no breakpoints of its own: for an icon column from 768 px and the full column from 1280 px, render it twice and show each with classes, hidden md:grid xl:hidden for the icon column and hidden xl:grid for the full one (see the second example). Use Sidebar for the app menu and Tabs for a few items in a row.

    CommandPalette

    Search and run commands from the keyboard. Ctrl+K or ⌘K opens it; the search ignores case, accents and Arabic letter forms. A command can have a description (one line under the label; the search reads it too), a badge (short text at the end of the row) and disabled (the reason the command cannot run now). A disabled row shows its reason and stays in the list: the arrow keys pass over it, but Enter and a click do nothing. Server results: onSearchChange gets the typed text, loading shows a searching row, and the results are commands (put the matched text in keywords). description can be a node, for example an amount with the Riyal sign; a node is not searched. anchor opens the palette next to an element, and as a bottom sheet below 768 px. The anchor element must have aria-haspopup and aria-expanded. A command that moves the focus must do it after the palette closes, for example in a useEffect of the new element: the dialog and the bottom sheet keep the focus inside until they close.

    • Critical
      Site down

      No answer for 5 minutes

      Main website · Al Noor

    • Important
      Deploy failed

      shop.example.com

    • Important
      Disk almost full

      Main website

    • Other
      Update ready

      203.0.113.10

    AttentionList

    The items that need a person, for example open alerts. Each row has the level, the title as a link, the area, the age and one next action; the app sorts the items. compact is the short form for a popover. An item without href has a plain title and no link.

    Status: Active
    FilterBar

    Search and filter menus above a list or table. Chosen options show as removable tags, and “Clear filters” removes them all and also turns off pressed toggle chips. actions puts the list's other controls (date range, columns, refresh, “⋯”) at the end of the first row, so one bar is the list toolbar. collapseOnPhone folds the filter menus below 768 px into one “Filters” button with the count of chosen values; it opens a bottom sheet with one group per filter (checkboxes, or radios when not multiple) and “Clear filters”. A change applies at once. Search, actions and the tags stay on the bar; with no filters there is no button. A filter with kind "toggle" is one chip (aria-pressed) with a check mark when on; its value is ["on"] or [], it has no tag, and it stays on the bar on a phone. In search, onSubmit runs on Enter, suggestions shows a list of words while typing (the text stays free), and maxLength limits the length. Keep suggestions defined for the life of the bar (pass [] for no words): a change between undefined and a list mounts a new field, and the focus goes away.

    Profile

    How your name and language appear to your team.

    Emails use this language too.

    Notifications

    SettingsSection, SettingsRow

    Settings pages: sections with a title and a Save button. In each row the label is on the start side and the control on the end side from 768 px. status on the section is a short state at the start of the footer (“Unsaved changes”, “Changes saved.”); it is read politely, shows with footer, and wraps above the buttons below 640 px. Pass null while there is nothing to say, so the first change is announced. On a row, error shows under the control; with controlId the control gets aria-invalid and the error in aria-describedby, and a row without controlId names the error in its group description. required adds the mark and optional the word after the label, as in Field. action puts a button, for example Edit, at the end of the section heading.

    Start and health

    Start command

    bun run start

    Address

    shop.example.com

    Monthly plan

    49

    Health check path

    Not set
    ValueRow

    A setting shown as text, with an optional copy button and an action such as Edit. Use it also for a person who may not change the value.

    Secrets

    Payment key

    SetChanged by Sara

    Mail password

    Not setWithout it: Order emails

    TLS certificate key

    Set

    Signing key

    SetOnly the owner can change it.
    SecretRow

    A secret setting: shows only whether it is set, and when it changed. The new value goes in a sheet; its title is "Set" or "Change" with the label and its button has the same word. sheetDescription adds a line under the title and hint a line under the field. file adds a button that reads a chosen text file (a key or a certificate) into the field. A file of another type, or over 1 MB, is refused with a message. removeLabel replaces the word "Remove" in the menu and the confirm dialog. action adds a second action in the row, for example a "Test" button, after the Set button and before the menu; it shows only when the person can edit.

    Returns

    After this the invoice cannot be returned.

    FormSettingsRow

    A react-hook-form field in a SettingsRow: label and description at the start, the control at the end, and the field's error message under the control. The control from render gets its id and the aria wiring from the row. Import it from @percentsa/ui/react-hook-form; react-hook-form is an optional peer. Use it inside a SettingsSection. For a Switch or Checkbox, which have their own label, pass group: the row is then a group named by the label and the error is in its description.

    FormSheet

    An edit form in a sheet. Cancel and Save stay at the bottom while the form scrolls, and Enter in a text field saves. pending shows Save loading and keeps the sheet open. With dirty, every way to close it (Escape, a click outside, the close button, a drag, Cancel) asks “Discard your changes?” first, and the browser asks before the page is left. The sheet does not close itself after a submit: close it when the save succeeds. blocked says why the submit is refused now: the reason shows above the buttons (announced to screen readers), the submit stays visible but disabled, and pending wins over it. danger makes the submit a danger button, cancelLabel renames the close button, size="lg" makes the sheet 56rem wide (a document made from another document), and side="bottom" puts the two large buttons in two equal columns. side="auto" opens at the end from 768 px and at the bottom below. returnFocusTo names the element that gets the focus when the sheet closes, for example a section heading after a link in the sheet moved the person there. Without it, the focus goes back to the element that had the focus when the sheet opened. The element must take the focus (a heading needs tabIndex={-1}). It works only without trigger.

    FieldsSheet

    An edit sheet for one to three text fields. Errors show only after Save, then follow the input. It closes when onSubmit succeeds, stays open when its Promise is rejected, and opens from the bottom below 768 px. The content can be a function that gets the draft values, so a note can follow the typing. A field inputMode sets the keyboard a phone shows, for example numeric for a port. returnFocusTo names the element that gets the focus when the sheet closes, for example a section heading after a link in the sheet moved the person there. Without it, the focus goes back to the element that had the focus when the sheet opened. The element must take the focus (a heading needs tabIndex={-1}).

    Customer

    Name
    Sara Al-Qahtani
    Email
    Not set
    City
    Riyadh
    RecordSection

    A record's facts as text in a card, with its edit action in the header. Terms and details sit side by side from 768 px. Empty details show “Not set”, so a missing value never looks like a layout gap. The heading is an h2 (headingLevel={3} inside a section). layout="auto" puts them side by side when the section itself is 28rem wide or more (a container query), for a section in a narrow cell. density="compact" is for dense records.

    Sign in

    Welcome back. Sign in to see your projects.

    Forgot password?
    No account yet? Create one
    AuthLayout

    Sign-in, sign-up and verification pages: brand, title, form and links in a narrow column, with a picture panel from 1024 px. The recipes use the existing fields.

    Stocktake

    Optional
    Products that change: 3
    FormBar

    The action bar at the end of a form page or a long sheet form: a short live summary at the start (a total, a count; screen readers read changes politely) and the buttons at the end, secondary first and the submit last. From 640 px it is one row; below that the summary has its own line and the buttons share the row equally. It sticks to the bottom of the scroll area; sticky={false} turns that off. Put the value in <b> for medium weight. In a Sheet, give it className="-mx-6 -mb-6 px-6" to reach the sheet's edges.

    Enter the lock code

    PinPad

    A short numeric code on screen with large keys: a device lock on a shared phone or tablet, a cashier switch at a till. Masked dots and a 3 × 4 key grid that keep left-to-right order in Arabic, like a phone keypad. onComplete gets the code once, when the last digit is typed; while its promise runs the keys are off, then the pad clears. error shows under the dots and clears them; onStart fires at the first digit of a new entry. The keys are buttons; digits and Backspace on a hardware keyboard work too (not while a text field has the focus). Screen readers hear a count (“2 of 4”), never the digits. For a code that comes by SMS use OtpInput.

    Choose an action.

    ActionBar

    The bottom bar of a work tool such as a till, a kiosk or a picking tool: equal tiles with an icon (20 px), a label cut with the full text in title, and a key hint (a left-to-right Kbd, such as F2, hidden on a touch screen). The bar only shows the hints: the app binds the keys. Tiles are 56 px high (64 px in data-density="touch"); when any item has a keyHint, all tiles are 72 px high on a mouse so the key keeps clear of the edge and the label (on a touch screen the hints are hidden and the heights above apply). tone: "danger" gives red text and border; disabled keeps the tile in its place. group: "end" puts an item after a separator at the end side, and it never goes into the overflow. When a tile would be narrower than 5rem, the last main items move into a “More” menu (label and key hint per row). It is a nav named by label; Tab moves between the tiles. No items: nothing renders. The order follows the reading direction. For buttons in a row use ButtonGroup; for one keyboard key use Kbd.

    Due: 230

    Still due: 230

    Keypad

    Digit keys on a touch screen for an amount or a code, so the system keyboard does not cover a dialog. value is the draft text of the field it serves (Western digits and “.”, as MoneyInput) and onValueChange gets the next draft. mode="amount" has 1 to 9, “.”, 0, “00” and a backspace key; a leading zero is replaced by the next digit, a second “.” is refused, and decimals (default 2) is the most digits after it (0 hides the “.” key). mode="pin" has 1 to 9, 0 and backspace. At maxLength the digit keys do nothing. The keys are buttons with names in both languages and stay left to right in Arabic, like a phone. A hardware keyboard works too (digits, “.” and Backspace) while the focus is on the page or inside the keypad, and never when a text field, dialog or menu has the focus, on a key repeat, or with Ctrl, Meta or Alt. Use it on a coarse pointer only; a desktop uses the keyboard. PinPad (a masked code with checking) uses the same key grid.

    Invoices and support 7

    Tax invoice
    فاتورة ضريبية

    Invoice numberرقم الفاتورة
    INV-2026-0042
    Issue dateتاريخ الإصدار
    18 February 2026 · 1 Ramadan 1447 AH

    Sellerالبائع

    Percent Software Studio

    VAT numberالرقم الضريبي
    310123456700003
    CR numberرقم السجل التجاري
    1010123456
    Addressالعنوان
    Olaya, Riyadh 12211

    Buyerالمشتري

    Najd Trading Co.

    VAT numberالرقم الضريبي
    300987654300003
    Addressالعنوان
    Al Malqa, Riyadh 13521
    Description
    الوصف
    Quantity
    الكمية
    Unit price
    سعر الوحدة
    VAT rate
    نسبة الضريبة
    VAT amount
    مبلغ الضريبة
    Total incl. VAT
    الإجمالي شامل الضريبة
    Website design118,000.0015%2,700.0020,700.00
    Development, hours40350.0015%2,100.0016,100.00
    Hosting, 12 months1299.9915%179.981,379.86
    Total excl. VAT
    الإجمالي غير شامل الضريبة
    33,199.88
    Total VAT
    إجمالي ضريبة القيمة المضافة
    4,979.98
    Total incl. VAT
    الإجمالي شامل ضريبة القيمة المضافة
    38,179.86

    Notesملاحظات

    Payment within 30 days to IBAN SA03 8000 0000 6080 1016 7519.
    Invoice

    A Saudi tax invoice with Arabic and English labels on one page. Amounts are computed in halalas, with VAT rounded on each line, and it prints black on white in every theme. The labels of the page language come from the provider strings; otherLanguageStrings gives the labels of the second language.

    Order SO-1042
    ProductQtyUnit price incl. VATDiscountVATTotal incl. VATRow actions
    Arabic coffee, 1 kgCOF-AR-1000489.500.0046.70358.00
    Paper cups, 8 ozReturned 50CUP-08500 pcs0.456510.0028.47218.25
    Dates, SukkariDAT-SUK245.000.0011.7490.00
    LineItemsTable

    The lines of an order, invoice or return: product and SKU, quantity, unit price, discount, VAT and total. It only shows the lines: the amounts come from your backend. prices="incl" or "excl" says whether the unit price and the total include VAT, and their headers say it too. The unit price keeps up to 6 decimals; the other amounts have 2. The discount and VAT columns show only when a line has a value. A returned quantity shows as a chip. href opens the line's record, rowActions adds a “⋯” menu, and on phones each line is a card. A line can also carry media (a small image at the start of the name), description (muted lines under the name), parts (the sub-lines of a kit, each with a name, an optional SKU and a quantity, without a price) and extra (more under the name: option chips, file thumbnails). They show in the card rows too. totals puts a TotalsList under the table at the end side, full width on narrow tables; empty replaces the rows when there are no lines.

    Invoice lines
    #ProductQuantityUnit priceTotalLine actions
    1
    411.70
    2
    0.00
    Subtotal
    358.00
    VAT15%
    53.70
    Total incl. VAT
    411.70
    LineItemsEditor

    The lines of a document in a form: one row per line with your inputs in the cells, add and remove, a keyboard order, per-line details, totals, and line cards when the part is too narrow for its columns (it measures itself). It computes nothing: you own the lines and the totals. columns take a cell(line, ctx), a width (xs 6rem, sm 8rem, md 10rem, lg 14rem, fill), align, readOnly (a fact or a total, not a stop for Enter) and card (title, field, end, hide). A Field in a cell hides its label on rows (the column header shows it, and the line number joins its name) and shows it on cards. Enter never submits the form from inside the editor: it moves to the next editable cell, then the next line, and from the last cell of the last line it adds a line. A focus move lands on the text input of a cell (not the "−" button of a NumberInput) and selects its text, so a typed value replaces the old one; give a NumberInput column at least md, so its number shows between the buttons. ctx.next() moves on after a pick. After an add the focus goes to the new line; after a remove to the line that took its place, else to the add button; both are announced. detail shows more fields under a line; closed details are not rendered.

    Subtotal
    21,190.00
    DiscountSpring offer, 5%
    -1,190.00
    VAT15%
    3,000.00
    Total
    23,000.00
    Paid
    25,000.00
    Balance
    (2,000.00)
    TotalsList

    Document totals with the amounts aligned under each other: 2 decimals, the Riyal sign, a minus for a discount. The total row is bold with a line above, a hint adds a small line under a label, and accounting puts a negative amount in brackets. It computes nothing: give it the amounts from your backend. It works in a server component.

    QrCode

    A QR code drawn as SVG, black on white in every theme (many scanners cannot read a light code on a dark ground), with a quiet zone. Give it a name for screen readers.

    AQ5QZXJjZW50IENvZmZlZQIPMzEwMTIzNDU2NzAwMDAzAxQyMDI2LTAyLTE4VDA5OjMwOjAwWgQFNjkuMDAFBDguNzQ=

    ZatcaQr

    The ZATCA QR code of a simplified tax invoice: seller, VAT number, time, total and VAT in TLV, base64 encoded. An empty seller, VAT number or time is an error. An Invoice with a QR code needs the real time of issue (timestamp).

    TCK-1024

    Cannot download last month's invoice

    Open
    Sara Alqahtani
    The download button shows an error for the January invoice.

    Attachments

    Omar Alharbi
    Internal note
    The PDF job failed on the 31st. Running it again now.
    TicketView

    A support ticket: the conversation with internal notes and attachments, the reply form, and the ticket details beside it on wide screens.

    Saudi and bilingual kit 7

    1,25099.50

    formatMoney(1250, { decimals: 2 }) = 1,250.00

    Money, formatMoney

    Amounts: the Riyal sign left of the number with a space, Western digits, in both directions. Never “SAR”. maxDecimals keeps up to 6 decimals for unit prices; accounting puts negative amounts in brackets. Zero never shows a minus sign, and a broken amount shows “—”.

    PhoneText

    A stored phone number for display: grouped, left to right, as a call link, with an optional WhatsApp link. A value that is not a valid GCC number shows as it is, without links.

    SaudiPlate

    A Saudi private plate: the digits on the left, the letters on the right, Arabic on top and Latin below, in the same order. The middle strip shows the emblem, «السعودية», K S A and the private-car circle. It reads left to right on every page, and a screen reader hears the plate in the page language. It sizes with its box (sm, md, lg) and uses the page colours. plateSearchText gives one text for search in both alphabets and both digit forms.

    18 February 2026

    1 Ramadan 1447 AH

    01/09/1447 AH

    formatDate

    Gregorian and Hijri (Umm al-Qura) dates with Western digits. Riyadh time by default, so the server and the browser agree.

    Open until

    2 months ago

    Sunday 27 September 2026, 3:45:12 PM

    TimeText

    Dates and times in Riyadh time on a 12-hour clock (hourCycle="h23" on TimeText, formatDateTime or PercentProvider gives 24 hours: 15:05; agoForm="short" gives "5 min ago"): the time for today, a word for yesterday and tomorrow, the day for older dates. Hover, focus or tap shows the exact value. A time without a zone is read as UTC. kind="time" shows the clock only, for lists grouped by day; the tooltip has the full date and time. formatTimeOfDay shows a time of day such as opening hours. inSentence writes “today”, “yesterday” and “tomorrow” in lower case, for a time inside a sentence (“until tomorrow 3:45 PM”). formatDateTime takes the same option.

    • ✓ IBAN
    • ✗ National ID
    • ✗ CR
    • ✗ VAT

    SA03 8000 0000 6080 1016 7519

    Validators

    Checks for Saudi numbers. They accept spaces and Arabic digits, and work on the server.

    رقم الطلب ⁦#4821-B⁩ جاهز للاستلام.

    رقم الطلب #4821-B جاهز للاستلام.

    isolate

    Keeps ids, codes and English words whole inside Arabic text (Unicode isolates).

    Motion 16

    We build software

    Design, engineering and operations in one studio.

    ScrambleText

    The language-switch scramble. The real text stays in the DOM; reduced motion switches at once.

    Case study

    Masar

    Fleet tracking for a logistics company.

    Reveal

    Rises into view once. Hidden only when JavaScript runs; a fade with reduced motion.

    SlashReveal

    Media opens with a wipe at the angle of the % slash, in the reading direction. The angle never mirrors.

    • Masar
    • Nahj
    • Tuwaiq
    • Rawabi
    • Sahm
    • Watad
    • Qimam
    Marquee

    Endless row (client logos). Speeds up with scrolling, pauses on hover, stops with reduced motion.

    LogoLoader

    The Portal loop: logo → Arabic → logo → English → logo, 7.2 s. The still icon with reduced motion; runs only on screen.

    Magnetic

    Primary buttons lean toward a nearby mouse. Not on touch, not with reduced motion.

    Masar
    ViewCursor

    A “View” circle over [data-cursor="view"] links. Decoration only.

    Plays on view, hover and focus.

    usePlayOnce

    Plays a picture's CSS animation on view, hover and focus.

    48

    projects shipped

    1,250,000

    monthly users

    Counter

    Counts up when on screen. Screen readers and pages without JavaScript get the final number.

    Design

    ScenePlayer

    Play/pause and step dots for a looping scene. Required for large motion that plays with reduced motion.

    A form that sends.

    useSuccessWipe

    A band at the slash angle covers a form and leaves the success message behind it.

    We design, build and run software for companies in Saudi Arabia.

    RevealText

    A heading whose words rise out of a mask once, when on screen, line after line. Words are never split, so Arabic letters stay joined. Screen readers read the text once. A fade with reduced motion. The children are one plain string (no elements).

    1,250

    per month

    NumberRoll

    Digits roll to the new value when it changes (prices, totals). The first render shows the value as it is. Screen readers get only the value. No roll off screen or with reduced motion.

    1. Riyadh
    2. Jeddah
    3. Makkah
    4. Madinah
    5. Dammam
    6. Abha
    useFlip

    Reorder glide: give each item a stable data-flip id; when the deps change, moved items glide to their new place, new items fade in, removed items leave at once. Kanban, List (rows with data-flip) and FilterBar tags use it. The focus stays; no animation with reduced motion.

    app/root.tsx
    // app/root.tsx: opt in on <html>, "fade" or "slash".
    <html lang={lang} dir={dir} data-page-transition="slash">
    
    // The app's link passes viewTransition to React Router,
    // except for links to a place on the same page.
    const RouterLink = ({ href = "#", ...p }: ComponentProps<"a">) => (
      <Link to={href} viewTransition={!href.startsWith("#")} {...p} />
    );
    <PercentProvider lang={lang} link={RouterLink}>…</PercentProvider>
    
    // Navigating from code:
    navigate("/en/work", { viewTransition: true });

    Try it: open the page p-slash-hover.

    data-page-transition

    Page changes with the browser's View Transitions. Opt in on <html>: fade (a short cross-fade) or slash (the new page wipes in behind an edge at the slash angle, in the reading direction). Navigate with React Router's viewTransition: make the link of PercentProvider pass it. Without the attribute nothing changes; browsers without View Transitions navigate as usual. No animation with reduced motion.

    Read the privacy policy.

    p-slash-hover

    A class for secondary and ghost buttons and links: on hover and keyboard focus a fill wipes in behind an edge at the slash angle, in the reading direction, and the text turns to the page colour. Not for primary buttons: their fill is already there. No hover state on touch. With reduced motion, and in browsers without lh or atan() (Chrome < 111, Safari < 16.4, Firefox < 120), the fill fades in.

    Utilities 3

    0 items

    LiveRegion

    Announces changes to screen readers.