import * as React from 'react'; import { Slot as RadixSlot } from '@radix-ui/react-slot'; /** * Slot component props * Allows components to merge props with their child element * * @public */ export interface SlotProps extends React.ComponentPropsWithoutRef { /** * When true, merges props with the child element instead of rendering a wrapper * @default false */ asChild?: boolean; } /** * Slot Component * * A composable primitive that allows you to merge props with a child element. * When `asChild` is true, the Slot will merge its props with the child element * instead of rendering a wrapper element. * * This is essential for creating composable components that can wrap any element * while maintaining proper prop forwarding and event handling. * * @public * * @example * ```tsx * // Without asChild - renders a div wrapper * * * * // Result:
* * // With asChild - merges props with button * * * * // Result: * ``` * * @remarks * - Based on Radix UI Slot primitive * - Essential for composable component architecture * - Maintains proper event handling and prop forwarding * - Use when you want components to be able to wrap any element */ export declare const Slot: React.ForwardRefExoticComponent>; /** * Type utility for components that support asChild prop * * @public */ export type AsChildProps = { /** * When true, merges props with the child element instead of rendering a wrapper * @default false */ asChild?: boolean; }; /** * Type utility for creating composable component props * Merges standard HTML element props with asChild support * * @public */ export type ComposableProps = AsChildProps & Omit, 'asChild'> & { /** * Additional CSS classes */ className?: string; }; /** * Helper type to exclude bigint from React children * Ensures compatibility with React types that include bigint * * @internal */ export type SafeReactChild = Exclude; //# sourceMappingURL=slot.d.ts.map