Saudi Arabia's Government Design System (كود المنصات), for Any Tech Stack
Saudi Arabia's Digital Government Authority (DGA) sets one design system for the country's government websites and digital services. In Arabic it is called كود المنصات (Platforms Code). The DGA provides the design speci
Saudi Arabia's Digital Government Authority (DGA) sets one design system for the country's government websites and digital services. In Arabic it is called كود المنصات (Platforms Code).
The DGA provides the design specifications through public Figma files, alongside an official React and Storybook library containing the core UI components.
This is a good foundation for teams working with React. But many government websites run on CMS platforms, server-rendered pages, or legacy technologies that are not built around React. Moving to a new framework is not always practical, and a component library alone is not enough to build complete pages. Teams also need layouts, headers, footers, page templates, and the patterns that bring everything together.
That's why I built NDS-vanilla: an independent, open-source implementation of the same design system using standard HTML, CSS, and JavaScript. It is released under the MIT license and is not affiliated with the DGA.
- Live documentation: https://mazin-musleh.github.io/NDS-vanilla/
- GitHub repository: https://github.com/mazin-musleh/NDS-vanilla
Why vanilla HTML, CSS, and JavaScript?
Standard web technologies work across virtually any environment: static websites, PHP or .NET applications, CMS themes, and even React or Vue projects.
There is no framework dependency, mandatory build process, or framework-specific version to maintain. Teams can adopt the components without changing their existing technology stack.
It also makes the implementation easier to understand and maintain. Developers can inspect the source code and see exactly how each component works, without needing to look through a framework abstraction or compiler output.
More than a component library
NDS-vanilla provides the building blocks for complete government websites, not just individual UI components.
- 110+ components: Buttons, forms and validation, modals, tables, charts, date pickers, tabs, a rich text editor, and many more.
- Complete layout system: A section model and responsive grid for composing full pages.
- Page structure: Top bar, header, main navigation, hero, side menu, side information, and footer.
- 16 DGA page templates: Ready-to-use pages covering services, FAQs, contact, search, KPIs, Life Journeys, and more.
- 15 complete examples: Practical implementations including a student portal, administration console, appointment booking, and other use cases.
Arabic-first, with full RTL and LTR support
The system is designed with Arabic as its default language and right-to-left (RTL) direction, while providing full English and left-to-right (LTR) support.
CSS logical properties, such as margin-inline-start and inset-inline-end, allow the same stylesheets to work in both directions without maintaining separate RTL and LTR styles.
Components ship with English and Arabic text and follow the page's lang. Any word can be changed, and a new language can be added by translating one JSON file of English strings, with no changes to NDS files. See the internationalization docs.
Dates were the hardest part. Saudi government services use both the Gregorian and the Hijri calendar, so the date picker supports both.
A single HTML attribute can switch the calendar for an individual field or the entire website:
<html lang="ar" dir="rtl" data-calendar="hijri">
The date picker also handles practical localization requirements, including automatic conversion when a Hijri date is pasted into a Gregorian field and recognition of Arabic-Indic digits as numeric input.
Performance by design
The complete library is approximately 190 KB gzipped, but individual pages do not need to load the entire library.
A core bundle of approximately 64 KB is loaded on every page, while component-specific scripts are loaded only when their corresponding markup is present. The documentation website scores 100 on PageSpeed Insights.
Accessibility built in
Government digital services must be accessible to everyone.
NDS-vanilla includes an accessibility panel that allows visitors to customize their browsing experience. Available options include dyslexia-friendly reading support, text size and spacing adjustments, motion reduction, a reading mask, and color filters.
Each preference stays in place as visitors move between pages.
Rebranding without a rebuild
The default look follows the DGA palette, but any organization can apply its own brand without touching component styles. See the theming docs.
Set a few seed colors on <html>, and NDS-vanilla builds the whole palette from them, dark mode included:
<html lang="ar" dir="rtl" data-palette
style="--brand-primary: #7c3aed; --brand-secondary: #ec4899;">
Only the primary seed is required.
For exact brand colors, use your own stylesheet instead. Load it right after the NDS critical CSS and set the color tokens at :root:
<link rel="stylesheet" href="assets/themes/my-brand.css">
:root {
--colors-primary-500: #25935f;
--colors-primary-600: #1b8354; /* your brand color */
--colors-primary-700: #166a45;
/* ... */
}
The same stylesheet can also set the brand font and add brand art, such as patterns and footer graphics.
The seasonal themes for Saudi Foundation Day, Hajj, and National Day are built the same way. Applying one requires only a single script tag.
Designed for AI coding agents
AI coding agents are increasingly involved in building and maintaining websites. However, they can sometimes generate plausible-looking markup and class names that do not actually belong to the design system.
To address this, NDS-vanilla includes NDS IQ (Integration Quality), a versioned instruction system that helps AI coding agents follow the implementation rules consistently.
The Get Started guide provides a setup prompt that downloads the NDS IQ instructions into the project and connects them to the agent through AGENTS.md or CLAUDE.md.
This allows Claude Code, Cursor, Codex, and other compatible agents to follow the same integration rules, including an important one: component markup must be copied from the NDS-vanilla doc pages rather than independently generated or guessed.
NDS-vanilla also includes a built-in markup auditing mechanism:
const findings = await NDS.init.audit();
The audit lists implementation issues, such as outdated class names with their replacements. An agent reads the findings and fixes the page.
Getting started
The quickest way to get started is to open the Get Started guide, copy the provided setup prompt, and give it to your coding agent.
The setup process installs the project template and configures the NDS IQ instructions. A manual two-step installation is also available for agents that cannot download files directly.
- Documentation: https://mazin-musleh.github.io/NDS-vanilla/
- Get Started: https://mazin-musleh.github.io/NDS-vanilla/guides/get-started.html
- Latest release: https://github.com/mazin-musleh/NDS-vanilla/releases/latest
Important: The default visual identity, including colors, logos, and the digital stamp, is intended exclusively for Saudi government entities. Other projects must replace these elements with their own visual identity before going live.
Feedback and issues are welcome.
Originally published by Dev.to WebDev. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.