Atoms / Stepper

Stepper

A whole number between a minus and a plus button. Markup only: the page wires data-step and reads the field.

import { Stepper } from "@forgeron/ui";
/01 → Default
import { Stepper } from "@forgeron/ui";

// Markup only: the page wires the buttons (data-step) and reads the field.
export default function Default() {
  return <Stepper label="People on the team" value={10} data-stepper="people" />;
}
API → Props
PropTypeDefaultDescription
labelstring—Names the field; the buttons read Fewer / More.
valuenumber—The starting value, 0 to 9999.
...restHTMLAttributes<HTMLSpanElement>—On the root, e.g. data-*.
classNamestring—Extra classes.