Props
react-wordcloud
provides a simple set of props to build and configure wordclouds.
callbacks
Optional<Callbacks>
maxWords
number
minSize
[number, number]
options
Optional<Options>
size
[number, number]
words
Word[]
required
Additional props will be passed through to the underlying HTML element.
Word
The word
object takes the following shape
text
string
required
value
number
required
options
You can customize the wordcloud by configuring the options
prop. All fields are optional.
colors
string[]
deterministic
boolean
enableOptimizations
boolean
enableTooltip
boolean
fontFamily
string
fontSizes
[number, number]
fontStyle
string
fontWeight
string
padding
number
randomSeed
string
rotationAngles
[number, number]
rotations
number
scale
Scale
spiral
Spiral
svgAttributes
Record<string, AttributeValue>
textAttributes
Record<string, AttributeValue>
tooltipOptions
Optional<Props>
transitionDuration
number
callbacks
The callbacks
prop provides advanced ways to control the wordcloud behaviors. All fields are optional.
getWordColor
WordToStringCallback
getWordTooltip
WordToStringCallback
onWordClick
WordEventCallback
onWordMouseOut
WordEventCallback
onWordMouseOver
WordEventCallback