I’m porting an existing design system to Figma, and I’m wondering, what are the best practices in 2024 for building components with dynamic children? For example, a dropdown menu where one instance has options A, B, C, and another instance has options D, E, F, G, etc. Or, a resuable modal component.
Some UI Kits / design systems I’ve seen here require a component instance to be configured, then detached. Is this the standard approach?
What I’d do is create a dropdown component with the maximum possible number of options, then set a visibility variable on each option that allows them to be individually shown/hidden from each instance of the dropdown. That way if I only need options 1-6, I can turn off options 7-10.