UNPKG

@isoterik/react-word-cloud

Version:

A lightweight, interactable and customizable React word cloud library powered by d3-cloud, featuring built-in animations, tooltips, and flexible word rendering.

32 lines (31 loc) 1.68 kB
import { FillValue, FinalWordData, Gradient, TooltipRenderer, TransitionValue, UseWordCloudArgs, WordMouseEvent, WordRenderer } from '../../core'; import { SVGProps } from 'react'; export type WordCloudProps = UseWordCloudArgs & { fill?: FillValue; transition?: TransitionValue; gradients?: Gradient[]; renderWord?: WordRenderer; enableTooltip?: boolean; renderTooltip?: TooltipRenderer; svgProps?: Omit<SVGProps<SVGSVGElement>, "ref" | "children">; onWordClick?: (word: FinalWordData, index: number, event: WordMouseEvent) => void; onWordMouseOver?: (word: FinalWordData, index: number, event: WordMouseEvent) => void; onWordMouseOut?: (word: FinalWordData, index: number, event: WordMouseEvent) => void; }; export declare const WordCloud: import('react').NamedExoticComponent<import('../../core').WordCloudConfig & { onStartComputation?: () => void; onWordComputed?: (word: import('../../core').ComputedWordData, index: number) => void; onCompleteComputation?: (words: import('../../core').ComputedWordData[]) => void; } & { fill?: FillValue; transition?: TransitionValue; gradients?: Gradient[]; renderWord?: WordRenderer; enableTooltip?: boolean; renderTooltip?: TooltipRenderer; svgProps?: Omit<SVGProps<SVGSVGElement>, "ref" | "children">; onWordClick?: (word: FinalWordData, index: number, event: WordMouseEvent) => void; onWordMouseOver?: (word: FinalWordData, index: number, event: WordMouseEvent) => void; onWordMouseOut?: (word: FinalWordData, index: number, event: WordMouseEvent) => void; } & import('react').RefAttributes<SVGSVGElement>>; //# sourceMappingURL=index.d.ts.map