Vertical slider -- vertical range input.
Props
range(list) --[min, max]range as a two-element list. Default:[0, 100].value(number) -- current slider value. Defaults to range minimum.step(number) -- step increment.height(length) -- slider height. Default: fill. SeeToddy.Iced.Length.default(number) -- default value (double-click resets to this).shift_step(number) -- step increment when Shift is held.rail_color(hex color) -- color for the slider rail (both active and inactive portions).rail_width(number) -- rail thickness in pixels.style--:defaultorStyleMap.t()for custom styling. SeeToddy.Iced.StyleMap.a11y(map) -- accessibility overrides. SeeToddy.Iced.A11y.
Events
%Widget{type: :slide, id: id, value: value}-- emitted continuously while dragging.%Widget{type: :slide_release, id: id, value: value}-- emitted when drag ends.
Summary
Functions
Sets accessibility annotations.
Converts this vertical slider struct to a ui_node() map via the Toddy.Iced.Widget protocol.
Sets the default value (double-click resets to this).
Sets the slider height.
Creates a new vertical slider struct with the given range, value, and optional keyword opts.
Sets the rail color.
Sets the rail width in pixels.
Sets the step increment when Shift is held.
Sets the step increment.
Sets the slider style.
Sets the slider width.
Applies keyword options to an existing vertical slider struct.
Types
@type option() :: {:step, number()} | {:shift_step, number()} | {:default, number()} | {:width, Toddy.Iced.Length.t()} | {:height, Toddy.Iced.Length.t()} | {:rail_color, Toddy.Iced.Color.input()} | {:rail_width, number()} | {:style, style()} | {:a11y, Toddy.Iced.A11y.t()}
@type style() :: :default | Toddy.Iced.StyleMap.t()
@type t() :: %Toddy.Iced.Widget.VerticalSlider{ a11y: Toddy.Iced.A11y.t() | nil, default: number() | nil, height: Toddy.Iced.Length.t() | nil, id: String.t(), rail_color: Toddy.Iced.Color.t() | nil, rail_width: number() | nil, range: {number(), number()}, shift_step: number() | nil, step: number() | nil, style: style() | nil, value: number(), width: Toddy.Iced.Length.t() | nil }
Functions
@spec a11y(vertical_slider :: t(), a11y :: Toddy.Iced.A11y.t()) :: t()
Sets accessibility annotations.
@spec build(vertical_slider :: t()) :: Toddy.Iced.ui_node()
Converts this vertical slider struct to a ui_node() map via the Toddy.Iced.Widget protocol.
Sets the default value (double-click resets to this).
@spec height(vertical_slider :: t(), height :: Toddy.Iced.Length.t()) :: t()
Sets the slider height.
@spec new( id :: String.t(), range :: {number(), number()}, value :: number(), opts :: [option()] ) :: t()
Creates a new vertical slider struct with the given range, value, and optional keyword opts.
@spec rail_color(vertical_slider :: t(), rail_color :: Toddy.Iced.Color.input()) :: t()
Sets the rail color.
Sets the rail width in pixels.
Sets the step increment when Shift is held.
Sets the step increment.
Sets the slider style.
@spec width(vertical_slider :: t(), width :: Toddy.Iced.Length.t()) :: t()
Sets the slider width.
Applies keyword options to an existing vertical slider struct.