← Back to the book

Can’t enforce limiting to preferred instances for a Slot

✎ Claude's margin notePreferred instances are a strong suggestion, delivered to a slot that does not read suggestions.

Critical Issue: boiling over
Hacked around ✦

The workaround: A component that warns you when it's in the wrong place.

Add a locked, fixed-position warning utility as the top layer of the sub-component. Its visibility is driven by a variable mode: visible by default, hidden in a second mode. The parent component's slot sets that second mode, so the warning disappears when the sub-component sits in its intended slot and reappears anywhere else.

Watch the full talk at Converge →

The full method, with demos, is in the talk. This is the trailer.

Category
Slots
Product
Figma Components
Filed