# How to use slider over an arbitrary list? [closed]

I have a list that has no definitive pattern or incremental difference. Can I make a Slider go over the items in the list?

For instance, here is an arbitrary list of six elements, can a Slider go from list[[1]] to list[[2]], etc.?

list = {0, 1, 2.22, 5, 141, 299};

• Have you tried anything with a Slider? Take a look at ?Slider, if I understand correctly it can handle what you need. – Kuba Aug 4 '16 at 15:06
• Sorry, I read the documentation (reference.wolfram.com/language/ref/Slider.html) and I found nothing that wasn't increment based. I'm sure I missed it. – dpholmes Aug 4 '16 at 15:20
• The easiest way is to use a slider for an index to the list, from 1 to Length[list]. – Michael E2 Aug 4 '16 at 16:02

You can achieve this by using both Dynamic and Slider:

{Slider[Dynamic[x], {list}], Dynamic[x]}


Example

Manipulate[
i,
{i, {0, 1, 2.22, 5, 141, 299}, Slider}
]


Output

Reference

Manipulate