Skip to content
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

defaultValue for slots/children #660

Open
samiresua opened this issue Jun 14, 2024 · 1 comment
Open

defaultValue for slots/children #660

samiresua opened this issue Jun 14, 2024 · 1 comment

Comments

@samiresua
Copy link

There seems to be some overlap between children / slots, both appear to do similar things via different api's. Are there plans to allow a defaultValue to be defined for either/both of these? It would be really useful to either be able to point to an arbitrary value (ie - string) or another already defined component with some set props.

@primeinteger
Copy link
Contributor

Hey @samiresua - apologies for the delayed response to your question.

I would describe children vs slots as this:

  • children is useful for nesting elements into the same container. (more common)
  • slots are useful for creating multiple containers for nesting elements in different areas of the component. (allows for additional flexibility to create more complex layouts within a single component)

You are right that currently both children and slots do not accept default values. I will bring this idea to the team for discussion and will let you know. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants