slottable<EextendsHTMLElement,Pextendsobject={}>( render:( props:Omit<P&{asChild?:boolean},"className">&{ classNames?:ClassNameValue; }&Pick<HTMLAttributes<Element>,"role"|"children"|"style">&HTMLAttributes< E, >, forwardedRef:ForwardedRef<E>, )=>ReactNode, ):ForwardRefExoticComponent< Omit<P&{asChild?:boolean},"className">&{ classNames?:ClassNameValue; }&Pick<HTMLAttributes<Element>,"role"|"children"|"style">&RefAttributes< E, >, >
Factory for slottable components.
The implementation receives full HTMLAttributes<E> so it can destructure role, style, etc.
Consumers see only SlottableProps<P> — a narrow type exposing classNames, className,
children, asChild, and the custom props P.
Type Parameters
EextendsHTMLElement
Pextendsobject = {}
Parameters
render: ( props:Omit<P&{asChild?:boolean},"className">&{ classNames?:ClassNameValue; }&Pick<HTMLAttributes<Element>,"role"|"children"|"style">&HTMLAttributes< E, >, forwardedRef:ForwardedRef<E>, )=>ReactNode
Returns ForwardRefExoticComponent< Omit<P&{asChild?:boolean},"className">&{ classNames?:ClassNameValue; }&Pick<HTMLAttributes<Element>,"role"|"children"|"style">&RefAttributes< E, >, >
Factory for slottable components. The implementation receives full
HTMLAttributes<E>so it can destructurerole,style, etc. Consumers see onlySlottableProps<P>— a narrow type exposingclassNames,className,children,asChild, and the custom propsP.