@assistant-ui/react
Version:
Open-source TypeScript/React library for building production-grade AI chat experiences
36 lines • 1.56 kB
TypeScript
import { Primitive } from "../../utils/Primitive.js";
import { type ComponentRef, type ComponentPropsWithoutRef } from "react";
export declare namespace ThreadPrimitiveViewportFooter {
type Element = ComponentRef<typeof Primitive.div>;
type Props = ComponentPropsWithoutRef<typeof Primitive.div>;
}
/**
* A footer container that measures its height for scroll calculations.
*
* This component measures its height and provides it to the viewport context
* so the auto-scroll system can account for any sticky footer overlapping the
* message list.
*
* Multiple ViewportFooter components can be used - their heights are summed.
*
* Typically used with `className="sticky bottom-0"` to keep the footer
* visible at the bottom of the viewport while scrolling.
*
* @example
* ```tsx
* <ThreadPrimitive.Viewport>
* <ThreadPrimitive.Messages>
* {() => <MyMessage />}
* </ThreadPrimitive.Messages>
* <ThreadPrimitive.ViewportFooter className="sticky bottom-0">
* <Composer />
* </ThreadPrimitive.ViewportFooter>
* </ThreadPrimitive.Viewport>
* ```
*/
export declare const ThreadPrimitiveViewportFooter: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
asChild?: boolean | undefined;
}, "ref"> & {
render?: import("react").ReactElement | undefined;
} & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
//# sourceMappingURL=ThreadViewportFooter.d.ts.map