v1.6.x-dev NDS IQ v6

Vanilla Design System

An open-source, vanilla implementation of Saudi Arabia's National Design System. Production-ready HTML, CSS, and JavaScript built from scratch with zero dependencies.

About The Project

Why it was built, and what it covers.

Credit to the Digital Government Authority (DGA) for its outstanding work in unifying Saudi Arabia's government websites and services under a single, coherent design language. The specifications published on Figma are clear and comprehensive; however, translating them into working code remains a challenge for most teams.

The DGA's official implementation is a React and Storybook component library that covers the core UI components. This project provides the same design system in plain HTML, CSS, and JavaScript, and includes all components, a layout system, page templates, documentation, and a complete development environment. No framework is required.

Who It's For

Built for the people delivering, customizing, and learning government-grade web development.

Government teams & agencies

Delivering DGA-compliant digital services on whatever stack they already use.

Freelancers

Shipping client sites quickly with a polished component library and page templates out of the box.

Students & fresh graduates

Learning core HTML, CSS, and vanilla JavaScript from a readable, production-grade codebase.

Teachers & trainers

Using real components, page templates, and patterns as study cases for web-development courses, bootcamps, or workshops.

Compliance Ready

Official DGA page templates, converted into live, working code and ready for deployment.

Every component adheres to the official design tokens, typography, spacing, and interaction patterns. The templates below cover the most common government service screens, ready to copy, populate with your content, and publish.

Form Template

Multi-step form layout with grouped text inputs, side stepper (vertical on desktop, radial on mobile), and a flat sub-hero.

Service Page Template

Government digital service with side info, breadcrumbs, and structured content layout.

Contact Us Template

Contact page with two-column form, country-code prefix, select, textarea, file upload, and a side info card with emergency contacts.

Content Template

Long-form editorial layout with article-style sections, numbered sub-sections, and a sticky on-this-page table of contents for in-page navigation.

Help & Support Template

Help hub with a flat sub-hero and a responsive grid of support-channel cards, each with a featured icon, description, availability, and response time.

About The Entity Template

Entity landing hub with a flat sub-hero and a responsive grid of topic cards, each with a featured icon, title, and navigation arrow.

FAQ Template

Frequently asked questions layout with a flat sub-hero, large accordion list, and a feedback call-to-action card for routing unresolved inquiries to support.

e-Participation Template

Engagement topics hub with a sub-hero and a responsive 4-column grid of text-only navigation cards for citizen participation entry points.

Social Media Template

Social channels hub with a flat sub-hero and a responsive grid of platform cards, each with a featured icon, name, and navigation arrow.

KPIs Template

Performance dashboard combining KPI counter tiles, pie, donut, line, and bar charts, and responsive data tables for portal and service statistics.

Search Template

Search results layout with keyword highlighting, filter/sort dropmenus, and paginated card list.

404 Template

Custom error page with illustration and back-to-home action.

Real-World Examples

5 composed pages showing NDS components working together in real government service contexts.

Services List

Filterable government services catalog with search and category filters.

Service Filter Search Pagination
Registration

Multi-step form with validation, OTP, file upload, and Hijri date selection.

Form Stepper OTP Upload Date Picker
Faculty Profile

Faculty member page with profile, tabbed content, and structured academic information.

Content Tabs Avatar Definition List
Academic Program

Degree program page with expandable content, curriculum, and admission information.

Content Expandable Accordion
Console

Admin console with charts, transactions, team directory, and notifications.

Dashboard Charts Tables Stats

Event Themes

Seasonal theme packs for national occasions. Each one re-skins the whole site from a single drop-in tag, and removing it restores the default when the event ends.

Foundation Day theme preview
Foundation Day

Re-skin the whole site for Saudi Founding Day with one script tag: the heritage brown palette and a configurable bilingual hero slide, in both light and dark mode.

Theme CSS JS
Details
Hajj theme preview
Hajj

Re-skin the whole site for the Hajj season with one script tag: a Saudi-font hero, a direction-aware backdrop, and seasonal section accents, in both light and dark mode.

Theme CSS JS
Details

Components (91)

Each with markup, styling, and JavaScript behavior. All built from scratch.

Accessibility

Site-wide panel for accessibility presets, typography tuning, and visual filters

Add-ons JS CSS Add-on v1.0.5
Accordion

Expandable content panels with nested group support

UI JS CSS v1.0.0
Alert

Contextual messages for status, warnings, and notifications

UI CSS v1.0.0
Autocomplete

Type-ahead search with filtered suggestions

Forms JS CSS v1.0.0
Avatar

Profile images, initials, and group stacks

UI CSS v1.0.0
Block

Titled content grouping primitive for sub-sections inside a section body

Layout CSS v1.0.0
Breadcrumb

Hierarchical path showing the current page location

UI CSS v1.0.0
Buttons

Interactive actions with multiple variants, sizes, and states

UI CSS v1.0.0
Cards

Versatile content containers for articles, profiles, and actions

UI CSS v1.0.0
Chart

Lightweight SVG charts: bar, line, pie, and donut

Data JS CSS v1.0.0
Checkbox

Multi-select toggles for options and preferences

Forms CSS v1.0.0
Chips

Compact labels for tags, filters, and selections

UI CSS v1.0.0
Clock

Real-time clock with Hijri/Gregorian date

UI Shell JS API v1.0.0
Code

Formatted code blocks with syntax highlighting and copy

UI CSS v1.0.0
Content Placeholder

Dashed stand-in marking a region a real component will replace

Utilities CSS v1.5.0
Content Switcher

Toggle between content sections within the same space on the screen

UI JS CSS API v1.6.0
Cookies

Privacy-compliant cookie management banner

Utilities JS CSS v1.0.0
Cooldown Button

Click-disabled countdown button for resend, retry, and rate-limited actions

UI JS CSS API v1.0.0
Copy

One-click clipboard copy with checkmark feedback and screen reader announcement

Utilities JS CSS v1.0.0
Counter Animation

Scroll-triggered animated counters that count up to a target value

Utilities JS v1.0.0
Currency

SAR and international currency symbols appended automatically via data attribute

Utilities CSS v1.0.0
Date Picker

Hijri/Gregorian calendar with dual date conversion

Forms JS CSS API v1.0.0
Definition List

Structured key-value pairs in grid or list layouts

UI CSS v1.0.0
DGA Digital Stamp

Government authority verification panel

UI Shell JS CSS v1.0.0
Divider

Horizontal or vertical rule with optional centered label

Utilities CSS v1.0.0
Document Head

Critical CSS, deferred bundles, and the inline gate every page loads in its head

UI Shell JS CSS v1.1.0
Drawer

Collapsible navigation lists with accordion groups

UI JS CSS v1.0.0
Dropmenu

Toggle-activated overlay for actions and navigation

UI JS CSS v1.0.0
Editor

Rich text field that submits clean NDS markup, converting Word, Google Docs, and web pastes and inserting NDS components as blocks

Forms JS CSS API Beta v1.4.0
Empty

Parent-adaptive placeholder for containers with no content

UI JS CSS v1.0.0
Expandable Content

Show more/less toggle for long content blocks

Utilities JS CSS v1.0.0
Export

Declarative CSV, Excel, and PDF downloads from any table, card list, or marked-up container

Data JS CSS v1.1.0
Featured Icons

Decorative icon containers with shape and color options

UI CSS v1.0.0
Feedback Icons

Semantic status icons for success, error, and info

UI CSS v1.0.0
File Upload

Drag-and-drop file input with preview and validation

Forms JS CSS v1.0.0
Filter

Applied filters with search, URL sync, and remote data

Data JS CSS API v1.0.0
Flex

Quick alignment, direction, and wrapping with custom-property overrides

Layout CSS v1.0.0
Floating Action Button

FAB that pins to a viewport corner and stacks with others

UI JS CSS v1.5.0
Footer

Multi-column footer with light and green variants

UI Shell CSS v1.0.0
Grid

Responsive column system with flexible breakpoints

Layout CSS v1.0.0
Header

Top bar and primary navigation shell with mega menus and mobile drawer

UI Shell JS CSS API v1.0.0
Hero

Full-width page banners with slider and call-to-action

UI Shell JS CSS v1.0.0
Hidden

Visibility utilities: the hidden attribute honored everywhere and band-exact responsive hiding with data-hidden

Utilities CSS v1.4.0
Icons

The HugeIcons Stroke Rounded font for content plus a curated inline SVG set for components and chrome, with sizing, color, and license guidance

Foundations CSS v1.4.0
Image Popup Viewer

IPV fullscreen image preview with zoom and navigation

UI JS CSS v1.0.0
Link

Inline navigation with color variants and automatic external-link detection

UI CSS JS v1.0.0
Loading

Spinners and skeleton placeholders for loading states

UI CSS v1.0.0
Metric

Dashboard tile pairing a key statistic with an inline sparkline

Data CSS v1.0.2
Modal

Focused dialog overlays for confirmations and forms

UI JS CSS API v1.0.0
Multiselect

Multi-option select over a native checkbox group: removable chips, JSON-populated options, staged or instant commit

Forms JS CSS API v1.0.0
Number Input

Numeric field with increment and decrement controls, min/max, and step

Forms JS CSS v1.0.0
Numbers

Locale-aware thousand separators for any number on the page

Utilities JS v1.0.0
OTP Input

Segmented one-time password fields with auto-advance

Forms JS CSS v1.0.0
Pagination

Page-by-page navigation for large data sets

UI JS CSS v1.0.0
Panels

Content-agnostic surface that slides in from any edge of the viewport

UI JS CSS v1.5.0
Persona

Identity block with avatar, name, role, and optional action row

UI CSS v1.0.0
Progress

Visual indicators for task completion and loading

UI CSS v1.0.0
Prose

Default styling for classless flowing content from editors and CMSs

Layout CSS Next release
Quote

Semantic quotation block with optional title and author attribution

UI CSS v1.0.0
Radio

Single-choice selection within a group

Forms CSS v1.0.0
Rating

Star-based display and input for user ratings

UI JS CSS v1.0.0
Request

Fetch wrapper with a timeout, a response size cap, and errors you can branch on

Utilities JS v1.6.0
Saudi Cities

Bundled JSON dataset of 132 Saudi Arabian cities with bilingual names, drop-in for autocomplete and address flows

Utilities Data v1.0.0
Scroll More

Overflow wrapper with edge mask-fade and sticky show-more button

UI JS CSS v1.0.0
Section

Page content sections with head, body, and action areas

Layout CSS v1.0.0
Selection

Selected-items counter for tables, card grids, and checkbox lists, with a records-line swap while a selection is active

Data JS v1.4.0
Selects

Native dropdown menus for choosing from a list

Forms JS CSS v1.0.0
Share

Social share dropmenu for X, LinkedIn, WhatsApp, and copy link

Utilities JS CSS v1.0.0
Side Info

Companion column for service details, progress, and in-page navigation

UI Shell JS CSS API v1.0.0
Side Menu

Collapsible nested sidebar navigation

UI Shell JS CSS v1.0.0
Slider

Numeric range input with single-thumb and dual-thumb modes for picking a value or a min–max span

Forms JS CSS v1.2.0
Sort

DOM-reorder engine for lists, grids, and tables with type auto-detect and URL sync

Data JS API v1.0.0
Stepper

Sequential step indicators for multi-stage workflows

UI CSS v1.0.0
Swiper

Touch-enabled carousel for images and content slides

UI JS CSS v1.0.0
Switch

Binary on/off toggles for settings and preferences

Forms CSS v1.0.0
Tables

Data grids with sorting, pagination, and expandable rows

Data JS CSS API v1.0.0
Tabs

Switchable content panels with horizontal tab navigation

UI JS CSS API v1.0.0
Tag Input

Free-text tags committed as removable chips while typing, posted natively as an array

Forms JS CSS API v1.4.0
Tags

Small labels for categorization and metadata

UI CSS v1.0.0
Text Inputs

Single-line fields with labels, icons, and validation

Forms JS CSS v1.0.0
Textareas

Resizable multi-line text fields

Forms CSS v1.0.0
Themes

Light and dark mode, plus brand theming: generate a full palette from OKLCH seed colours, or override the design tokens with a stylesheet theme

Foundations CSS JS v1.1.0
TOC

Auto-populated in-page table of contents with active-section tracking

UI JS CSS API v1.0.0
Tokens

Every CSS custom property in the system: palette, primitive scales, semantic meanings, and component dials to reference and override

Foundations CSS v1.2.0
Toolbar

Controls bar above a table, list, or grid: result counts and applied filters lead, export and actions trail

UI CSS v1.4.0
Tooltip

Click-activated balloon for contextual help next to a term or field

UI JS CSS API v1.0.0
Top Bar

Government branding bar with date, weather, and dark mode toggle

UI Shell JS CSS v1.0.0
Truncate Text

Line-clamped overflow with expand/collapse toggle

Utilities CSS v1.0.0
User Feedback

Satisfaction surveys and inline rating forms

Forms JS CSS v1.0.0
Voice Input

Voice-to-text button that dictates into a text field, with Arabic/English auto-detection

Forms JS API v1.0.0
Weather Widget

Live weather display from GPS coordinates

UI Shell JS CSS API v1.0.0
Performance

Architecture & Performance

Built with a performance-first and compatibility approach.

View the PageSpeed Insights report

Zero Dependencies

No Bootstrap, Tailwind, jQuery, or framework runtime. The output is plain HTML, CSS, and JavaScript that works in any environment. No conflicts with existing scripts or stylesheets. Drop it into any project regardless of tech stack.

Smart Component Loader

A single DOM sweep detects which components a page uses and initializes them in priority tiers: critical ones first to unblock first paint, then the rest on idle. Deferred and page-specific bundles are fetched only when their components are present, so each page downloads and runs only the JavaScript it actually uses.

RTL/LTR Native

Built with CSS Logical Properties from the start. Margins, paddings, borders, and positions adapt automatically. No separate RTL stylesheet. No overrides. Switch direction with a single HTML attribute.

4-Tier Design Tokens

Palette, primitives, semantic, and component tokens, all defined as CSS custom properties. Each component exposes public properties for customization while keeping internal styles private, no overrides needed.

Theming & Dark Mode

Light and dark mode out of the box, plus full re-branding: generate an entire palette from a single OKLCH seed color, pick a predefined theme, or drop in a stylesheet theme. All driven from one HTML attribute, with no rebuild.

~10 KB Critical CSS (gzipped)

Critical styles load immediately for instant render. The rest is deferred and loads asynchronously without blocking the page. Styles are split between critical and non-critical at the build level.

5-Stage Reveal

First paint is layered across five render-safe stages — inline critical skeleton → critical stylesheet → main stylesheet → main JavaScript → icons & font. Each stage paints correctly or holds hidden, never a flash of unstyled content, and icons load last to stay clear of the LCP window.

~35 KB Core JS (gzipped)

The full library is ~93 KB gzipped, but it never ships at once. A lean ~35 KB core loads on every page, while late-safe and page-specific components live in separate bundles the loader fetches only when their markup is present. A typical page runs a fraction of the library.

Web Vitals Compliant

100% Google PageSpeed score. LCP, CLS, and INP all pass. Measured and optimized for real-world conditions. Tested across desktop and mobile on both fast and limited connections.

Sleek Animations

GPU-accelerated animations with optimized scheduling deliver smooth transitions even on lower-end devices, with a native application feel. Off-screen elements are not rendered until needed.

Development Environment

Everything needed to build, modify, and extend the system.

The project is built on Jekyll, a static site generator natively supported by GitHub Pages. It compiles templates, stylesheets, and data files into static HTML with no external toolchain.

Sass Architecture

Sass with a modular file structure. Each component has its own stylesheet. Variables, mixins, and design tokens are shared across all files. Jekyll compiles and minifies everything into a single CSS output.

Modular JavaScript

Vanilla JavaScript with one file per component, controlled by a smart loader. Only active components initialize on each page. A Ruby processor bundles and minifies with Terser into tiered outputs: a lean core plus deferred and page-specific bundles loaded on demand.

Liquid Templates

Jekyll's built-in template engine. Supports layouts, includes, partials, loops, conditions, and data binding. Pages are composed from reusable blocks with no duplicated markup.

YAML-Driven Data

YAML files act as a flat-file database for the project. Menus, navigation, hero content, and site configuration are stored as structured data and fed into templates at build time.

Custom Plugins

Custom Ruby scripts that extend Jekyll's build process. Handle JS bundling, HTML compression, baseurl resolution, and more. Each plugin is project-specific and fully editable.

AI Integration

Ships agent instructions in the cross-tool AGENTS.md format, picked up by Claude Code, Cursor, Codex, and other AI assistants, with custom skills for documentation, content creation, code review, and component auditing. The codebase is structured for effective AI-assisted development.

Get Started

Everything needed to adopt NDS: download the template, install the agent instructions, build the UI page by page, and stay current with upgrades.