-
-
Notifications
You must be signed in to change notification settings - Fork 83
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
Slot utility #1315
Comments
Can I work on this? I prob will follow a similar implementation with radix. |
I landed here reading https://adamfratino.com/notes/base-ui-vs-radix-ui from @adamfratino that says
Makes sense. For example, I could imagine all the Material UI components supporting this |
Off-topic. I see potential for @samuelsycamore to help with the docs around this feature. I landed on https://base-ui.com/react/handbook/composition and read: I had to pause and focus to understand. Maybe it's because I have some level of dyslexia or autism. I don't know, something about it made it hard for me. To compare with https://ariakit.org/guide/composition#changing-the-html-element that documents the same concept: I didn't feel this struggle. "The render prop lets you specify a different HTML element to be rendered instead of the default element" connected instantly for me. I wasn't 100% aware of what the prop was doing until now, so I experienced this closer to what a pristine user would. |
Sure @seloner! I have already added it to the roadmap for our January cycle, so feel free to take it. Thanks! |
@oliviertassinari that's the first and only article i've written 🫣, glad it made some sense! and thanks for tagging me. +1 the ability to easily apply a for example, our team uses a few polymorphic layout primitives (box, stack, group, layer, etc.), currently leveraging |
Feature request
Summary
There is interest from users in having a helper to create their own polymorphic components using
render
.Examples in other libraries
https://www.radix-ui.com/primitives/docs/utilities/slot
https://github.com/radix-ui/primitives/tree/main/packages/react/slot/src
Motivation
It's quite a common need when creating a styled component library.
The text was updated successfully, but these errors were encountered: