Skip to main content
Login

Sign in to access your account

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.

The Digital Government Authority (DGA) sets one design system for Saudi Arabia's government websites and services. It publishes the specifications on Figma, and its official code is a React and Storybook library of the core UI components.

This project builds the DGA design system in plain HTML, CSS, and JavaScript. Plain web code works in any stack: static sites, server-rendered pages, or apps built with React or another framework. It brings no framework or dependencies of its own.

It goes beyond the components, with a layout system, DGA page templates, documentation, and a development environment. A team can build complete pages, not just single parts.

It is also built for AI-assisted development. NDS IQ, a versioned instruction system, gives AI coding agents a consistent way to build with NDS.

Who It's For

For teams and people who build, adapt, or learn government web development.

  • Government teams & agencies

    Deliver DGA-aligned digital services on the stack you already run.

  • Freelancers

    Build client sites with a reusable component library and ready page templates.

  • Students & fresh graduates

    Learn core HTML, CSS, and plain JavaScript from a readable, production-grade codebase.

  • Teachers & trainers

    Teach with real components, page templates, and patterns in web development courses, bootcamps, and workshops.

DGA Page Templates

DGA-compliant page templates, delivered as working code.

Built around DGA design tokens, typography, spacing, and interaction patterns, these templates provide practical starting points for common government service screens. Use them as-is or customize them to fit your project.

New
Life Journeys Template

Life journeys hub: a first-visit intro modal and how-it-works alert, and tabs for current, available and completed journeys with progress rings.

Home Page Template

Organization home page with a main hero slider, headline figures, a services card deck, a news row, and a partner logo strip.

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 the query in the heading, filter/sort dropmenus, and paginated card list.

404 Template

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

Real-World Examples

15 full pages that show NDS components working together in government services.

New
Student Portal

A student's home page with grades, today's classes, requests, exams and services.

Dashboard Drawer Date Tile Meta Countdown Content Switcher
Services List

Filterable government services catalog with search and category filters.

Service Filter Search Pagination
Sign In

National single sign-on with a credentials fallback, one-time code, and account settings.

Form Forms OTP Cooldown Button Alert
Faculty CV

Long-form academic profile with a table of contents, a career timeline, qualifications, and paginated publications.

Content Stepper TOC Divider Pagination Cards
Academic Program

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

Content Expandable Tabs
Manage Records

Records screen with create, edit and delete, filters, expandable detail rows and CSV export.

Dashboard Tables Sub-Rows Modal Filter
Console

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

Dashboard Charts Tables Stats
New
Job Apply

A job post with its application on the same page: the role, then one long form in groups, with each field picked by the kind of answer.

Form Multiselect Tag Input Slider Editor Upload
New
Track My Request

One request the user already sent: its history, what to do now, and the final answer, in four states.

Service Timeline Upload User Feedback Session Timeout
New
Events Calendar

A ministry's events page: a featured event with a countdown, the events in a Calendar by week or month, and booking in one shared panel.

Content Calendar Panel Countdown Filter Meta
New
Book an Appointment

Book a visit on one page, revealed in the order booking sites use: a service and a branch, then a day beside its free times, then your details, with a live summary that holds the Book button.

Form Autocomplete Custom Select Date Picker Radio Modal
New
Open Data

One dataset's page in open data portal order: what the data is, the rows as a table or a chart, the data dictionary, the files, the API and how to cite it, with the facts and related datasets beside them.

Content Table Chart Content Switcher Export Code
New
News Article

One news article in the order news sites use: a byline under the headline, prose with a quote and a photo gallery, Share and the author after it, related and most read news beside it, and more news.

Content Prose Quote Image Popup Viewer Share Swiper
New
Account Settings

A signed-in user's account in tabs of calm rows: each setting a row with its value and a Change button, each change in a small Modal, a new email or mobile confirmed with a code.

Form Tabs Checkbox Password Definition List Session Timeout
New
Support Inbox

A signed-in user's messages, read like letters: Inbox and Sent tabs, unread rows, one panel to read and reply, and a panel to write a new message.

Service Drawer Panel Tabs Empty Session Timeout

Event Themes

Theme packs for national occasions. One script tag applies a theme to the whole site. Remove the tag to restore the default.

National Day 96 theme preview
National Day 96

Re-skin the whole site for Saudi National Day with one script tag: the official six-slide campaign hero, identity bars under every section, and a themed footer, in both light and dark mode.

Theme CSS JS
Details
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

Library

Everything NDS ships, from design tokens to the JavaScript API. Filter by type, or search by name.

Showing 1–6 of 113 result(s)
  • Accessibility

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

    UI Shell JS CSS Add-on API v1.0.5
  • Accordion

    Expandable content panels with nested group support

    Components Content JS CSS API v1.0.0
  • Alert

    Contextual messages for status, warnings, and notifications, in the page or as a toast

    Components Feedback JS CSS API v1.0.0
  • Audit

    A check you run on a built page that lists NDS markup and CSS that fail with no error, and every name an NDS release changed

    Core JS API v2.0.0
  • Autocomplete

    Type-ahead search with filtered suggestions

    Components Forms JS CSS API v1.0.0
  • Avatar

    Profile images, initials, and group stacks

    Components Content CSS v1.0.0
  • Block

    Spacing unit for content and components, with an optional title

    Layout CSS v1.0.0
  • Breadcrumb

    Hierarchical path showing the current page location

    Components Navigation JS CSS API v1.0.0
  • Buttons

    Interactive actions with multiple variants, sizes, and states

    Components Actions CSS v1.0.0
  • Calendar

    The events of one week, as seven day columns or a list of rows, or of one month under its days

    Components Content JS CSS API v2.0.0
  • Cards

    Versatile content containers for articles, profiles, and actions

    Components Content CSS v1.0.0
  • Chart

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

    Components Data JS CSS API v1.0.0
  • Checkbox

    Multi-select toggles for options and preferences

    Components Forms CSS v1.0.0
  • Chips

    Compact labels for tags, filters, and selections

    Components Actions CSS v1.0.0
  • Clock

    The current time, in the site's timezone, that changes on the minute

    Components Content JS API v2.0.0
  • Code

    Formatted code blocks with syntax highlighting and copy

    Components Content JS CSS API v1.0.0
  • Content Placeholder

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

    Components Content CSS v1.5.0
  • Content Switcher

    Toggle between content sections within the same space on the screen

    Components Navigation JS CSS API v1.6.0
  • Cookies

    A consent panel that stores the visitor's cookie choice by category

    UI Shell JS CSS API v1.0.0
  • Cooldown Button

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

    Components Actions JS CSS API v1.0.0
  • Copy

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

    Utilities JS CSS API v1.0.0
  • Countdown

    Live count of the time left to a deadline or the end of a duration, as text or cards

    Components Feedback JS CSS API v2.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 JS CSS v1.0.0
  • Custom Select

    Styled single-choice dropdown with custom option markup and a JS API, built on dropmenu

    Components Forms JS CSS API v2.0.0
  • Date

    Show, parse, print and convert dates in Gregorian and Hijri (Umm al-Qura), in the site's timezone and date format

    Components Content JS API v2.0.0
  • Date Picker

    Hijri/Gregorian calendar with dual date conversion

    Components Forms JS CSS API v1.0.0
  • Date Tile

    One date in a small box, with the weekday, the day number and the month

    Components Content CSS v2.0.0
  • Definition List

    Structured key-value pairs in grid or list layouts

    Components Content 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

    Components Content 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

    Components Navigation JS CSS API v1.0.0
  • Dropmenu

    Toggle-activated overlay for actions and navigation

    Components Actions JS CSS API v1.0.0
  • Editor

    Rich text field that submits clean NDS markup, converting Word, Google Docs, and web pastes and keeping pasted NDS components

    Components Forms JS CSS API Beta v1.4.0
  • Empty

    Parent-adaptive placeholder for containers with no content

    Components Feedback JS CSS API 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

    Components Data JS CSS API v1.1.0
  • Featured Icons

    Decorative icon containers with shape and color options

    Components Content CSS v1.0.0
  • Feedback Icons

    Semantic status icons for success, error, and info

    Components Feedback CSS JS v1.0.0
  • File Upload

    File field with a drop zone, file checks and upload status

    Components Forms JS CSS API v1.0.0
  • Filter

    Applied filters with search, URL sync, and remote data

    Components 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 an edge of the viewport and stacks with others

    Components Actions JS CSS API v1.5.0
  • Footer

    Multi-column footer on the brand surface or light

    UI Shell CSS v1.0.0
  • Formatted Input

    Phone number, national ID, IBAN, Saudi plate, VAT number and custom-format fields that keep the value in its shape

    Components Forms JS CSS API v2.0.0
  • Grid

    Responsive column system with flexible breakpoints

    Layout CSS JS v1.0.0
  • Header

    The region at the top of the page where the top bar, digital stamp panel, and main navigation compose

    UI Shell CSS v1.0.0
  • Helper Classes

    Single-purpose classes for your own markup: centering, spacing reset, direction isolation, brand text color, and notes

    Utilities CSS v1.7.0
  • Helpers

    The shared functions page code can call: states, ARIA, observers, timers, scroll, focus, text, and validation rules

    Core JS API v2.0.0
  • Hero

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

    UI Shell JS CSS v1.0.0
  • Hidden

    CSS utilities that hide an element always, at chosen screen widths, or on screen only while screen readers still read it

    Utilities CSS v1.4.0
  • Icons

    Outline icons from the HugeIcons library, as a font with the full library for page content and a smaller built-in set for interface controls

    Foundations CSS v1.4.0
  • Image

    A photo cropped to fill a set shape, with a focal point and an optional overlay

    Components Content CSS v2.0.0
  • Image Popup Viewer

    Opens a thumbnail full screen, with zoom, pan and gallery navigation

    Components Overlays JS CSS API v1.0.0
  • Init

    Starts every component at load, and the calls that tell them a container changed

    Core JS API v1.7.0
  • Internationalization

    The text NDS components write, in one file per language that the page loads and a site can change or extend

    Core JS API v2.0.0
  • Link

    Inline navigation with color variants and automatic external-link detection

    Components Actions CSS JS v1.0.0
  • List

    A set of like items in a grid or in rows that fill, each a card that shares the list's look

    Components Content CSS v2.0.0
  • Loading

    Spinners and skeleton placeholders for loading states

    Components Feedback CSS v1.0.0
  • Main Navigation

    Primary navigation bar with branding, mega-menu dropdowns, search and language actions, and a mobile drawer

    UI Shell JS CSS API v1.0.0
  • Meta

    A line of short facts, each with an icon, such as a time, a place and a person

    Components Content CSS v2.0.0
  • Metric

    Dashboard tile pairing a key statistic with an inline sparkline

    Components Data CSS v1.0.2
  • Migration

    Every class, attribute, id, custom property, window setting, event and URL parameter that an NDS release renamed or removed, with what to write instead

    Guides JS CSS v2.0.0
  • Modal

    Focused dialog overlays for confirmations and forms

    Components Overlays JS CSS API v1.0.0
  • Multiselect

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

    Components Forms JS CSS API v1.0.0
  • Number Input

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

    Components Forms JS CSS v1.0.0
  • Numbers

    Locale-aware thousand separators for any number on the page

    Utilities JS API v1.0.0
  • OTP Input

    Segmented one-time password fields with auto-advance

    Components Forms JS CSS API v1.0.0
  • Page Layout

    The body structure every page shares, with the classes that switch chrome shape

    Layout CSS v1.8.0
  • Pagination

    Page-by-page navigation for large data sets

    Components Navigation JS CSS API v1.0.0
  • Panels

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

    Components Overlays JS CSS API v1.5.0
  • Password

    Password field with live strength rules and confirm-match checking

    Components Forms JS CSS API v1.7.0
  • Persona

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

    Components Content CSS v1.0.0
  • Print

    How a page prints, and a button that prints one part of the page alone

    Utilities JS CSS v2.0.0
  • Progress

    A circle or a bar that shows how much of a task is done

    Components Feedback JS CSS API v1.0.0
  • Prose

    Default styling for classless flowing content from editors and CMSs

    Layout CSS v1.7.0
  • Quote

    Semantic quotation block with optional title and author attribution

    Components Content CSS v1.0.0
  • Radio

    Single-choice selection within a group

    Components Forms CSS v1.0.0
  • Rating

    Star-based display and input for user ratings

    Components Content JS CSS API v1.0.0
  • Request

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

    Core JS API v1.6.0
  • Scroll More

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

    Components Content JS CSS API v1.0.0
  • Section

    Page content sections with head, body, and action areas

    Layout CSS v1.0.0
  • Selection

    Lets users pick items in any list, so one action can apply to all of them

    Components Data JS API v1.4.0
  • Selects

    Native dropdown menus for choosing from a list

    Components Forms JS CSS v1.0.0
  • Session Timeout

    Warning before an idle session ends, with a countdown and a way to stay signed in

    UI Shell JS API v2.0.0
  • Share

    Share buttons for X, LinkedIn, WhatsApp, other sites, the device's share sheet, and copy link, in a menu or a row

    Components Actions 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

    Components Forms JS CSS API v1.2.0
  • Sort

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

    Components Data JS CSS API v1.0.0
  • Status Section

    Whole-page or inline outcome message with a status icon, a title, and one action

    Layout CSS v1.10.0
  • Stepper

    Sequential step indicators for multi-stage workflows

    Components Navigation JS CSS API v1.0.0
  • Swiper

    Touch-enabled carousel for images and content slides

    Components Content JS CSS API v1.0.0
  • Switch

    Binary on/off toggles for settings and preferences

    Components Forms CSS v1.0.0
  • Tables

    Data grids with sorting, pagination, and expandable rows

    Components Data JS CSS API v1.0.0
  • Tabs

    Switchable content panels with horizontal tab navigation

    Components Navigation JS CSS API v1.0.0
  • Tag Input

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

    Components Forms JS CSS API v1.4.0
  • Tags

    Small read-only labels for categories, status, and metadata

    Components Content CSS v1.0.0
  • Text Inputs

    Single-line fields with labels, icons, and validation

    Components Forms JS CSS v1.0.0
  • Textareas

    Resizable multi-line text fields

    Components Forms JS 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
  • Time Picker

    Time field with hour, minute and second pickers in a dropdown panel

    Components Forms JS CSS API v2.0.0
  • Timeline

    Dated events in order, such as a request's history, with the events done, the current one and the ones to come

    Components Content JS CSS API v2.0.0
  • TOC

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

    Components Navigation JS CSS API v1.0.0
  • Tokens

    The CSS custom properties behind NDS: the color palette, size scales, semantic meanings and component tokens, with a preview of each

    Foundations CSS v1.2.0
  • Toolbar

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

    Components Data CSS v1.4.0
  • Tooltip

    A balloon of contextual help next to a term, a field or a button, opened on click or on hover

    Components Overlays JS CSS API v1.0.0
  • Top Bar

    The bar above the header: the digital stamp, strips that slide open below it, today's date, the time or the weather, and the dark mode button

    UI Shell JS CSS v1.0.0
  • Truncate Text

    Clips long text to a set number of lines

    Utilities CSS v1.0.0
  • User Feedback

    Satisfaction surveys and inline rating forms

    Components Forms JS CSS v1.0.0
  • Voice Input

    A microphone button that types what the user says into a text field, in the page language

    Components Forms JS API v1.0.0
  • Weather

    The current weather for one or more places, from their coordinates

    Components Content JS API v2.0.0
Performance

Architecture & Performance

Built for speed and wide browser support.

  • Zero Dependencies

    No Bootstrap, Tailwind, jQuery, or framework runtime. The output is plain HTML, CSS, and JavaScript, so it fits into an existing stack without a framework.

  • Smart Component Loader

    The loader scans the page once and starts the components it finds: critical ones first, the rest when the browser is idle. Extra bundles load only when their components are on the page, so each page runs only the JavaScript it uses.

  • RTL/LTR Native

    Built with CSS Logical Properties from the start. Margins, padding, borders, and positioning adapt to direction without a separate RTL stylesheet or directional overrides. Switch between RTL and LTR with a single HTML attribute.

  • 4-Tier Design Tokens

    Palette, primitive, semantic, and component tokens are defined as CSS custom properties. Components expose public properties you can set, and keep their internals private.

  • Theming & Dark Mode

    Light and dark modes are built in, with support for full re-branding. Generate a palette from a single OKLCH seed color, select a predefined theme, or load a stylesheet theme. Theme selection is controlled through a single HTML attribute and requires no rebuild.

  • ~10 KB Critical CSS (gzipped)

    The build splits the CSS in two. Critical styles load first; the rest load later without blocking the page.

  • 5-Stage Reveal

    The first paint arrives in five stages: inline critical skeleton → critical stylesheet → main stylesheet → main JavaScript → icons and font. Each stage shows only when it renders correctly, so there is no unstyled flash. Icons load last, so they do not delay the largest paint (LCP).

  • ~64 KB Core JS (gzipped)

    The full library is ~190 KB gzipped, but it is not loaded as a single bundle. A lean ~64 KB core loads on every page. Components that can wait, or that only some pages use, load only when their markup is present. A typical page runs a fraction of the library.

  • Web Vitals Compliant

    A Google PageSpeed score of 100, with LCP, CLS, and INP passing in the measured test. Performance is tested on desktop and mobile, over fast and slow connections.

  • Animations

    GPU-accelerated animations and scheduled rendering keep transitions smooth, even on low-end devices. Off-screen elements wait until they are needed.

Framework Support

NDS is plain HTML, CSS and JavaScript, so it is designed to work with any framework. No change to your stack is needed.

  • Tested Frameworks

    NDS is browser-tested with React 18 and 19, Vue 3.4 and 3.5, Svelte 4 and 5, and Angular 17 and 19. The tests also cover server-rendered React and Vue pages, and htmx and Turbo swaps and morphs.

  • Mount and Destroy

    Call NDS.init.mount() when a framework renders a view, and NDS.init.destroy() before it removes one. Destroy clears the view's listeners, open menus and modal backdrops.

  • HTML Swaps

    Turbo, htmx and Livewire swaps use the same two calls: destroy the old content before the swap, and mount the new content after it.

  • Server Rendering and Hydration

    NDS works with server-rendered apps in Next.js and Nuxt. Set data-no-auto-init on <html> so NDS waits until hydration ends.

  • Two-Way Binding

    NDS fields fire native input and change events when their value changes, so React onChange, Vue v-model, Angular ngModel and Svelte bind:value stay in sync.

  • Framework-Native Translations

    NDS changes only the text inside existing text nodes, so the framework's DOM stays as it rendered it. data-i18n markers in JSX, Vue and Angular templates keep working after the framework renders again.

Development Environment

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

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

  • AI Integration

    The NDS source is built to be worked on with AI coding agents. The repo includes its project rules and step-by-step workflows for common jobs, so an agent follows the same standards and runs the same checks as a developer.

  • Sass Architecture

    Sass uses a modular file structure with one stylesheet per component. Shared variables, mixins, and design tokens are available across the system. Jekyll compiles and minifies the styles into the final CSS output.

  • Modular JavaScript

    Vanilla JavaScript uses one source file per component and is controlled by the component loader. Only components present on a page initialize. 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 rather than duplicated markup.

  • YAML-Driven Data

    YAML files provide structured project data. Menus, navigation, hero content, and site configuration are stored as data and supplied to templates at build time.

  • Custom Plugins

    Custom Ruby scripts extend Jekyll's build process for tasks such as JavaScript bundling, HTML compression, and base URL resolution. Each plugin is project-specific and editable.

Professional Support

Need help with NDS implementation, custom components, or a complete website or portal? Professional support and development services are available on request.

Mazin Musleh Frontend Developer