Skip to content

About

Government of India Frotend Toolkit

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

IndGov Frontend Toolkit

A public-sector-inspired UI toolkit for Indian government services.

This starter toolkit is built for:

  • Indian heritage-informed visual identity
  • High usability for low digital literacy contexts
  • Multilingual interfaces across Indian scripts
  • State-level theming without duplicating component code
  • Progressive enhancement with lightweight JavaScript

What this includes

Enhancements beyond the baseline

  • Multiscript font stack for major Indian language families
  • Logical CSS properties (margin-inline, padding-block) to improve layout portability
  • Direction auto-detection helper (data-igds-auto-dir) for Urdu/Arabic contexts
  • Theme contract based on CSS variables for safe branding overrides
  • Mobile-friendly navigation and dismissible alert patterns out of the box

Install

npm install @govin/indgov-frontend

Or copy src/ and themes/ directly into your service repository.

Quick start (plain HTML)

<link rel="stylesheet" href="/node_modules/@govin/indgov-frontend/src/indgov.css" />
<link rel="stylesheet" href="/node_modules/@govin/indgov-frontend/themes/states.css" />

<script src="/node_modules/@govin/indgov-frontend/src/indgov.js"></script>
<script>
  IndGovFrontend.initAll();
</script>

Theme contract

Override these variables at app or state scope:

  • --igds-color-primary
  • --igds-color-primary-hover
  • --igds-color-secondary
  • --igds-color-link
  • --igds-color-link-hover
  • --igds-heritage-saffron
  • --igds-heritage-green

Example:

[data-igds-state="maharashtra"] {
  --igds-color-primary: #243c8f;
  --igds-color-primary-hover: #1c3073;
  --igds-color-secondary: #7a2f1f;
  --igds-color-link: #1f3275;
  --igds-color-link-hover: #152250;
  --igds-heritage-saffron: #f39b3d;
  --igds-heritage-green: #246b3f;
}

Multilingual guidance

  • Always set page lang correctly (en, hi, ta, bn, mr, etc.)
  • For mixed-language content, set lang at phrase level
  • Use concise service copy and avoid administrative jargon
  • Keep action labels under 3 words where possible
  • Validate forms in the same language used for input labels
  • Self-host required Noto Sans language families for consistent rendering in kiosk and low-connectivity environments

Adoption guides

Run local example

npm run start
# open http://localhost:4173/examples/

Run help portal preview

  • Home: http://localhost:4173/docs/help-portal/
  • Components docs: http://localhost:4173/docs/help-portal/components.html
  • Styles docs: http://localhost:4173/docs/help-portal/styles.html
  • Adoption docs: http://localhost:4173/docs/help-portal/adoption.html
  • Patterns docs: http://localhost:4173/docs/help-portal/patterns.html
  • Accessibility docs: http://localhost:4173/docs/help-portal/accessibility.html

Run accessibility audit

npm run a11y:audit

This static audit now scans:

  • help portal and examples (.html)
  • framework starter templates (.html, .cshtml, .erb, .blade.php, .vue)

Run browser accessibility tests

npm run a11y:e2e

Combined command:

npm run a11y:all

a11y:e2e uses npx to fetch Playwright + axe packages on demand.

About

Government of India Frotend Toolkit

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages