svelte icon indicating copy to clipboard operation
svelte copied to clipboard

Own TS types for types of input elements

Open cintek opened this issue 4 months ago • 3 comments

Describe the problem

Now there is only a single type HTMLInputAttributes for all input elements and there is e.g. the library flowbite-svelte which uses this type to extend the props of a component with it. The advantage is that the maintainers don't have to implement each prop themselves but it comes with the disadvantage that the component has more props than it should have.

Describe the proposed solution

It would be nice to have types like for example HTMLInputRadioAttributes which are specific for one type of input element. Then libraries could extend the props of their components with these types.

Importance

nice to have

cintek avatar Sep 30 '24 11:09 cintek