Yoctol / react-d3-cloud

A word cloud react component built with d3-cloud.
https://yoctol.github.io/react-d3-cloud
MIT License
141 stars 47 forks source link

improve: allow adding class names to words #162

Open uson1x opened 3 months ago

uson1x commented 3 months ago

This PR adds new prop wordClassNames, which allows to define custom class name(s) for each word separately.

I believe this can greatly improve the ability to customize word presentation at call-site. In our project we use it to add shadows and outline per-word (e. g. allows you to have a 'selected word' presented differently)