Inputs.range without selection list

I’m using a Inputs.range slider. I would like to only display the slider, no associated drop down list.

Any way to suppress it?

my current code

viewof initial = Inputs.range([0, reformed.length], {value: 0, step: 30, label: “Author : most to least documents)”})



1 Like

I would typically do this like so:

viewof value = {
  let input = Inputs.range([0, 10], { step: 0.01 });'input[type="number"]').style("display", "none");
  return input;

You might also consider replacing .style("display", "none") with .remove(), if you want to dispose of it entirely.

Also, note that the forum using Markdown, just like the observable notebook, allowing you to typeset code accordingly.

1 Like

You can also write

input.querySelector('input[type="number"]').style.display = "none";

which is even shorter and doesn’t need to load D3. :slight_smile: