-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Components that behave like regular HTML elements #10667
Comments
My search for related issues brought up #8538 which also list more related issues. |
Closing on favor of those issues linked |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the problem
When creating a library with components that extend the functionality of an HTML element, it is difficult to make the component behave like an HTML element. Idealy, the user would be able to use the component like a regual HTML element. For example, if you want to create a component that extends the functionality of an input to log the value every time that it changes, you would have to add CSS variables for every style of the input. That which would also require the user to look at the documentation every time they wanted to change a style.
A more complicated example could be a
Modal
component where the component aims to add all of the accessibility stuff for the modal, but you want the user to be able to customize it however they want like it was a regulardiv
.Describe the proposed solution
It would be nice if the user could use some components like a regular HTML element.
Example:
You could then use the component like:
The advantage of this method is that the user does not have to know how to use your custom input, they just have to know how to use a regular HTML input.
Importance
nice to have
The text was updated successfully, but these errors were encountered: