Using Variables for Icon Sets
It used to be that the different styled icons were separate components and you would use instance swapping to change them out, and that was okay. Then component props came along and changed that for the better. Now you can use the props to easily change the style, and that's how the majority of icon set in the Figma Community are made to this day. But I think we can do better.
The downside to the prop approach is that you still need to update each component individually. And sure, it might be nice to have that freedom to mix-and-match, but 99% of the time you are just going to use the same style. And when you need to change 20, 30, 40 or more icons in your file to a different style, and you have to do them one at a time, you will know that we need to do better.
In this experiment I leverage the power of Figma's Variables feature to change the style of all the icons in a frame at once. By using different values for different modes I can control the style of the icons whether at the granular style level, by changing which layers are visible, or changing the select prop value. Plus, I can still mix-and-match styles by applying different modes at lower levels, even directly on to the instance of the icon component itself.