New Slider control

The Slider control adds a draggable slider to the Makeswift builder, letting content teams set a number prop within a range you define instead of typing a raw value.

A Slider panel in the Makeswift builder with a draggable track and a numeric input
A Slider panel on a component to set a numeric value
  • Bounded rangemin, max, and step constrain the values a content editor can set.
  • Optional numeric input — Set showInput to true to display an input field alongside the slider for precise values.
  • Plain number prop — Your component receives a number, or undefined when no value is set and no defaultValue is provided.

Example

1import { Slider } from "@makeswift/runtime/controls";
2
3runtime.registerComponent(Banner, {
4 type: "banner",
5 label: "Banner",
6 props: {
7 opacity: Slider({
8 label: "Opacity",
9 defaultValue: 100,
10 min: 0,
11 max: 100,
12 step: 1,
13 }),
14 },
15});

For full documentation, see the Slider control reference.