ShadcnUI.Components.Forms.Slider (shadcn_ui v1.0.0)

Copy Markdown View Source

Native range input composed through the shared form contract.

Slider preserves the browser's value normalization, keyboard and pointer operation, constraint validation, reset, and form submission. The caller owns domain parsing, value display updates, validation, and request lifecycle.

Summary

Functions

Renders one native range input with deterministic field relationships.

Functions

slider(assigns)

Renders one native range input with deterministic field relationships.

Attributes

  • field (:any) - Defaults to nil.
  • id (:string) - Defaults to nil.
  • name (:string) - Defaults to nil.
  • value (:any) - Defaults to {:shadcn_ui, :not_provided}.
  • errors (:any) - Defaults to {:shadcn_ui, :not_provided}.
  • error_mode (:atom) - Defaults to :used_input. Must be one of :used_input, :always, or :hidden.
  • used (:boolean) - Defaults to false.
  • translate_error (:any) - Defaults to nil.
  • pending (:boolean) - Defaults to false.
  • required (:boolean) - Defaults to false.
  • optional (:boolean) - Defaults to false.
  • disabled (:boolean) - Defaults to false.
  • min (:any) - Defaults to nil.
  • max (:any) - Defaults to nil.
  • step (:any) - Defaults to nil.
  • form (:string) - Defaults to nil.
  • describedby (:any) - Defaults to nil.
  • class (:any) - Defaults to nil.
  • field_class (:any) - Defaults to nil.
  • Global attributes are accepted. Supports all globals plus: ["autofocus", "list"].

Slots

  • label (required)
  • help
  • value_description