Skip to content

Recipes — concrete, copy-pasteable

Each recipe shows one production-shaped pattern, end to end, using the real APIs the library ships. Code is copy-pasteable. Honest about what each primitive defends against AND what it does not.

RecipeWhat you shipPrimitives
Secure file uploadA file-input that verifies real magic bytes, not the Content-Type header — defends against polyglots and double-extension tricksTkxFileUpload + sniffMimeType
Tamper-evident audit trailSHA-256 hash-chained event log for SOC 2 / HIPAA / 21 CFR Part 11. Mutation is detectable in O(n).audit() + verifyAuditIntegrity() + getAuditLog()
PII redaction before LLMStrip SSN, Luhn-validated cards, email, phone, API keys before crossing the boundary to OpenAI / Anthropic / analyticsscrubPII()
Peer chat with mediaReal-people messaging with attachments, reactions, replies, edit/delete, delivery states, typing indicatorTkxPeerChat + sniffMimeType
DataGrid with tree dataOrg chart, file browser, or chart of accounts as a sortable, editable grid with disclosure caretsTkxDataGrid with childRowsKey
Async field validation”Is this username available?” / “Does this email already have an account?” — debounced, race-condition-safe, cancellableuseFormState validateAsync
AAA dark mode (SSR-safe)Theme toggle that survives Next.js / Remix SSR with no hydration mismatch and no FOUC, with verified ≥7:1 contrast on both modesThemeProvider + themeInitScript() + meetsAAA()
India address formCascading Country → State → District → Sub-district → PIN picker with region-correct labels (Taluka / Tehsil / Mandal / Block) — both PIN lookup and explicit dropdownsTkxAddressInput + tekivex-india-admin (or bring-your-own loader)

Looking for a vertical-specific walkthrough?

Section titled “Looking for a vertical-specific walkthrough?”

For larger, multi-primitive patterns scoped to a regulated industry, see Industry blueprints. Today: HIPAA-aligned patient intake. Coming: PCI-DSS-aligned checkout, Section 508-aligned gov forms, FERPA-aligned student records.

If you’ve hand-rolled something for a non-obvious case, open an issue at github.com/007krcs/tekivex-ui/issues and we’ll write the recipe.

Candidate recipes on the v3.20 wishlist:

  • RSC-friendly state management for an admin dashboard
  • Standing up a working dashboard in 20 minutes from a Postgres schema
  • Multi-tenant theming with per-organization brand colors
  • Optimistic UI patterns with rollback on server rejection
  • Resumable file upload with chunked PUT + retry

Each page has the same structure:

  1. The problem — what real-world scenario this addresses
  2. The recipe — full working code, often with a minimal version and a realistic version
  3. What it defends against OR what’s built-in — the wins
  4. What it does NOT defend against OR what’s NOT built-in — honest gaps
  5. Gotchas — real edge cases sourced from the implementation
  6. Related — links to component reference docs and other recipes

If a recipe overpromises, it’s a bug — open an issue.