How can I change the style of the first component if it is duplicated many times?

there is a component duplicated many times in another component. There is a button in this component. How do I change the style of the first component when clicking on it


<div>
<Checkbox />
<Checkbox />
<Checkbox />
<Checkbox />
<Checkbox />
<Checkbox />
</div>