Quick answers before you open an issue. For integration failures, see TROUBLESHOOTING.md.
A native Custom Element that renders an accessible grid of feature/stat
cards from JSON — inline, fetched from a CMS, set imperatively, or parsed
from plain <a> children. One component, any page that can load JavaScript.
Because "CMS-agnostic" includes WordPress PHP themes, static HTML, and legacy
portals that will never adopt a SPA framework. A Web Component loads with one
<script> tag. Optional React wrapper ships separately
(@techystuff/feature-cards/react). See ADR-0001.
Roughly ~25 KiB gzip for the ESM build — enforced by npm run size. Zod is
the only bundled runtime dependency.
Modern evergreen browsers with Custom Elements, Shadow DOM, container queries,
and light-dark(). The no-JS fallback (plain links) works everywhere links work.
Yes. Load the IIFE bundle:
<script src="https://cdn.jsdelivr.net/npm/@techystuff/feature-cards@1.1.1/dist/feature-cards.iife.js" defer></script>Pin a version and add SRI from npm run sri. See WordPress cookbook.
The element hydrates on the client. Server-render plain <a> children inside
<feature-cards> for meaningful HTML before JS loads (progressive enhancement).
Do not SSR shadow DOM internals.
Write a pure adapter function (~40 lines) mapping the CMS JSON to
FeatureCardsData, register it in src/adapters/index.ts, add contract tests.
See ADR-0003.
Common causes:
- CORS blocked — CMS must allow your origin (or use same-origin proxy).
- Wrong
adapter— payload shape doesn't match the selected mapper. - Higher-precedence source wins — inline JSON or
el.dataoverridessrc.
See TROUBLESHOOTING.md.
Set --fc-* CSS custom properties on the host element or ancestors that
inherit into the shadow tree. Do not pierce internal classes — use tokens and
::part(). Full list in README § Theming.
Only via documented ::part(...) hooks and --fc-* tokens. This is
intentional — see ADR-0002.
Demo-only parody page themes (demo/themes/). They are not part of the
npm package API. Production sites use --fc-* component tokens, not
--page-* demo tokens. See DEMO.md.
Yes — by design and by CI gate. axe-core must report zero violations on the full demo. Details: ACCESSIBILITY.md.
Every card is a native link: Tab to focus, Enter to activate. No custom arrow-key grid widget semantics (cards are a list of links, not a composite control).
All component transitions disable under prefers-reduced-motion: reduce. Demo
page motion follows the same rule.
AGPL-3.0-only. Install and licence overview: INSTALL.md.
You may read and evaluate freely. Network deployment of modified versions requires offering corresponding source to users. Commercial closed-source use needs a separate licence from the author.
Inert authorship markers embedded in shipped bundles and rendered HTML — no tracking, no behaviour change. Verify with:
npm run canary:verify -- https://your-site.exampleSee SECURITY.md.
npm run checkTypecheck, lint, full test chain, size budget — same gate as CI.
npm run docs:api # → docs/api/CI uploads TypeDoc as an artifact; not hosted as a public URL yet.
See RELEASE.md and CONTRIBUTING § Releasing.
- TROUBLESHOOTING.md
- docs/README.md — full doc map
- GitHub Issues — not for security reports