SDGA Platforms Code → React 19

Saudi Arabia’s design system, as React.

An independent, MIT-licensed implementation of the DGA Platforms Code, 65 accessible React 19 components. RTL-native, dark-ready, WCAG 2.2 AA.

Live · flip the theme ↑
Building permitStep 2 of 4
رخصة بناءالخطوة 2 من 4

A government website registered with the Digital Government Authority.

Install
npm i @dev-dga/react @dev-dga/css @dev-dga/tokens
65components
3packages
WCAG 2.2 AA
RTL + Arabic
Dark mode
React 19

About the library

One system, every government platform.

dev-dga turns Saudi Arabia’s DGA Platforms Code into a real, installable React library - so teams ship consistent, accessible, Arabic-first products without rebuilding the basics.

Faithful to the spec

Colors, typography, spacing and components mirror the official DGA Platforms Code, measured value-for-value.

Arabic-first

Right-to-left and IBM Plex Sans Arabic are the default case, not a later patch.

Composable & typed

React 19, cva variants, asChild composition, and full TypeScript types on every prop.

MIT licensed

Independent and free to use under the MIT license. Not affiliated with the official DGA.

Installation

Install, wrap, ship.

Add the three packages, import the CSS once, and wrap your app in the provider. That’s the whole setup.

Install the packages

npm i @dev-dga/react @dev-dga/css @dev-dga/tokens

Import the styles once (e.g. in your root layout)

import '@dev-dga/css';

Wrap your app and start composing

import { DgaProvider, Button } from '@dev-dga/react';export default function App() {  return (    <DgaProvider dir="rtl" mode="light" theme={{ primary: 'saGreen' }}>      <Button>ابدأ الآن</Button>    </DgaProvider>  );}

Theming

One token, the whole system follows.

Swap the primary palette on the provider and every component re-tones - hover and active states are derived automatically with color-mix().

theme = { primary: 'info' }live
FeaturedBeta

RTL & Arabic

Right-to-left is the default case.

Set dir="rtl" on the provider and the entire layout mirrors - using logical properties throughout. IBM Plex Sans Arabic covers Arabic and Latin from one family.

dir="ltr"English

Renew vehicle registration

Letters and numbers

EligibleSR 300
dir="rtl"العربية

تجديد استمارة المركبة

أحرف وأرقام

مؤهلة300 ر.س

Dark mode

Every surface reads correctly in dark.

Dark mode is built on the --ddga-* variables plus colors chosen per surface, not a mechanical inversion of light. The same component works in both modes with no divergence.

mode="light"light

Renew vehicle registration

Letters and numbers

EligibleSR 300
mode="dark"dark

Renew vehicle registration

Letters and numbers

EligibleSR 300

Accessibility

WCAG 2.2 AA, proven by tests.

Radix primitives for the hard widgets, real keyboard semantics tested in a browser, and axe assertions that fail the build.

Radix primitives

Menus, dialogs and tabs wrap battle-tested primitives for correct ARIA and focus management.

Real keyboard semantics

Roving tabindex, focus traps, arrow-key nav and Escape are verified in Playwright.

Tested with axe

Every component has vitest-axe assertions, so accessibility regressions fail the build.

Visible focus

A consistent focus ring on the ink color, honoring prefers-reduced-motion.

Architecture

Three packages, one direction of flow.

Tokens are the source of truth; the CSS package turns them into cascade-layered variables; the React package ships no CSS - only classes that resolve them.

Demo examples

Real screens, built entirely from the library.

See the components composed into complete products - dashboards and services, in Arabic and English, light and dark.

Dashboard

Masar

A government services dashboard - KPIs, charts, a services table, and activity - assembled only from dev-dga components.

MIT · free to use · React 19

Build government platforms people can actually use.