makeSlider function infrastructure

Last updated: 2026-03-02T13:35:57.085Z

Signature

makeSlider(options?: { disabled?: boolean; min?: number; max?: number; value?: number; }): : HTMLElement

Source Code

function makeSlider(options?: {
  disabled?: boolean;
  min?: number;
  max?: number;
  value?: number;
}): HTMLElement {
  const wrapper = document.createElement("div");
  wrapper.className = "ant-slider";
  if (options?.disabled) wrapper.classList.add("ant-slider-disabled");

  const rail = document.createElement("div");
  rail.className = "ant-slider-rail";

  const track = document.createElement("div");
  track.className = "ant-slider-track";
  track.style.width = "0%";

  const handle = document.createElement("div");
  handle.className = "ant-slider-handle";
  handle.setAttribute("role", "slider");
  handle.setAttribute("aria-valuemin", String(options?.min ?? 0));
  handle.setAttribute("aria-valuemax", String(options?.max ?? 100));
  handle.setAttribute("aria-valuenow", String(options?.value ?? 0));
  handle.setAttribute("tabindex", "0");
  handle.style.left = "0%";

  wrapper.append(rail, track, handle);
  return wrapper;
}

No outgoing dependencies.

Impact (Incoming)

graph LR makeSlider["makeSlider"] makeSelect["makeSelect"] makeSelect -->|calls| makeSlider style makeSlider fill:#dbeafe,stroke:#2563eb,stroke-width:2px click makeSlider "c635b8855509a9b4.html" click makeSelect "75e6fe1e0954bfa2.html"
SourceType
makeSelect calls