Skip to content

Latest commit

 

History

History
55 lines (33 loc) · 2.08 KB

CHANGELOG.md

File metadata and controls

55 lines (33 loc) · 2.08 KB

@radix-ui/react-slot

1.5.0

  • Allow explicit undefined for all optional types for compatibility with TypeScript's exactOptionalPropertyTypes flag.
  • Fixed Slot throwing when an asChild child is a lazy reference whose resolved value is itself a lazy reference.

1.4.0

  • Added support for multiple aria-describedby attributes.
  • Fixed compatibility issues with React Server Components.

1.3.2, 1.3.3

  • Reverted breaking changes that caused compatibility issues with React Server Components.

1.3.1

  • Republish through CI to attach provenance attestations. The previous versions of these packages were published manually outside of CI and therefore shipped without provenance; this patch re-releases the same code through the CI pipeline so every package includes an attestation.
  • Updated dependencies: @radix-ui/[email protected], @radix-ui/[email protected]

1.3.0

Added generic type arguments for SlotProps and createSlot

SlotProps and createSlot now 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 Slot creating a new ref callback on every render
  • Added support for nested Slottable via 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/[email protected]

1.2.4

  • Fixed an issue with how slot components interact with lazy React components. In the case of a lazy component instance, the resulting promise must be consumed to render the desired component.

1.2.3

  • Replace deprecated 'ElementRef' with 'ComponentRef' (#3426)
  • Revert slot changes causing errors in server components

1.2.2

  • Add use client to slot entry to prevent RSC errors

1.2.1

  • Use stable composed refs in SlotClone (#3477)