UNPKG

react-text-ellipsis-clamp

Version:

Ultra-lightweight React component (165 bytes gzipped) to clamp multiline text with CSS-only ellipsis. Zero dependencies, TypeScript support, and production-ready performance.

15 lines (14 loc) 590 B
export type EllipsisProps = { maxLines?: number; expandable?: boolean; as?: keyof JSX.IntrinsicElements; } & Omit<JSX.IntrinsicElements["div"], "ref" | "children"> & { children?: React.ReactNode; }; export declare const Ellipsis: import("react").ForwardRefExoticComponent<{ maxLines?: number; expandable?: boolean; as?: keyof JSX.IntrinsicElements; } & Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref" | "children"> & { children?: React.ReactNode; } & import("react").RefAttributes<HTMLElement>>;