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 });
Modules
| Import | What it gives you |
|---|---|
inclusive-kit/fields | Field factories: gender, pronouns, honorific, name β options + a11y metadata + a why explanation. |
inclusive-kit/validate | Validators without exclusionary assumptions: Unicode names, mononyms, no age caps. |
inclusive-kit/text | Inclusive-language analyzer + auto-rewriter. 75 EN / 55 ES rules + your own custom rules. |
inclusive-kit/audit | Form scorer: detects binary-only gender, name splits, required sensitive fields. CI-friendly. |
inclusive-kit/registry | 52 gender identities with localized descriptions, pride flags as SVG/CSS, fuzzy search. |
inclusive-kit/pronouns | 11 pronoun sets with five declined forms each, plus conjugate() for pronoun-safe templates. |
Use cases
Where teams plug inclusive-kit in β from a single signup form to organization-wide content review.
Drop genderField() and nameField() into your signup flow. One full-name field accepts mononyms and Unicode; gender is optional with self-describe built in.
Use mode: "extended" for detailed identity collection in HRIS, plus pronoun sets so directories and org charts address everyone correctly.
conjugate() renders pronoun-safe templates: "{Subject} finished {possessiveDeterminer} onboarding" becomes correct for every user β they, ze, elle, anyone.
Run analyze() over UI strings and docs in your pipeline. Add your company glossary via customRules; fail the build on high-severity findings.
auditForm() scores every form in your design system. Product teams get a number to improve; compliance gets a report with concrete fixes.
Registry descriptions (EN/ES) power respectful intake forms and glossaries. Cultural identities stay opt-in β shown only where the context genuinely calls for them.
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
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%β¦)"
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"
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.
| Mode | Options | Use when |
|---|---|---|
compact | 8 curated | General signup forms (default) |
extended | Full registry, grouped | Detailed identity collection, HR, research |
custom | Your registry ids | You know your audience |
genderField({ locale: "es", mode: "extended", allowSelfDescribe: true });
View raw genderField() output β
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 }
validatePersonName()
validateBirthDate()
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 }]
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.
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 }]
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.