Sourced from @radix-ui/react-slot's changelog.
1.3.0
Added generic type arguments for
SlotPropsandcreateSlot
SlotPropsandcreateSlotnow accept generic type arguments to specify the type of element a slot should render, as well as its props.const Slot = createSlot<HTMLButtonElement, MyCustomButtonProps>('Slot');1.2.5
- Fixed infinite re-render loop in React 19 caused by
Slotcreating a new ref callback on every render- Added support for nested
Slottablevia a render prop, so a slotted element can be wrapped while still merging Slot props and refs onto it- Added repository.directory to all package.json files
- Improved error messages for invalid slot children
- Updated dependencies:
@radix-ui/react-compose-refs@1.1.3
This version was pushed to npm by GitHub Actions, a new
releaser for @radix-ui/react-slot since your current
version.