How to make a message of a slider generic?

Usually people keep lists of component blocks, and use the index in list block to identify a component against that list.

Alternatively, use the .Text value of a component, if it has one.

Sample projects: