[✨] Named slots based on element type #173
DustinJSilk
started this conversation in
Proposals
Replies: 1 comment
-
We moved this issue to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is your feature request related to a problem?
The process for using named Slots can be quite verbose. Every element being projected into a named slot requires
q:slot=“…”
, even when there may already be identifiable properties on the elements (ie element type, ID, class, attribute)Describe the solution you'd like
Add new props to the Slot component that allows you to project content based on the element type.
For example:
<Slot element=“p” />
This would only project
<p />
elements, similar to the Slots name property.This behaviour is similar to how Angulars ng-content allows for matching based on selectors.
Describe alternatives you've considered
Simply using named slots works but doesn’t have great DX.
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions