Skip to content

Signal Forms support for custom elements #69232

@kyubisation

Description

@kyubisation

Which @angular/* package(s) are relevant/related to the feature request?

forms

Description

Hello there 👋
Signal Forms are a nice addition/prospective. Excellent work!

As author of a design system custom element library with an Angular wrapper, we would like to provide similar functionality integration as with native form elements.
Looking at packages/forms/src/directives/native.ts and packages/forms/signals/src/directive/native.ts this should be simple to do, due to the sound structure.

As an example, with our custom range input element, min and max attributes will not be rendered, due to the hard coded check for INPUT.

Proposed solution

This can be achieved by checking for the static formAssociated property on the custom element class.
A convention could be for the custom element to implement the type property, similar to href for a custom anchor element.

Note: I have done previous custom element integration work and am willing to do this once more.

Alternatives considered

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions