kit
    Preparing search index...

    Type Alias WithComponents<Props, Components>

    WithComponents: Props & {
        [Name in keyof Components]: NonNullable<
            Components[Name]["type"] extends keyof JSX.IntrinsicElements
                ? React.ElementType<
                    Components[Name]["motionable"] extends true
                        ? Omit<
                            React.ComponentPropsWithoutRef<(...)[(...)]["type"]>,
                            HtmlAttributesCollidingWithMotionProps,
                        > & Components[Name]["props"]
                        : React.ComponentPropsWithoutRef<Components[Name]["type"]> & Components[Name]["props"],
                >
                : Components[Name]["type"],
        >
    }

    Type to define a component that has overridable components.

    Each of them can define its:

    • type: either as a native HTMLElement (the props for that element will be automatically inferred) or as a custom React component
    • props: any additional custom props
    • motionable: if that component has a possible implementation with framer-motion, in that case we remove some HTMLAttributes props which collides with MotionProps from framer.

    Type Parameters