Skip to content

Adapter contract for other UI frameworks #6

Closed

Description

@n4ff4h

Document and type the adapter contract so developers can add their own UI framework. Provide an adapter test kit (shared conformance tests an adapter author runs) and a minimal example adapter (plain HTML elements).

Activity

  1. added
    next-genNext-gen Javaabu packages
    featurePackage feature from the spec
    on Nov 4, 2026
  2. added a commit that references this issue on Nov 4, 2026
    d134eb5
  3. n4ff4h commented on Nov 4, 2026

    @n4ff4h
    CollaboratorAuthor

    Done on next-gen (d134eb5).

    • Contract: src/core/adapter.ts. defineAdapter(), mergeAdapters(), FormsComponents and one …SlotProps type per slot, all exported from @javaabu/forms.
    • Docs: docs/advanced-usage/adapters.md covers the rules, the slot table and a worked example.
    • Test kit: @javaabu/forms/testing. Use testAdapter(adapter, { describe?, it?, skip?, wrapper? }) with any runner, or adapterConformance() to get the raw cases. It has 19 cases: labels, values, FormData, errors and ARIA, the summary, submit state, and display content. It uses plain assertions, so it doesn't depend on a test framework; @testing-library/react is an optional peer.
    • Minimal example adapter: the HTML adapter (@javaabu/forms/html) is the reference implementation and the fallback for missing slots. The examples/html.html page styles it through data-slot attributes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurePackage feature from the specnext-genNext-gen Javaabu packages

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions