Well, this can be done using simple css + code with some changes. First, if you have few groups, which means lists of groups, which means a list of lists. You will have a Container component, a Group component, and a GroupItem component. The container will display several group components that will display several GroupItem components.
It will be something like this:
export default class Container extends React.Component { render() { return(<ul> {this.state.groups.map((group) => { return <Group items={group.items} /> })} </ul>) } } export default class Group extends React.Component { render() { return (<ul> {this.props.items.map((item) => { return <GroupItem /> })} </ul>) } } export default class GroupItem extends React.Component { render() { return (<li>some content here</li>); } }
now give each group a class that, when you point out, will highlight the sons:
.group:hover > li { background-color: color; }
now when you hover over a group that looks like a single element hovering but applies to all elements, all its children will be highlighted
Pachu source share