Device Elements

Device elements are elements specifically meant to show the state of your device. They update only when the variable they monitor has changed. The screen itself takes care of requesting the device to update features for the most part, which is done via poll_interval.

class DeviceButton

Button that shows the state of a device feature.

Updates automatically.

Available shorthand actions are:
  • generate: Generates the element’s image data.

  • update: Function to update an element via actions.

  • device-feature-update: Called when the the monitored value changes, or called manually to force an update.

Element Properties

property monitor_attribute: str

Required. The attribute of the feature being monitored.

property monitor_feature: Literal['battery', 'network', 'backlight']

Required. The feature being monitored.

property background_color: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A] | None
Color of the element background.
Optional, defaults to None
property font_color: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A]
The color of the font.
Optional, defaults to "black"
property outline_color: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A] | None
Color of the elements outline. Set to None to use no outline (i.e. the background color).
Optional, defaults to None
property hold_action: str | Callable[[Element, InteractEvent, Any], Any] | None
The function called when the element is held. Set to None to have nothing called. If set to a dict, the values for hold_action_data and hold_action_map will be overwritten if the respective key is present.
Optional, defaults to None
property hold_release_action: str | Callable[[Element, InteractEvent, Any], Any] | None
The function called when the element is released from being held down. This function is only available on devices with the HOLD_RELEASE feature. Set to None to have nothing called. If set to a dict, the values for hold_release_action_data and hold_release_action_map will be overwritten if the respective key is present.
Optional, defaults to None
property tap_action: str | Callable[[Element, InteractEvent, Any], Any] | None
The function called when the element is tapped. Set to None to have nothing called. If set to a dict, the values for tap_action_data and tap_action_map will be overwritten if the respective key is present.
Optional, defaults to None
property feedback_duration: duration
Duration of the element’s feedback function The time an element will stay in ‘feedback state’, before returning to its normal state. Can be set to a string, which will be parsed to the right amount of seconds.
Optional, defaults to 0.75
property fit_text: bool
Adjusts the font size automatically to make it fit. If true, font_size will be used as a minimum allowed font_size.
Optional, defaults to False
property font
The path to the element’s font. If set to a shorthand font, the path will automatically be parsed.
Optional, defaults to "default"
property font_size: str | int | float
The size of the font.
Optional, defaults to "H*0.036"
property margins: tuple[int, int, int, int]
The text margins. Always returns a 4 tuple, but can be set to a single number, or two/three/four item iterable. Same as css margins, so the values are returned as (top,right,bottom,left), and set according to css margins (https://www.w3schools.com/css/css_margin.asp).
Optional, defaults to 0
property multiline: bool
Allows the button to try and fit its text over multiple lines. May not work very well with the settings that automatically set the font size.
Optional, defaults to False
property outline_width: str | int | float
The width of the outline of the background rectangle.
Optional, defaults to 1
property radius: str | int | float
Corner radius of the encapsulating rectangle. Currently only accepts integers.
Optional, defaults to 0
property resize: bool | str | int | float
Tracks the font_size and adjusts it to fit. The resize value updates and will be used as a starting point for the next update. If not False, will use this value as a minimum allowed size for any text displayed. Changes the font_size parameter when needed, such that the text size won’t change with every new text. Sizes are not saved upon resets, so finding a good size takes a few changes. The same goes when the element is resized.
Optional, defaults to False
property text: str
The current text displayed on the button. Setting this attribute automatically converts the value into a string.
Optional, defaults to ""
property text_anchor_alignment: tuple[Literal[None, 'l', 'm', 'r', 's'], Literal[None, 'a', 't', 'm', 's', 'b', 'd']]
Alignment of the textAnchor as (horizontal,vertical). Leave (one of) None to determine the anchor from text_x_position or text_y_position respectively. See https://pillow.readthedocs.io/en/stable/handbook/text-anchors.html#text-anchors for possible values, only accepts shorthands.
Optional, defaults to (None, None)
property text_x_position: int | Literal['l', 'm', 'r', 's']
Horizontal alignment of the text. Can be top, bottom or center, a Pillow textanchor (shorthand and longhand), a pssm dimensional string or an integer.
Optional, defaults to "center"
property text_y_position: int | Literal['a', 't', 'm', 's', 'b', 'd']
Vertical alignment of the text. Can be top, bottom or center, a Pillow textanchor (shorthand and longhand), a pssm dimensional string or an integer.
Optional, defaults to "center"
property typing: type | None
The type the monitored value is converted to, before applying the suffic and prefix. Can allow for removing e.g. trailing zeros. Set to None for no conversion.
Optional, defaults to None
property monitor_attribute: str

Required

property monitor_feature: Literal['battery', 'network', 'backlight']

Required

property background_color: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A] | None

Optional, defaults to None

property font_color: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A]

Optional, defaults to "black"

property outline_color: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A] | None

Optional, defaults to None

property hold_action: str | Callable[[Element, InteractEvent, Any], Any] | None

Optional, defaults to None

property hold_release_action: str | Callable[[Element, InteractEvent, Any], Any] | None

Optional, defaults to None

property tap_action: str | Callable[[Element, InteractEvent, Any], Any] | None

Optional, defaults to None

property feedback_duration: duration

Optional, defaults to 0.75

property fit_text: bool

Optional, defaults to False

property font

Optional, defaults to "default"

property font_size: str | int | float

Optional, defaults to "H*0.036"

property margins: tuple[int, int, int, int]

Optional, defaults to 0

property multiline: bool

Optional, defaults to False

property outline_width: str | int | float

Optional, defaults to 1

property radius: str | int | float

Optional, defaults to 0

property resize: bool | str | int | float

Optional, defaults to False

property text: str

Optional, defaults to ""

property text_anchor_alignment: tuple[Literal[None, 'l', 'm', 'r', 's'], Literal[None, 'a', 't', 'm', 's', 'b', 'd']]

Optional, defaults to (None, None)

property text_x_position: int | Literal['l', 'm', 'r', 's']

Optional, defaults to "center"

property text_y_position: int | Literal['a', 't', 'm', 's', 'b', 'd']

Optional, defaults to "center"

property typing: type | None

Optional, defaults to None

  • monitor_attribute, Required. The attribute of the feature being monitored

  • monitor_feature, Required. The feature being monitored

  • background_color, Optional, defaults to None. Color of the element background.

  • font_color, Optional, defaults to "black". The color of the font

  • outline_color, Optional, defaults to None. Color of the elements outline.

  • hold_action, Optional, defaults to None. The function called when the element is held.

  • hold_release_action, Optional, defaults to None. The function called when the element is released from being held down.

  • tap_action, Optional, defaults to None. The function called when the element is tapped.

  • feedback_duration, Optional, defaults to 0.75. Duration of the element’s feedback function

  • fit_text, Optional, defaults to False. Adjusts the font size automatically to make it fit.

  • font, Optional, defaults to "default". The path to the element’s font.

  • font_size, Optional, defaults to "H*0.036". The size of the font

  • margins, Optional, defaults to 0. The text margins.

  • multiline, Optional, defaults to False. Allows the button to try and fit its text over multiple lines.

  • outline_width, Optional, defaults to 1. The width of the outline of the background rectangle

  • radius, Optional, defaults to 0. Corner radius of the encapsulating rectangle.

  • resize, Optional, defaults to False. Tracks the font_size and adjusts it to fit. The resize value updates and will be used as a starting point for the next update.

  • text, Optional, defaults to "". The current text displayed on the button.

  • text_anchor_alignment, Optional, defaults to (None, None). Alignment of the textAnchor as (horizontal,vertical).

  • text_x_position, Optional, defaults to "center". Horizontal alignment of the text.

  • text_y_position, Optional, defaults to "center". Vertical alignment of the text.

  • typing, Optional, defaults to None. The type the monitored value is converted to, before applying the suffic and prefix. Can allow for removing e.g. trailing zeros. Set to None for no conversion

class DeviceIcon

Icon element that can be linked to a device Feature, like for example showing the charge of the battery.

Available shorthand actions are:
  • generate: Generates the element’s image data.

  • update: Function to update an element via actions.

  • device-feature-update: Called when the the monitored value changes, or called manually to force an update.

Element Properties

property background_color: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A] | None
Color of the element background.
Optional, defaults to None
property hold_action: str | Callable[[Element, InteractEvent, Any], Any] | None
The function called when the element is held. Set to None to have nothing called. If set to a dict, the values for hold_action_data and hold_action_map will be overwritten if the respective key is present.
Optional, defaults to None
property hold_release_action: str | Callable[[Element, InteractEvent, Any], Any] | None
The function called when the element is released from being held down. This function is only available on devices with the HOLD_RELEASE feature. Set to None to have nothing called. If set to a dict, the values for hold_release_action_data and hold_release_action_map will be overwritten if the respective key is present.
Optional, defaults to None
property tap_action: str | Callable[[Element, InteractEvent, Any], Any] | None
The function called when the element is tapped. Set to None to have nothing called. If set to a dict, the values for tap_action_data and tap_action_map will be overwritten if the respective key is present.
Optional, defaults to "show_client_popup"
property background_shape: Literal[None, 'circle', 'square', 'rounded_square', 'rounded_rectangle', 'octagon', 'hexagon', 'ADVANCED']
The shape of the element’s background. If not set, no shape is used and background color is used as the background color of the entire element of the area. Can be one of [“circle”, “square”, “rounded_square”, “rounded_rectangle”, “octagon”, “hexagon”], None or ADVANCED. See background_shapeDict for usage of advanced (Not fully tested, so be aware) Set to None for no background shape.
Optional, defaults to None
property backlight_icons: backlightDict
Icons to reflect the backlight state, dict with keys ‘on’ and ‘off’.
Optional, defaults to {'on': 'mdi:lightbulb-on', 'off': 'mdi:lightbulb'}
property badge_feature: str
Either a direct icon, or a feature of the device to monitor.
Optional, defaults to None
property badge_icon: mdi:icon | None
The current icon of the badge. Must be None, an mdi icon or a PIL image instance.
Optional, defaults to None
property badge_location: Literal['UR', 'LR', 'UL', 'LL']
The location of the badge. Can be Can be one of UR, LR, UL or LL (Upper Right, Lower Right, Upper Left, Lower Left). Also accepts the fully written strings, but will be set to the abbreviated location.
Optional, defaults to None
property badge_offset: int
Badge Offset from the edges of the icon in pixels.
Optional, defaults to 0
property badge_settings: dict
Settings applied to the badge. Alters correct coloring if the badge_feature is the backlight.
Optional, defaults to {}
property badge_size: float | None
Size of the badge relative to the parent icon. Must be between 0 and 1. If set to a percantage, will be converted to such a value.
Optional, defaults to None
property battery_style: Literal['filled', 'bars']
Style of the battery icons, i.e. the mdi icon to use. Uses one of either styles: mdi:battery-50 or mdi:battery-medium.
Optional, defaults to "filled"
property color_from_brightness
color the icon based on the backlight brightness, by default True, but not implemented.
Optional, defaults to True
property feedback_duration: duration
Duration of the element’s feedback function The time an element will stay in ‘feedback state’, before returning to its normal state. Can be set to a string, which will be parsed to the right amount of seconds.
Optional, defaults to 0.75
property force_aspect: bool
Forces the aspect ratio of the icon to fit.
Optional, defaults to True
property icon: str | Image | None
The element’s icon. Can be set to a str (either an mdi icon or image file), or a PIL image instance directly. If the latter, the image will still be treated as an image file i.e. any icon settings etc. are applied to it regardless (This does also mean you don’t need to worry about sizing, as that is also taken care of). Can also be set to None for no icon.
Optional, defaults to "mdi:sticker-outline"
property icon_feature: str
Either a direct icon, or a feature of the device to monitor.
Optional, defaults to "mdi:cog"
property icon_states: dict
Additional styling options for the element mapping to the states of all possible device features, by default {}.
Optional, defaults to {}
property invert_icon: bool
Inverts only the icon, not the entier element. This works seperately from isInverted, which inverts an entire element, and is applicable to all elements. invert_icon is only applicable for icons, mainly to provide a way to give images which do not have a solid color (like filled meteocons) more contrast without being confined to a single colored icon.
Optional, defaults to False
property mirrored: bool
Mirrors the icon.
Optional, defaults to False
property network_style: Literal['lines', 'signal']
Style of the network icon. Signal shows the signal strength, if available. Styles look like mdi:wifi mdi:wifi-strength-1.
Optional, defaults to "lines"
property shape_settings: dict
Settings for the background shape. Advanced setting, generally best to leave it as an emtpy dict. Stuff may not work as intended as I cannot test everything. Optional arguments are required using ADVANCED, except for icon_coords (icon will default to being centered). The following keys can be used:: method the ImageDraw method to call. Only used if background_shape is "ADVANCED"; icon_size the size of the icon. Accepts dimensional strings; icon_coords the center coordinates of the icon in case of an mdi icon. The upper left corner is used if an image is used as an icon; drawArgs a dict with arguments to pass to the ImageDraw function. Rather advanced method, don’t use it if you don’t know what you’re up to;
Optional, defaults to {}
property background_color: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A] | None

Optional, defaults to None

property hold_action: str | Callable[[Element, InteractEvent, Any], Any] | None

Optional, defaults to None

property hold_release_action: str | Callable[[Element, InteractEvent, Any], Any] | None

Optional, defaults to None

property tap_action: str | Callable[[Element, InteractEvent, Any], Any] | None

Optional, defaults to "show_client_popup"

property background_shape: Literal[None, 'circle', 'square', 'rounded_square', 'rounded_rectangle', 'octagon', 'hexagon', 'ADVANCED']

Optional, defaults to None

property backlight_icons: backlightDict

Optional, defaults to {'on': 'mdi:lightbulb-on', 'off': 'mdi:lightbulb'}

property badge_feature: str

Optional, defaults to None

property badge_icon: mdi:icon | None

Optional, defaults to None

property badge_location: Literal['UR', 'LR', 'UL', 'LL']

Optional, defaults to None

property badge_offset: int

Optional, defaults to 0

property badge_settings: dict

Optional, defaults to {}

property badge_size: float | None

Optional, defaults to None

property battery_style: Literal['filled', 'bars']

Optional, defaults to "filled"

property color_from_brightness

Optional, defaults to True

property feedback_duration: duration

Optional, defaults to 0.75

property force_aspect: bool

Optional, defaults to True

property icon: str | Image | None

Optional, defaults to "mdi:sticker-outline"

property icon_feature: str

Optional, defaults to "mdi:cog"

property icon_states: dict

Optional, defaults to {}

property invert_icon: bool

Optional, defaults to False

property mirrored: bool

Optional, defaults to False

property network_style: Literal['lines', 'signal']

Optional, defaults to "lines"

property shape_settings: dict

Optional, defaults to {}

  • background_color, Optional, defaults to None. Color of the element background.

  • hold_action, Optional, defaults to None. The function called when the element is held.

  • hold_release_action, Optional, defaults to None. The function called when the element is released from being held down.

  • tap_action, Optional, defaults to "show_client_popup". The function called when the element is tapped.

  • background_shape, Optional, defaults to None. The shape of the element’s background.

  • backlight_icons, Optional, defaults to {'on': 'mdi:lightbulb-on', 'off': 'mdi:lightbulb'}. Icons to reflect the backlight state, dict with keys ‘on’ and ‘off’

  • badge_feature, Optional, defaults to None. Either a direct icon, or a feature of the device to monitor

  • badge_icon, Optional, defaults to None. The current icon of the badge.

  • badge_location, Optional, defaults to None. The location of the badge.

  • badge_offset, Optional, defaults to 0. Badge Offset from the edges of the icon in pixels

  • badge_settings, Optional, defaults to {}. Settings applied to the badge. Alters correct coloring if the badge_feature is the backlight

  • badge_size, Optional, defaults to None. Size of the badge relative to the parent icon.

  • battery_style, Optional, defaults to "filled". Style of the battery icons, i.e. the mdi icon to use. Uses one of either styles: mdi:battery-50 or mdi:battery-medium

  • color_from_brightness, Optional, defaults to True. color the icon based on the backlight brightness, by default True, but not implemented

  • feedback_duration, Optional, defaults to 0.75. Duration of the element’s feedback function

  • force_aspect, Optional, defaults to True. Forces the aspect ratio of the icon to fit.

  • icon, Optional, defaults to "mdi:sticker-outline". The element’s icon.

  • icon_feature, Optional, defaults to "mdi:cog". Either a direct icon, or a feature of the device to monitor

  • icon_states, Optional, defaults to {}. Additional styling options for the element mapping to the states of all possible device features, by default {}

  • invert_icon, Optional, defaults to False. Inverts only the icon, not the entier element.

  • mirrored, Optional, defaults to False. Mirrors the icon

  • network_style, Optional, defaults to "lines". Style of the network icon. Signal shows the signal strength, if available. Styles look like mdi:wifi mdi:wifi-strength-1

  • shape_settings, Optional, defaults to {}. Settings for the background shape.

class BacklightSlider

A slider that controls the device’s backlight.

Not available on devices without the appropriate feature.

Available shorthand actions are:
  • generate: Generates the element’s image data.

  • update: Function to update an element via actions.

  • device-feature-update: Called when the the monitored value changes, or called manually to force an update.

Element Properties

property active_color: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A]
The color of the bar indicating the value.
Optional, defaults to "black"
property background_color: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A] | None
Color of the element background.
Optional, defaults to None
property color: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A]
The color of the slider line.
Optional, defaults to "black"
property end_colors: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A] | None
The colors applied to the end icons. If None, will use the same color as the slider.
Optional, defaults to None
property inactive_color: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A]
The color of the inside part of the slider that is not covered by the active part.
Optional, defaults to None
property outline_color: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A]
Color of the box’s outline.
Optional, defaults to "black"
property thumb_color
Show a small line at the end of the active bar with color thumb_color. Set to None for no thumb.
Optional, defaults to None
property thumb_icon_color: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A]
The color of the thumb icon. If None a color is automatically applied.
Optional, defaults to None
property hold_action: str | Callable[[Element, InteractEvent, Any], Any] | None
The function called when the element is held. Set to None to have nothing called. If set to a dict, the values for hold_action_data and hold_action_map will be overwritten if the respective key is present.
Optional, defaults to None
property hold_release_action: str | Callable[[Element, InteractEvent, Any], Any] | None
The function called when the element is released from being held down. This function is only available on devices with the HOLD_RELEASE feature. Set to None to have nothing called. If set to a dict, the values for hold_release_action_data and hold_release_action_map will be overwritten if the respective key is present.
Optional, defaults to None
property on_position_set: Callable[[_BaseSlider, float | int], Any]
Action that is called whenever the slider’s position changes. Passes the element and the new position.
Optional, defaults to None
property tap_action: str | Callable[[Element, InteractEvent, Any], Any] | None
Slider tap_action that allows intercepting touches to update the position. First updates the slider position, then calls the set tap_action. tap_action can be set by changing tap_action without it interfering with the slider update (I think). Use Slider._tap_action to access the actual function after setting.
Optional, defaults to None
property end_point_size: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A]
Size of the end point icons.
Optional, defaults to None
property end_points: str | tuple[str, str] | None
MDI icons located on both ends of the slider. Set to a string to use the same icon for both endpoints, otherwise set to a 2 element tuple or list with the end points on [min,max] respectively.
Optional, defaults to None
property feedback_duration: duration
Duration of the element’s feedback function The time an element will stay in ‘feedback state’, before returning to its normal state. Can be set to a string, which will be parsed to the right amount of seconds.
Optional, defaults to 0.75
property interactive: bool
If true, clicking on the slider will update the position to that place.
Optional, defaults to True
property maximum: float
The highest possible value the slider can take.
Optional, defaults to 100
property minimum: float
The lowest possible value the slider can take.
Optional, defaults to 0
property monitor_attribute: Literal['brightness', 'defaultBrightness']
The attribute of the feature being monitored.
Optional, defaults to "brightness"
property orientation: Literal['horizontal', 'vertical']
The orientation of the slider. Horizontal or Vertical.
Optional, defaults to "horizontal"
property outline_width: str | int | float
Width of the box’s outline.
Optional, defaults to 5
property position: int | float
The position of the slider within the defined value range.
Optional, defaults to None
property radius: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A]
Corner radius of the box.
Optional, defaults to 5
property style: Literal['line', 'box']
The style of the slider, i.e. whether it displays a box or line slider. When changing this after initiating the instance object, it should work out of the box, but be mindful things may work wonky.
Optional, defaults to "line"
property thumb: str
The type of thumb (slider handle).
Optional, defaults to "rounded_rectangle"
property thumb_height: str | int | float
The height of the slider thumb. Parameter l for the length of the slider is additionally passed for dimensional strings. Set to None for automatic sizing based on shape.
Optional, defaults to None
property thumb_icon: str | None
Icon to put on the thumb, set to None for no icon. Size is set according to thumb_height, so ensure your thumb fits an icon.
Optional, defaults to None
property thumb_width: str | int | float
The width of the slider thumb. Parameter l for the length of the slider is additionally passed for dimensional strings. Set to None for automatic sizing based on shape.
Optional, defaults to None
property width: str | int | float
The width of the slider line.
Optional, defaults to None
property active_color: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A]

Optional, defaults to "black"

property background_color: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A] | None

Optional, defaults to None

property color: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A]

Optional, defaults to "black"

property end_colors: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A] | None

Optional, defaults to None

property inactive_color: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A]

Optional, defaults to None

property outline_color: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A]

Optional, defaults to "black"

property thumb_color

Optional, defaults to None

property thumb_icon_color: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A]

Optional, defaults to None

property hold_action: str | Callable[[Element, InteractEvent, Any], Any] | None

Optional, defaults to None

property hold_release_action: str | Callable[[Element, InteractEvent, Any], Any] | None

Optional, defaults to None

property on_position_set: Callable[[_BaseSlider, float | int], Any]

Optional, defaults to None

property tap_action: str | Callable[[Element, InteractEvent, Any], Any] | None

Optional, defaults to None

property end_point_size: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A]

Optional, defaults to None

property end_points: str | tuple[str, str] | None

Optional, defaults to None

property feedback_duration: duration

Optional, defaults to 0.75

property interactive: bool

Optional, defaults to True

property maximum: float

Optional, defaults to 100

property minimum: float

Optional, defaults to 0

property monitor_attribute: Literal['brightness', 'defaultBrightness']

Optional, defaults to "brightness"

property orientation: Literal['horizontal', 'vertical']

Optional, defaults to "horizontal"

property outline_width: str | int | float

Optional, defaults to 5

property position: int | float

Optional, defaults to None

property radius: str | int | list | tuple[L, A] | tuple[R, G, B] | tuple[R, G, B, A]

Optional, defaults to 5

property style: Literal['line', 'box']

Optional, defaults to "line"

property thumb: str

Optional, defaults to "rounded_rectangle"

property thumb_height: str | int | float

Optional, defaults to None

property thumb_icon: str | None

Optional, defaults to None

property thumb_width: str | int | float

Optional, defaults to None

property width: str | int | float

Optional, defaults to None

  • active_color, Optional, defaults to "black". The color of the bar indicating the value

  • background_color, Optional, defaults to None. Color of the element background.

  • color, Optional, defaults to "black". The color of the slider line

  • end_colors, Optional, defaults to None. The colors applied to the end icons. If None, will use the same color as the slider.

  • inactive_color, Optional, defaults to None. The color of the inside part of the slider that is not covered by the active part

  • outline_color, Optional, defaults to "black". Color of the box’s outline

  • thumb_color, Optional, defaults to None. Show a small line at the end of the active bar with color thumb_color. Set to None for no thumb

  • thumb_icon_color, Optional, defaults to None. The color of the thumb icon. If None a color is automatically applied.

  • hold_action, Optional, defaults to None. The function called when the element is held.

  • hold_release_action, Optional, defaults to None. The function called when the element is released from being held down.

  • on_position_set, Optional, defaults to None. Action that is called whenever the slider’s position changes.

  • tap_action, Optional, defaults to None. Slider tap_action that allows intercepting touches to update the position.

  • end_point_size, Optional, defaults to None. Size of the end point icons

  • end_points, Optional, defaults to None. MDI icons located on both ends of the slider. Set to a string to use the same icon for both endpoints, otherwise set to a 2 element tuple or list with the end points on [min,max] respectively.

  • feedback_duration, Optional, defaults to 0.75. Duration of the element’s feedback function

  • interactive, Optional, defaults to True. If true, clicking on the slider will update the position to that place.

  • maximum, Optional, defaults to 100. The highest possible value the slider can take

  • minimum, Optional, defaults to 0. The lowest possible value the slider can take.

  • monitor_attribute, Optional, defaults to "brightness". The attribute of the feature being monitored

  • orientation, Optional, defaults to "horizontal". The orientation of the slider. Horizontal or Vertical.

  • outline_width, Optional, defaults to 5. Width of the box’s outline

  • position, Optional, defaults to None. The position of the slider within the defined value range

  • radius, Optional, defaults to 5. Corner radius of the box

  • style, Optional, defaults to "line". The style of the slider, i.e. whether it displays a box or line slider.

  • thumb, Optional, defaults to "rounded_rectangle". The type of thumb (slider handle)

  • thumb_height, Optional, defaults to None. The height of the slider thumb. Parameter l for the length of the slider is additionally passed for dimensional strings.

  • thumb_icon, Optional, defaults to None. Icon to put on the thumb, set to None for no icon.

  • thumb_width, Optional, defaults to None. The width of the slider thumb. Parameter l for the length of the slider is additionally passed for dimensional strings.

  • width, Optional, defaults to None. The width of the slider line