inclusive-kit
v0.3

Forms for
every human.

Zero-dependency toolkit for inclusive forms: field factories, assumption-free validators, an inclusive-language engine, and a form auditor that scores your UX. TypeScript-first, ESM + CJS, tree-shakeable.

pnpm add inclusive-kit
0 dependencies 155 tests 52 identities 11 pronoun sets 130 language rules EN Β· ES
Getting started

Quickstart

Install once, import only what you need. Every module ships as a subpath export, so unused locales and modules are removed by tree-shaking.

# pick your package manager β€” all fully supported
npm  install inclusive-kit
pnpm add     inclusive-kit
yarn add     inclusive-kit
bun  add     inclusive-kit
import { genderField } from "inclusive-kit/fields";
import { analyze, rewrite } from "inclusive-kit/text";
import { auditForm } from "inclusive-kit/audit";
import { listIdentities, flagSvg } from "inclusive-kit/registry";

// One call β†’ a fully inclusive gender field with a11y metadata
const field = genderField({ locale: "en", allowSelfDescribe: true });
Overview

Modules

ImportWhat it gives you
inclusive-kit/fieldsField factories: gender, pronouns, honorific, name β€” options + a11y metadata + a why explanation.
inclusive-kit/validateValidators without exclusionary assumptions: Unicode names, mononyms, no age caps.
inclusive-kit/textInclusive-language analyzer + auto-rewriter. 75 EN / 55 ES rules + your own custom rules.
inclusive-kit/auditForm scorer: detects binary-only gender, name splits, required sensitive fields. CI-friendly.
inclusive-kit/registry52 gender identities with localized descriptions, pride flags as SVG/CSS, fuzzy search.
inclusive-kit/pronouns11 pronoun sets with five declined forms each, plus conjugate() for pronoun-safe templates.
Overview

Use cases

Where teams plug inclusive-kit in β€” from a single signup form to organization-wide content review.

◍
SaaS signup & onboarding

Drop genderField() and nameField() into your signup flow. One full-name field accepts mononyms and Unicode; gender is optional with self-describe built in.

fieldsvalidate
β—¨
HR & people platforms

Use mode: "extended" for detailed identity collection in HRIS, plus pronoun sets so directories and org charts address everyone correctly.

fieldsregistrypronouns
βœ‰
Personalized email & UI copy

conjugate() renders pronoun-safe templates: "{Subject} finished {possessiveDeterminer} onboarding" becomes correct for every user β€” they, ze, elle, anyone.

pronouns
βŒ—
Content review in CI

Run analyze() over UI strings and docs in your pipeline. Add your company glossary via customRules; fail the build on high-severity findings.

text
β—”
Form auditing at scale

auditForm() scores every form in your design system. Product teams get a number to improve; compliance gets a report with concrete fixes.

audit
❋
Education & healthcare intake

Registry descriptions (EN/ES) power respectful intake forms and glossaries. Cultural identities stay opt-in β€” shown only where the context genuinely calls for them.

registryfields
Registry

Identities

A structured catalog of gender identities β€” each with localized name and description, category, pronoun hints, and pride flag data. Cultural identities are opt-in: they carry deep cultural context and don't belong in generic dropdowns.

import { listIdentities, searchIdentities } from "inclusive-kit/registry";

listIdentities({ locale: "es" });                       // 28 non-cultural
listIdentities({ locale: "es", includeCultural: true }); // all 35
searchIdentities("she/her", { locale: "en" });          // match id, alias, pronouns
Live demo
Search
βŒ•
Locale
Registry

Pride flags

Flags are generated from stripe color arrays β€” as inline SVG or a CSS gradient. Zero image assets, crisp at any size, with accessible <title> baked in.

import { flagSvg, flagCss } from "inclusive-kit/registry";

flagSvg("non-binary", { width: 200, rounded: true }); // β†’ "<svg …>"
flagCss("transgender"); // β†’ "linear-gradient(180deg, #55CDFC 0%…)"
Live demo Β·
Pronouns

Pronoun sets

Eleven fully-declined pronoun sets β€” 8 English (including ze, xe, fae, ey neopronouns) and 3 Spanish (elle, ella, Γ©l). Each carries subject, object, both possessives, reflexive, and a plural-verb flag. conjugate() turns pronoun-safe templates into correct sentences for emails and personalized UI.

import { getPronounSet, conjugate, formatPronounSet } from "inclusive-kit/pronouns";

const ze = getPronounSet("ze");
conjugate("{Subject} took {possessiveDeterminer} keys.", ze);
// β†’ "Ze took zir keys."

formatPronounSet(ze);          // "ze/zem"
formatPronounSet(ze, "full");  // "ze/zem/zir/zirs/zirself"
Live demo
Locale
Pronoun set
Template
Result
Set forms
Fields

genderField()

One factory, three modes. Every result includes prefer-not-to-say by design, is never required, and carries a why string explaining the inclusive design decision to the integrating developer.

ModeOptionsUse when
compact8 curatedGeneral signup forms (default)
extendedFull registry, groupedDetailed identity collection, HR, research
customYour registry idsYou know your audience
genderField({ locale: "es", mode: "extended", allowSelfDescribe: true });
Live demo
Mode
Locale
View raw genderField() output β†’

            
Validate

Validators

Validators that reject genuinely invalid input β€” not valid humans. Unicode names, mononyms, compound names, no upper age caps.

import { validatePersonName, validateBirthDate } from "inclusive-kit/validate";

validatePersonName("MarΓ­a-JosΓ© O'Neill ι™³"); // { valid: true }
validatePersonName("X");                     // mononyms are valid
validateBirthDate("1930-01-01");             // { valid: true, age: 96 }
Live demo

validatePersonName()

validateBirthDate()

Text

analyze()

Scans text against 75 English and 55 Spanish rules across four categories β€” gender, disability, age, ethnicity. Word-boundary matched, case-insensitive, with constructive suggestions on every finding.

import { analyze } from "inclusive-kit/text";

const { findings } = analyze(text, { locale: "en" });
// findings: [{ term, matched, index, category, severity, suggestions, note }]
Live demo
Input text
Locale
Custom rules Β· term = suggestions
Ignore terms
Highlighted
Findings
Text

Custom rules

Bring your company glossary. Custom rules merge with the built-in locale pack, support any category string, and ignoreTerms silences rules you disagree with β€” built-in or custom.

import { analyze, defineRule } from "inclusive-kit/text";

const brandRules = [
  defineRule({
    term: "blacklist",
    category: "brand-glossary",   // any string works
    severity: "high",
    suggestions: ["blocklist", "denylist"],
  }),
];

analyze(text, {
  locale: "en",
  customRules: brandRules,        // merged with built-ins
  ignoreTerms: ["guys"],          // silence any rule, case-insensitive
});
// rewrite() accepts the same options

Try it in the analyze() demo above β€” the "Custom rules" and "Ignore terms" inputs feed straight into the engine.

Text

rewrite()

Goes one step further than analyze: applies the first suggestion for every finding, preserving case (Mankind β†’ Humankind, MANPOWER β†’ WORKFORCE) and processing right-to-left so indices never shift.

const { text, changes } = rewrite(input, { locale: "en" });
// changes: [{ original, replacement, index, category, severity }]
Live demo
Input text
Locale
Original
Rewritten
Changes
Audit

auditForm()

Feed it your form definition, get a 0–100 inclusivity score plus actionable issues. Detects binary-only gender, name splits, required sensitive fields, forced honorifics, and non-inclusive label language. Wire it into CI.

const { score, issues } = auditForm({
  fields: [
    { id: "gender", type: "select", options: ["Male", "Female"], required: true },
  ],
});
// score: 40 Β· issues: [binary-gender, missing-pnts, required-gender]

Penalties: high βˆ’25 Β· medium βˆ’10 Β· low βˆ’5 Β· info βˆ’2.

Live demo
Locale
Fields
β€”
Inclusivity score
Issues