UNPKG

@assistant-ui/react

Version:

TypeScript/React library for AI Chat

50 lines 1.81 kB
import { Primitive } from "@radix-ui/react-primitive"; import { type ComponentRef, ComponentPropsWithoutRef, ElementType } from "react"; export declare namespace ContentPartPrimitiveText { type Element = ComponentRef<typeof Primitive.span>; type Props = Omit<ComponentPropsWithoutRef<typeof Primitive.span>, "children" | "asChild"> & { /** * Whether to enable smooth text streaming animation. * When enabled, text appears with a typing effect as it streams in. * @default true */ smooth?: boolean; /** * The HTML element or React component to render as. * @default "span" */ component?: ElementType; }; } /** * Renders the text content of a content part with optional smooth streaming. * * This component displays text content from the current content part context, * with support for smooth streaming animation that shows text appearing * character by character as it's generated. * * @example * ```tsx * <ContentPartPrimitive.Text * smooth={true} * component="p" * className="message-text" * /> * ``` */ export declare const ContentPartPrimitiveText: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").ClassAttributes<HTMLSpanElement> & import("react").HTMLAttributes<HTMLSpanElement> & { asChild?: boolean; }, "ref">, "children" | "asChild"> & { /** * Whether to enable smooth text streaming animation. * When enabled, text appears with a typing effect as it streams in. * @default true */ smooth?: boolean; /** * The HTML element or React component to render as. * @default "span" */ component?: ElementType; } & import("react").RefAttributes<HTMLSpanElement>>; //# sourceMappingURL=ContentPartText.d.ts.map