instruction stringlengths 0 1k | input stringlengths 1 1k | output stringlengths 10 6.51k |
|---|---|---|
select item is selected."""
tag = "Select.ItemIndicator"
# Whether to keep the HTML element in the DOM when the item is not selected. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-item-indicator"
cls.set_class_name(ClassNames.ITEM_INDICATOR, props)
return super().create(*children, **props)
class SelectGroup(SelectBaseComponent):
"""Groups related select items with the corresponding label."""
tag = "Select.Group"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-group"
cls.set_class_name(ClassNames.GROUP, props)
return super().create(*children, **props)
|
class SelectSeparator(SelectBaseComponent):
"""A separator element accessible to screen readers."""
tag = "Select.Separator"
# The orientation of the separator.
orientation: Var[LiteralOrientation] = Var.create("horizontal")
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props)
class SelectIcon(SelectBaseComponent):
"""An icon that indicates that the trigger button opens a select menu."""
tag = "Select.Icon"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-icon"
cls.set_class_name(ClassNames.ICON, props)
| class SelectGroupLabel(SelectBaseComponent):
"""An accessible label that is automatically associated with its parent group."""
tag = "Select.GroupLabel"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-group-label"
cls.set_class_name(ClassNames.GROUP_LABEL, props)
return super().create(*children, **props) |
elected. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-item-indicator"
cls.set_class_name(ClassNames.ITEM_INDICATOR, props)
return super().create(*children, **props)
class SelectGroup(SelectBaseComponent):
"""Groups related select items with the corresponding label."""
tag = "Select.Group"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-group"
cls.set_class_name(ClassNames.GROUP, props)
return super().create(*children, **props)
class SelectGroupLabel(SelectBaseComponent):
"""An accessible label that is automatically associated with its parent group."""
|
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-group-label"
cls.set_class_name(ClassNames.GROUP_LABEL, props)
return super().create(*children, **props)
class SelectSeparator(SelectBaseComponent):
"""A separator element accessible to screen readers."""
tag = "Select.Separator"
# The orientation of the separator.
orientation: Var[LiteralOrientation] = Var.create("horizontal")
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props)
class SelectIcon(SelectBaseComponent):
"""An icon that indicates that the tr | tag = "Select.GroupLabel" |
ponent]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-item-indicator"
cls.set_class_name(ClassNames.ITEM_INDICATOR, props)
return super().create(*children, **props)
class SelectGroup(SelectBaseComponent):
"""Groups related select items with the corresponding label."""
tag = "Select.Group"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-group"
cls.set_class_name(ClassNames.GROUP, props)
return super().create(*children, **props)
class SelectGroupLabel(SelectBaseComponent):
"""An accessible label that is automatically associated with its parent group."""
tag = "Select.GroupLabel"
# The render prop
render_: Var[Component]
@classmethod
|
class SelectSeparator(SelectBaseComponent):
"""A separator element accessible to screen readers."""
tag = "Select.Separator"
# The orientation of the separator.
orientation: Var[LiteralOrientation] = Var.create("horizontal")
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props)
class SelectIcon(SelectBaseComponent):
"""An icon that indicates that the trigger button opens a select menu."""
tag = "Select.Icon"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-icon"
cls.set_class_name(ClassNames.ICON, props)
| def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-group-label"
cls.set_class_name(ClassNames.GROUP_LABEL, props)
return super().create(*children, **props) |
trigger component."""
props["data-slot"] = "select-item-indicator"
cls.set_class_name(ClassNames.ITEM_INDICATOR, props)
return super().create(*children, **props)
class SelectGroup(SelectBaseComponent):
"""Groups related select items with the corresponding label."""
tag = "Select.Group"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-group"
cls.set_class_name(ClassNames.GROUP, props)
return super().create(*children, **props)
class SelectGroupLabel(SelectBaseComponent):
"""An accessible label that is automatically associated with its parent group."""
tag = "Select.GroupLabel"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
|
cls.set_class_name(ClassNames.GROUP_LABEL, props)
return super().create(*children, **props)
class SelectSeparator(SelectBaseComponent):
"""A separator element accessible to screen readers."""
tag = "Select.Separator"
# The orientation of the separator.
orientation: Var[LiteralOrientation] = Var.create("horizontal")
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props)
class SelectIcon(SelectBaseComponent):
"""An icon that indicates that the trigger button opens a select menu."""
tag = "Select.Icon"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger co | props["data-slot"] = "select-group-label" |
uper().create(*children, **props)
class SelectGroup(SelectBaseComponent):
"""Groups related select items with the corresponding label."""
tag = "Select.Group"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-group"
cls.set_class_name(ClassNames.GROUP, props)
return super().create(*children, **props)
class SelectGroupLabel(SelectBaseComponent):
"""An accessible label that is automatically associated with its parent group."""
tag = "Select.GroupLabel"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-group-label"
cls.set_class_name(ClassNames.GROUP_LABEL, props)
return super().create(*children, **props)
|
class SelectIcon(SelectBaseComponent):
"""An icon that indicates that the trigger button opens a select menu."""
tag = "Select.Icon"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-icon"
cls.set_class_name(ClassNames.ICON, props)
return super().create(*children, **props)
class SelectArrow(SelectBaseComponent):
"""Displays an element positioned against the select menu anchor."""
tag = "Select.Arrow"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class SelectScrollUpArrow(SelectBaseComponent):
"""An elem | class SelectSeparator(SelectBaseComponent):
"""A separator element accessible to screen readers."""
tag = "Select.Separator"
# The orientation of the separator.
orientation: Var[LiteralOrientation] = Var.create("horizontal")
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props) |
s with the corresponding label."""
tag = "Select.Group"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-group"
cls.set_class_name(ClassNames.GROUP, props)
return super().create(*children, **props)
class SelectGroupLabel(SelectBaseComponent):
"""An accessible label that is automatically associated with its parent group."""
tag = "Select.GroupLabel"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-group-label"
cls.set_class_name(ClassNames.GROUP_LABEL, props)
return super().create(*children, **props)
class SelectSeparator(SelectBaseComponent):
"""A separator element accessible to screen readers."""
|
# The orientation of the separator.
orientation: Var[LiteralOrientation] = Var.create("horizontal")
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props)
class SelectIcon(SelectBaseComponent):
"""An icon that indicates that the trigger button opens a select menu."""
tag = "Select.Icon"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-icon"
cls.set_class_name(ClassNames.ICON, props)
return super().create(*children, **props)
class SelectArrow(SelectBaseComponent):
"""Displays an element positioned against | tag = "Select.Separator" |
the dialog trigger component."""
props["data-slot"] = "select-group"
cls.set_class_name(ClassNames.GROUP, props)
return super().create(*children, **props)
class SelectGroupLabel(SelectBaseComponent):
"""An accessible label that is automatically associated with its parent group."""
tag = "Select.GroupLabel"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-group-label"
cls.set_class_name(ClassNames.GROUP_LABEL, props)
return super().create(*children, **props)
class SelectSeparator(SelectBaseComponent):
"""A separator element accessible to screen readers."""
tag = "Select.Separator"
# The orientation of the separator.
orientation: Var[LiteralOrientation] = Var.create("horizontal")
# The render prop
render_: Var[Component]
@classmethod
|
class SelectIcon(SelectBaseComponent):
"""An icon that indicates that the trigger button opens a select menu."""
tag = "Select.Icon"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-icon"
cls.set_class_name(ClassNames.ICON, props)
return super().create(*children, **props)
class SelectArrow(SelectBaseComponent):
"""Displays an element positioned against the select menu anchor."""
tag = "Select.Arrow"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class SelectScrollUpArrow(SelectBaseComponent):
"""An elem | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props) |
.GROUP, props)
return super().create(*children, **props)
class SelectGroupLabel(SelectBaseComponent):
"""An accessible label that is automatically associated with its parent group."""
tag = "Select.GroupLabel"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-group-label"
cls.set_class_name(ClassNames.GROUP_LABEL, props)
return super().create(*children, **props)
class SelectSeparator(SelectBaseComponent):
"""A separator element accessible to screen readers."""
tag = "Select.Separator"
# The orientation of the separator.
orientation: Var[LiteralOrientation] = Var.create("horizontal")
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
|
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props)
class SelectIcon(SelectBaseComponent):
"""An icon that indicates that the trigger button opens a select menu."""
tag = "Select.Icon"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-icon"
cls.set_class_name(ClassNames.ICON, props)
return super().create(*children, **props)
class SelectArrow(SelectBaseComponent):
"""Displays an element positioned against the select menu anchor."""
tag = "Select.Arrow"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-arrow"
cls.set_class_name(ClassNames.ARROW, props)
| props["data-slot"] = "select-separator" |
utomatically associated with its parent group."""
tag = "Select.GroupLabel"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-group-label"
cls.set_class_name(ClassNames.GROUP_LABEL, props)
return super().create(*children, **props)
class SelectSeparator(SelectBaseComponent):
"""A separator element accessible to screen readers."""
tag = "Select.Separator"
# The orientation of the separator.
orientation: Var[LiteralOrientation] = Var.create("horizontal")
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props)
|
class SelectArrow(SelectBaseComponent):
"""Displays an element positioned against the select menu anchor."""
tag = "Select.Arrow"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class SelectScrollUpArrow(SelectBaseComponent):
"""An element that scrolls the select menu up when hovered."""
tag = "Select.ScrollUpArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-scroll-up-arrow"
cls.set_class_name(ClassNames | class SelectIcon(SelectBaseComponent):
"""An icon that indicates that the trigger button opens a select menu."""
tag = "Select.Icon"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-icon"
cls.set_class_name(ClassNames.ICON, props)
return super().create(*children, **props) |
omponent]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-group-label"
cls.set_class_name(ClassNames.GROUP_LABEL, props)
return super().create(*children, **props)
class SelectSeparator(SelectBaseComponent):
"""A separator element accessible to screen readers."""
tag = "Select.Separator"
# The orientation of the separator.
orientation: Var[LiteralOrientation] = Var.create("horizontal")
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props)
class SelectIcon(SelectBaseComponent):
"""An icon that indicates that the trigger button opens a select menu."""
|
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-icon"
cls.set_class_name(ClassNames.ICON, props)
return super().create(*children, **props)
class SelectArrow(SelectBaseComponent):
"""Displays an element positioned against the select menu anchor."""
tag = "Select.Arrow"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class SelectScrollUpArrow(SelectBaseComponent):
"""An element that scrolls the select menu up when hovered."""
tag = "Select.ScrollUpArrow"
# Whether to keep the component mounted when not vis | tag = "Select.Icon" |
"""Create the dialog trigger component."""
props["data-slot"] = "select-group-label"
cls.set_class_name(ClassNames.GROUP_LABEL, props)
return super().create(*children, **props)
class SelectSeparator(SelectBaseComponent):
"""A separator element accessible to screen readers."""
tag = "Select.Separator"
# The orientation of the separator.
orientation: Var[LiteralOrientation] = Var.create("horizontal")
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props)
class SelectIcon(SelectBaseComponent):
"""An icon that indicates that the trigger button opens a select menu."""
tag = "Select.Icon"
# The render prop
render_: Var[Component]
@classmethod
|
class SelectArrow(SelectBaseComponent):
"""Displays an element positioned against the select menu anchor."""
tag = "Select.Arrow"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class SelectScrollUpArrow(SelectBaseComponent):
"""An element that scrolls the select menu up when hovered."""
tag = "Select.ScrollUpArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-scroll-up-arrow"
cls.set_class_name(ClassNames | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-icon"
cls.set_class_name(ClassNames.ICON, props)
return super().create(*children, **props) |
ss_name(ClassNames.GROUP_LABEL, props)
return super().create(*children, **props)
class SelectSeparator(SelectBaseComponent):
"""A separator element accessible to screen readers."""
tag = "Select.Separator"
# The orientation of the separator.
orientation: Var[LiteralOrientation] = Var.create("horizontal")
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props)
class SelectIcon(SelectBaseComponent):
"""An icon that indicates that the trigger button opens a select menu."""
tag = "Select.Icon"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
|
cls.set_class_name(ClassNames.ICON, props)
return super().create(*children, **props)
class SelectArrow(SelectBaseComponent):
"""Displays an element positioned against the select menu anchor."""
tag = "Select.Arrow"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class SelectScrollUpArrow(SelectBaseComponent):
"""An element that scrolls the select menu up when hovered."""
tag = "Select.ScrollUpArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger comp | props["data-slot"] = "select-icon" |
"""A separator element accessible to screen readers."""
tag = "Select.Separator"
# The orientation of the separator.
orientation: Var[LiteralOrientation] = Var.create("horizontal")
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props)
class SelectIcon(SelectBaseComponent):
"""An icon that indicates that the trigger button opens a select menu."""
tag = "Select.Icon"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-icon"
cls.set_class_name(ClassNames.ICON, props)
return super().create(*children, **props)
|
class SelectScrollUpArrow(SelectBaseComponent):
"""An element that scrolls the select menu up when hovered."""
tag = "Select.ScrollUpArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-scroll-up-arrow"
cls.set_class_name(ClassNames.SCROLL_ARROW_UP, props)
return super().create(*children, **props)
class SelectScrollDownArrow(SelectBaseComponent):
"""An element that scrolls the select menu down when hovered."""
tag = "Select.ScrollDownArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUICompone | class SelectArrow(SelectBaseComponent):
"""Displays an element positioned against the select menu anchor."""
tag = "Select.Arrow"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props) |
eparator.
orientation: Var[LiteralOrientation] = Var.create("horizontal")
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props)
class SelectIcon(SelectBaseComponent):
"""An icon that indicates that the trigger button opens a select menu."""
tag = "Select.Icon"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-icon"
cls.set_class_name(ClassNames.ICON, props)
return super().create(*children, **props)
class SelectArrow(SelectBaseComponent):
"""Displays an element positioned against the select menu anchor."""
|
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class SelectScrollUpArrow(SelectBaseComponent):
"""An element that scrolls the select menu up when hovered."""
tag = "Select.ScrollUpArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-scroll-up-arrow"
cls.set_class_name(ClassNames.SCROLL_ARROW_UP, props)
return super().create(*children, **props)
class SelectScrollDownArrow(SelectBaseComponent):
"""An elem | tag = "Select.Arrow" |
"""Create the dialog trigger component."""
props["data-slot"] = "select-separator"
cls.set_class_name(ClassNames.SEPARATOR, props)
return super().create(*children, **props)
class SelectIcon(SelectBaseComponent):
"""An icon that indicates that the trigger button opens a select menu."""
tag = "Select.Icon"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-icon"
cls.set_class_name(ClassNames.ICON, props)
return super().create(*children, **props)
class SelectArrow(SelectBaseComponent):
"""Displays an element positioned against the select menu anchor."""
tag = "Select.Arrow"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
|
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class SelectScrollUpArrow(SelectBaseComponent):
"""An element that scrolls the select menu up when hovered."""
tag = "Select.ScrollUpArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-scroll-up-arrow"
cls.set_class_name(ClassNames.SCROLL_ARROW_UP, props)
return super().create(*children, **props)
class SelectScrollDownArrow(SelectBaseComponent):
"""An element that scrolls the select menu down when hovered."""
tag = "Select.ScrollDownArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
| props["data-slot"] = "select-arrow" |
ATOR, props)
return super().create(*children, **props)
class SelectIcon(SelectBaseComponent):
"""An icon that indicates that the trigger button opens a select menu."""
tag = "Select.Icon"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-icon"
cls.set_class_name(ClassNames.ICON, props)
return super().create(*children, **props)
class SelectArrow(SelectBaseComponent):
"""Displays an element positioned against the select menu anchor."""
tag = "Select.Arrow"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
|
class SelectScrollDownArrow(SelectBaseComponent):
"""An element that scrolls the select menu down when hovered."""
tag = "Select.ScrollDownArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-scroll-down-arrow"
cls.set_class_name(ClassNames.SCROLL_ARROW_DOWN, props)
return super().create(*children, **props)
class HighLevelSelect(SelectRoot):
"""High level wrapper for the Select component."""
# The list of items to display in the select dropdown
items: Var[list[str]]
# The placeholder text to display when no item is selected
placeholder: Var[str]
# The size of the select component. Defaults to "md".
size: Var[LiteralSelectSize]
# Props for differ | class SelectScrollUpArrow(SelectBaseComponent):
"""An element that scrolls the select menu up when hovered."""
tag = "Select.ScrollUpArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-scroll-up-arrow"
cls.set_class_name(ClassNames.SCROLL_ARROW_UP, props)
return super().create(*children, **props) |
hat indicates that the trigger button opens a select menu."""
tag = "Select.Icon"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-icon"
cls.set_class_name(ClassNames.ICON, props)
return super().create(*children, **props)
class SelectArrow(SelectBaseComponent):
"""Displays an element positioned against the select menu anchor."""
tag = "Select.Arrow"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class SelectScrollUpArrow(SelectBaseComponent):
"""An element that scrolls the select menu up when hovered."""
|
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-scroll-up-arrow"
cls.set_class_name(ClassNames.SCROLL_ARROW_UP, props)
return super().create(*children, **props)
class SelectScrollDownArrow(SelectBaseComponent):
"""An element that scrolls the select menu down when hovered."""
tag = "Select.ScrollDownArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-scroll-down-arrow"
cls.set_class_name(ClassNames.SC | tag = "Select.ScrollUpArrow" |
nt:
"""Create the dialog trigger component."""
props["data-slot"] = "select-icon"
cls.set_class_name(ClassNames.ICON, props)
return super().create(*children, **props)
class SelectArrow(SelectBaseComponent):
"""Displays an element positioned against the select menu anchor."""
tag = "Select.Arrow"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class SelectScrollUpArrow(SelectBaseComponent):
"""An element that scrolls the select menu up when hovered."""
tag = "Select.ScrollUpArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
|
class SelectScrollDownArrow(SelectBaseComponent):
"""An element that scrolls the select menu down when hovered."""
tag = "Select.ScrollDownArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-scroll-down-arrow"
cls.set_class_name(ClassNames.SCROLL_ARROW_DOWN, props)
return super().create(*children, **props)
class HighLevelSelect(SelectRoot):
"""High level wrapper for the Select component."""
# The list of items to display in the select dropdown
items: Var[list[str]]
# The placeholder text to display when no item is selected
placeholder: Var[str]
# The size of the select component. Defaults to "md".
size: Var[LiteralSelectSize]
# Props for differ | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-scroll-up-arrow"
cls.set_class_name(ClassNames.SCROLL_ARROW_UP, props)
return super().create(*children, **props) |
lass_name(ClassNames.ICON, props)
return super().create(*children, **props)
class SelectArrow(SelectBaseComponent):
"""Displays an element positioned against the select menu anchor."""
tag = "Select.Arrow"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class SelectScrollUpArrow(SelectBaseComponent):
"""An element that scrolls the select menu up when hovered."""
tag = "Select.ScrollUpArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
|
cls.set_class_name(ClassNames.SCROLL_ARROW_UP, props)
return super().create(*children, **props)
class SelectScrollDownArrow(SelectBaseComponent):
"""An element that scrolls the select menu down when hovered."""
tag = "Select.ScrollDownArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-scroll-down-arrow"
cls.set_class_name(ClassNames.SCROLL_ARROW_DOWN, props)
return super().create(*children, **props)
class HighLevelSelect(SelectRoot):
"""High level wrapper for the Select component."""
# The list of items to display in the select dropdown
items: Var[list[str]]
# The placeholder text to display when no item is selected
placeholder: Var[str]
| props["data-slot"] = "select-scroll-up-arrow" |
ned against the select menu anchor."""
tag = "Select.Arrow"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class SelectScrollUpArrow(SelectBaseComponent):
"""An element that scrolls the select menu up when hovered."""
tag = "Select.ScrollUpArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-scroll-up-arrow"
cls.set_class_name(ClassNames.SCROLL_ARROW_UP, props)
return super().create(*children, **props)
|
class HighLevelSelect(SelectRoot):
"""High level wrapper for the Select component."""
# The list of items to display in the select dropdown
items: Var[list[str]]
# The placeholder text to display when no item is selected
placeholder: Var[str]
# The size of the select component. Defaults to "md".
size: Var[LiteralSelectSize]
# Props for different component parts
_trigger_props = {"placeholder", "size"}
_items_props = {"items"}
_positioner_props = {
"align",
"align_offset",
"side",
"arrow_padding",
"collision_padding",
"sticky",
"position_method",
"align_item_with_trigger",
"track_anchor",
"side_offset",
"collision_avoidance",
}
_portal_props = {"container"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a select component.
Args:
*children: Additional children to include in | class SelectScrollDownArrow(SelectBaseComponent):
"""An element that scrolls the select menu down when hovered."""
tag = "Select.ScrollDownArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-scroll-down-arrow"
cls.set_class_name(ClassNames.SCROLL_ARROW_DOWN, props)
return super().create(*children, **props) |
assmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class SelectScrollUpArrow(SelectBaseComponent):
"""An element that scrolls the select menu up when hovered."""
tag = "Select.ScrollUpArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-scroll-up-arrow"
cls.set_class_name(ClassNames.SCROLL_ARROW_UP, props)
return super().create(*children, **props)
class SelectScrollDownArrow(SelectBaseComponent):
"""An element that scrolls the select menu down when hovered."""
|
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-scroll-down-arrow"
cls.set_class_name(ClassNames.SCROLL_ARROW_DOWN, props)
return super().create(*children, **props)
class HighLevelSelect(SelectRoot):
"""High level wrapper for the Select component."""
# The list of items to display in the select dropdown
items: Var[list[str]]
# The placeholder text to display when no item is selected
placeholder: Var[str]
# The size of the select component. Defaults to "md".
size: Var[LiteralSelectSize]
# Props for different component parts
_trigger_props = {"placeholder", "size"}
_items_props = {"items"}
_positioner_props = {
"align",
"align_offse | tag = "Select.ScrollDownArrow" |
s)
return super().create(*children, **props)
class SelectScrollUpArrow(SelectBaseComponent):
"""An element that scrolls the select menu up when hovered."""
tag = "Select.ScrollUpArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-scroll-up-arrow"
cls.set_class_name(ClassNames.SCROLL_ARROW_UP, props)
return super().create(*children, **props)
class SelectScrollDownArrow(SelectBaseComponent):
"""An element that scrolls the select menu down when hovered."""
tag = "Select.ScrollDownArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
|
class HighLevelSelect(SelectRoot):
"""High level wrapper for the Select component."""
# The list of items to display in the select dropdown
items: Var[list[str]]
# The placeholder text to display when no item is selected
placeholder: Var[str]
# The size of the select component. Defaults to "md".
size: Var[LiteralSelectSize]
# Props for different component parts
_trigger_props = {"placeholder", "size"}
_items_props = {"items"}
_positioner_props = {
"align",
"align_offset",
"side",
"arrow_padding",
"collision_padding",
"sticky",
"position_method",
"align_item_with_trigger",
"track_anchor",
"side_offset",
"collision_avoidance",
}
_portal_props = {"container"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a select component.
Args:
*children: Additional children to include in | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-scroll-down-arrow"
cls.set_class_name(ClassNames.SCROLL_ARROW_DOWN, props)
return super().create(*children, **props) |
ement that scrolls the select menu up when hovered."""
tag = "Select.ScrollUpArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-scroll-up-arrow"
cls.set_class_name(ClassNames.SCROLL_ARROW_UP, props)
return super().create(*children, **props)
class SelectScrollDownArrow(SelectBaseComponent):
"""An element that scrolls the select menu down when hovered."""
tag = "Select.ScrollDownArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
|
cls.set_class_name(ClassNames.SCROLL_ARROW_DOWN, props)
return super().create(*children, **props)
class HighLevelSelect(SelectRoot):
"""High level wrapper for the Select component."""
# The list of items to display in the select dropdown
items: Var[list[str]]
# The placeholder text to display when no item is selected
placeholder: Var[str]
# The size of the select component. Defaults to "md".
size: Var[LiteralSelectSize]
# Props for different component parts
_trigger_props = {"placeholder", "size"}
_items_props = {"items"}
_positioner_props = {
"align",
"align_offset",
"side",
"arrow_padding",
"collision_padding",
"sticky",
"position_method",
"align_item_with_trigger",
"track_anchor",
"side_offset",
"collision_avoidance",
}
_portal_props = {"container"}
@classmethod
def create(cls, *children, **props) -> BaseUICompone | props["data-slot"] = "select-scroll-down-arrow" |
nArrow(SelectBaseComponent):
"""An element that scrolls the select menu down when hovered."""
tag = "Select.ScrollDownArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-scroll-down-arrow"
cls.set_class_name(ClassNames.SCROLL_ARROW_DOWN, props)
return super().create(*children, **props)
class HighLevelSelect(SelectRoot):
"""High level wrapper for the Select component."""
# The list of items to display in the select dropdown
items: Var[list[str]]
# The placeholder text to display when no item is selected
placeholder: Var[str]
# The size of the select component. Defaults to "md".
size: Var[LiteralSelectSize]
# Props for different component parts
|
_items_props = {"items"}
_positioner_props = {
"align",
"align_offset",
"side",
"arrow_padding",
"collision_padding",
"sticky",
"position_method",
"align_item_with_trigger",
"track_anchor",
"side_offset",
"collision_avoidance",
}
_portal_props = {"container"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a select component.
Args:
*children: Additional children to include in the select.
**props: Additional properties to apply to the select component.
Returns:
The select component.
"""
# Extract props for different parts
trigger_props = {k: props.pop(k) for k in cls._trigger_props & props.keys()}
items_props = {k: props.pop(k) for k in cls._items_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_pr | _trigger_props = {"placeholder", "size"} |
t that scrolls the select menu down when hovered."""
tag = "Select.ScrollDownArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-scroll-down-arrow"
cls.set_class_name(ClassNames.SCROLL_ARROW_DOWN, props)
return super().create(*children, **props)
class HighLevelSelect(SelectRoot):
"""High level wrapper for the Select component."""
# The list of items to display in the select dropdown
items: Var[list[str]]
# The placeholder text to display when no item is selected
placeholder: Var[str]
# The size of the select component. Defaults to "md".
size: Var[LiteralSelectSize]
# Props for different component parts
_trigger_props = {"placeholder", "size"}
|
_positioner_props = {
"align",
"align_offset",
"side",
"arrow_padding",
"collision_padding",
"sticky",
"position_method",
"align_item_with_trigger",
"track_anchor",
"side_offset",
"collision_avoidance",
}
_portal_props = {"container"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a select component.
Args:
*children: Additional children to include in the select.
**props: Additional properties to apply to the select component.
Returns:
The select component.
"""
# Extract props for different parts
trigger_props = {k: props.pop(k) for k in cls._trigger_props & props.keys()}
items_props = {k: props.pop(k) for k in cls._items_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
| _items_props = {"items"} |
u down when hovered."""
tag = "Select.ScrollDownArrow"
# Whether to keep the component mounted when not visible. Defaults to False.
keep_mounted: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "select-scroll-down-arrow"
cls.set_class_name(ClassNames.SCROLL_ARROW_DOWN, props)
return super().create(*children, **props)
class HighLevelSelect(SelectRoot):
"""High level wrapper for the Select component."""
# The list of items to display in the select dropdown
items: Var[list[str]]
# The placeholder text to display when no item is selected
placeholder: Var[str]
# The size of the select component. Defaults to "md".
size: Var[LiteralSelectSize]
# Props for different component parts
_trigger_props = {"placeholder", "size"}
_items_props = {"items"}
|
_portal_props = {"container"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a select component.
Args:
*children: Additional children to include in the select.
**props: Additional properties to apply to the select component.
Returns:
The select component.
"""
# Extract props for different parts
trigger_props = {k: props.pop(k) for k in cls._trigger_props & props.keys()}
items_props = {k: props.pop(k) for k in cls._items_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
# Get extracted values with defaults
size = trigger_props.get("size", "md")
items = items_props.get("items", [])
# Create the items children
if isinstance(items, Var):
| _positioner_props = {
"align",
"align_offset",
"side",
"arrow_padding",
"collision_padding",
"sticky",
"position_method",
"align_item_with_trigger",
"track_anchor",
"side_offset",
"collision_avoidance",
} |
"""Create the dialog trigger component."""
props["data-slot"] = "select-scroll-down-arrow"
cls.set_class_name(ClassNames.SCROLL_ARROW_DOWN, props)
return super().create(*children, **props)
class HighLevelSelect(SelectRoot):
"""High level wrapper for the Select component."""
# The list of items to display in the select dropdown
items: Var[list[str]]
# The placeholder text to display when no item is selected
placeholder: Var[str]
# The size of the select component. Defaults to "md".
size: Var[LiteralSelectSize]
# Props for different component parts
_trigger_props = {"placeholder", "size"}
_items_props = {"items"}
_positioner_props = {
"align",
"align_offset",
"side",
"arrow_padding",
"collision_padding",
"sticky",
"position_method",
"align_item_with_trigger",
"track_anchor",
"side_offset",
"collision_avoidance",
}
|
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a select component.
Args:
*children: Additional children to include in the select.
**props: Additional properties to apply to the select component.
Returns:
The select component.
"""
# Extract props for different parts
trigger_props = {k: props.pop(k) for k in cls._trigger_props & props.keys()}
items_props = {k: props.pop(k) for k in cls._items_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
# Get extracted values with defaults
size = trigger_props.get("size", "md")
items = items_props.get("items", [])
# Create the items children
if isinstance(items, Var):
items_children = foreach(
| _portal_props = {"container"} |
to display when no item is selected
placeholder: Var[str]
# The size of the select component. Defaults to "md".
size: Var[LiteralSelectSize]
# Props for different component parts
_trigger_props = {"placeholder", "size"}
_items_props = {"items"}
_positioner_props = {
"align",
"align_offset",
"side",
"arrow_padding",
"collision_padding",
"sticky",
"position_method",
"align_item_with_trigger",
"track_anchor",
"side_offset",
"collision_avoidance",
}
_portal_props = {"container"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a select component.
Args:
*children: Additional children to include in the select.
**props: Additional properties to apply to the select component.
Returns:
The select component.
"""
# Extract props for different parts
|
items_props = {k: props.pop(k) for k in cls._items_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
# Get extracted values with defaults
size = trigger_props.get("size", "md")
items = items_props.get("items", [])
# Create the items children
if isinstance(items, Var):
items_children = foreach(
items,
lambda item: SelectItem.create(
render_=button(
SelectItemText.create(item),
SelectItemIndicator.create(
hi(
"Tick02Icon",
class_name="size-4",
),
),
variant="ghost",
size=siz | trigger_props = {k: props.pop(k) for k in cls._trigger_props & props.keys()} |
select component. Defaults to "md".
size: Var[LiteralSelectSize]
# Props for different component parts
_trigger_props = {"placeholder", "size"}
_items_props = {"items"}
_positioner_props = {
"align",
"align_offset",
"side",
"arrow_padding",
"collision_padding",
"sticky",
"position_method",
"align_item_with_trigger",
"track_anchor",
"side_offset",
"collision_avoidance",
}
_portal_props = {"container"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a select component.
Args:
*children: Additional children to include in the select.
**props: Additional properties to apply to the select component.
Returns:
The select component.
"""
# Extract props for different parts
trigger_props = {k: props.pop(k) for k in cls._trigger_props & props.keys()}
|
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
# Get extracted values with defaults
size = trigger_props.get("size", "md")
items = items_props.get("items", [])
# Create the items children
if isinstance(items, Var):
items_children = foreach(
items,
lambda item: SelectItem.create(
render_=button(
SelectItemText.create(item),
SelectItemIndicator.create(
hi(
"Tick02Icon",
class_name="size-4",
),
),
variant="ghost",
size=size,
type="button",
class_name=Clas | items_props = {k: props.pop(k) for k in cls._items_props & props.keys()} |
s for different component parts
_trigger_props = {"placeholder", "size"}
_items_props = {"items"}
_positioner_props = {
"align",
"align_offset",
"side",
"arrow_padding",
"collision_padding",
"sticky",
"position_method",
"align_item_with_trigger",
"track_anchor",
"side_offset",
"collision_avoidance",
}
_portal_props = {"container"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a select component.
Args:
*children: Additional children to include in the select.
**props: Additional properties to apply to the select component.
Returns:
The select component.
"""
# Extract props for different parts
trigger_props = {k: props.pop(k) for k in cls._trigger_props & props.keys()}
items_props = {k: props.pop(k) for k in cls._items_props & props.keys()}
|
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
# Get extracted values with defaults
size = trigger_props.get("size", "md")
items = items_props.get("items", [])
# Create the items children
if isinstance(items, Var):
items_children = foreach(
items,
lambda item: SelectItem.create(
render_=button(
SelectItemText.create(item),
SelectItemIndicator.create(
hi(
"Tick02Icon",
class_name="size-4",
),
),
variant="ghost",
size=size,
type="button",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
),
| positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
} |
sitioner_props = {
"align",
"align_offset",
"side",
"arrow_padding",
"collision_padding",
"sticky",
"position_method",
"align_item_with_trigger",
"track_anchor",
"side_offset",
"collision_avoidance",
}
_portal_props = {"container"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a select component.
Args:
*children: Additional children to include in the select.
**props: Additional properties to apply to the select component.
Returns:
The select component.
"""
# Extract props for different parts
trigger_props = {k: props.pop(k) for k in cls._trigger_props & props.keys()}
items_props = {k: props.pop(k) for k in cls._items_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
|
# Get extracted values with defaults
size = trigger_props.get("size", "md")
items = items_props.get("items", [])
# Create the items children
if isinstance(items, Var):
items_children = foreach(
items,
lambda item: SelectItem.create(
render_=button(
SelectItemText.create(item),
SelectItemIndicator.create(
hi(
"Tick02Icon",
class_name="size-4",
),
),
variant="ghost",
size=size,
type="button",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
),
value=item,
key=item,
),
)
| portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()} |
"sticky",
"position_method",
"align_item_with_trigger",
"track_anchor",
"side_offset",
"collision_avoidance",
}
_portal_props = {"container"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a select component.
Args:
*children: Additional children to include in the select.
**props: Additional properties to apply to the select component.
Returns:
The select component.
"""
# Extract props for different parts
trigger_props = {k: props.pop(k) for k in cls._trigger_props & props.keys()}
items_props = {k: props.pop(k) for k in cls._items_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
# Get extracted values with defaults
|
items = items_props.get("items", [])
# Create the items children
if isinstance(items, Var):
items_children = foreach(
items,
lambda item: SelectItem.create(
render_=button(
SelectItemText.create(item),
SelectItemIndicator.create(
hi(
"Tick02Icon",
class_name="size-4",
),
),
variant="ghost",
size=size,
type="button",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
),
value=item,
key=item,
),
)
else:
items_children = [
SelectItem.create(
| size = trigger_props.get("size", "md") |
"align_item_with_trigger",
"track_anchor",
"side_offset",
"collision_avoidance",
}
_portal_props = {"container"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a select component.
Args:
*children: Additional children to include in the select.
**props: Additional properties to apply to the select component.
Returns:
The select component.
"""
# Extract props for different parts
trigger_props = {k: props.pop(k) for k in cls._trigger_props & props.keys()}
items_props = {k: props.pop(k) for k in cls._items_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
# Get extracted values with defaults
size = trigger_props.get("size", "md")
|
# Create the items children
if isinstance(items, Var):
items_children = foreach(
items,
lambda item: SelectItem.create(
render_=button(
SelectItemText.create(item),
SelectItemIndicator.create(
hi(
"Tick02Icon",
class_name="size-4",
),
),
variant="ghost",
size=size,
type="button",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
),
value=item,
key=item,
),
)
else:
items_children = [
SelectItem.create(
render_=button(
| items = items_props.get("items", []) |
"collision_avoidance",
}
_portal_props = {"container"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a select component.
Args:
*children: Additional children to include in the select.
**props: Additional properties to apply to the select component.
Returns:
The select component.
"""
# Extract props for different parts
trigger_props = {k: props.pop(k) for k in cls._trigger_props & props.keys()}
items_props = {k: props.pop(k) for k in cls._items_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
# Get extracted values with defaults
size = trigger_props.get("size", "md")
items = items_props.get("items", [])
# Create the items children
|
return SelectRoot.create(
SelectTrigger.create(
render_=button(
SelectValue.create(),
SelectIcon.create(
select_arrow(class_name="size-4 text-secondary-9")
),
variant="outline",
size=size,
type="button",
class_name=ClassNames.TRIGGER,
disabled=props.get("disabled", False),
),
),
SelectPortal.create(
SelectPositioner.create(
SelectPopup.create(
items_children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
| if isinstance(items, Var):
items_children = foreach(
items,
lambda item: SelectItem.create(
render_=button(
SelectItemText.create(item),
SelectItemIndicator.create(
hi(
"Tick02Icon",
class_name="size-4",
),
),
variant="ghost",
size=size,
type="button",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
),
value=item,
key=item,
),
)
else:
items_children = [
SelectItem.create(
render_=button(
SelectItemText.create(item),
SelectItemIndicator.create(
hi(
"Tick02Icon",
class_name="size-4",
),
),
variant="ghost",
size=size,
type="button",
class_name=ClassNames.ITEM,
),
value=item,
key=item,
)
for item in items
] |
_portal_props = {"container"}
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create a select component.
Args:
*children: Additional children to include in the select.
**props: Additional properties to apply to the select component.
Returns:
The select component.
"""
# Extract props for different parts
trigger_props = {k: props.pop(k) for k in cls._trigger_props & props.keys()}
items_props = {k: props.pop(k) for k in cls._items_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
# Get extracted values with defaults
size = trigger_props.get("size", "md")
items = items_props.get("items", [])
# Create the items children
if isinstance(items, Var):
|
else:
items_children = [
SelectItem.create(
render_=button(
SelectItemText.create(item),
SelectItemIndicator.create(
hi(
"Tick02Icon",
class_name="size-4",
),
),
variant="ghost",
size=size,
type="button",
class_name=ClassNames.ITEM,
),
value=item,
key=item,
)
for item in items
]
return SelectRoot.create(
SelectTrigger.create(
render_=button(
SelectValue.create(),
SelectIcon.create(
select_arrow(class_name="size-4 text-secondary-9")
| items_children = foreach(
items,
lambda item: SelectItem.create(
render_=button(
SelectItemText.create(item),
SelectItemIndicator.create(
hi(
"Tick02Icon",
class_name="size-4",
),
),
variant="ghost",
size=size,
type="button",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
),
value=item,
key=item,
),
) |
d values with defaults
size = trigger_props.get("size", "md")
items = items_props.get("items", [])
# Create the items children
if isinstance(items, Var):
items_children = foreach(
items,
lambda item: SelectItem.create(
render_=button(
SelectItemText.create(item),
SelectItemIndicator.create(
hi(
"Tick02Icon",
class_name="size-4",
),
),
variant="ghost",
size=size,
type="button",
class_name=ClassNames.ITEM,
disabled=props.get("disabled", False),
),
value=item,
key=item,
),
)
else:
|
return SelectRoot.create(
SelectTrigger.create(
render_=button(
SelectValue.create(),
SelectIcon.create(
select_arrow(class_name="size-4 text-secondary-9")
),
variant="outline",
size=size,
type="button",
class_name=ClassNames.TRIGGER,
disabled=props.get("disabled", False),
),
),
SelectPortal.create(
SelectPositioner.create(
SelectPopup.create(
items_children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
| items_children = [
SelectItem.create(
render_=button(
SelectItemText.create(item),
SelectItemIndicator.create(
hi(
"Tick02Icon",
class_name="size-4",
),
),
variant="ghost",
size=size,
type="button",
class_name=ClassNames.ITEM,
),
value=item,
key=item,
)
for item in items
] |
.create(
render_=button(
SelectValue.create(),
SelectIcon.create(
select_arrow(class_name="size-4 text-secondary-9")
),
variant="outline",
size=size,
type="button",
class_name=ClassNames.TRIGGER,
disabled=props.get("disabled", False),
),
),
SelectPortal.create(
SelectPositioner.create(
SelectPopup.create(
items_children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
*children,
**props,
)
|
select = Select()
| class Select(ComponentNamespace):
"""Namespace for Select components."""
root = staticmethod(SelectRoot.create)
trigger = staticmethod(SelectTrigger.create)
value = staticmethod(SelectValue.create)
icon = staticmethod(SelectIcon.create)
backdrop = staticmethod(SelectBackdrop.create)
portal = staticmethod(SelectPortal.create)
positioner = staticmethod(SelectPositioner.create)
popup = staticmethod(SelectPopup.create)
list = staticmethod(SelectList.create)
arrow = staticmethod(SelectArrow.create)
scroll_up_arrow = staticmethod(SelectScrollUpArrow.create)
scroll_down_arrow = staticmethod(SelectScrollDownArrow.create)
item = staticmethod(SelectItem.create)
item_text = staticmethod(SelectItemText.create)
item_indicator = staticmethod(SelectItemIndicator.create)
group = staticmethod(SelectGroup.create)
group_label = staticmethod(SelectGroupLabel.create)
separator = staticmethod(SelectSeparator.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelSelect.create) |
SelectIcon.create(
select_arrow(class_name="size-4 text-secondary-9")
),
variant="outline",
size=size,
type="button",
class_name=ClassNames.TRIGGER,
disabled=props.get("disabled", False),
),
),
SelectPortal.create(
SelectPositioner.create(
SelectPopup.create(
items_children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
*children,
**props,
)
class Select(ComponentNamespace):
"""Namespace for Select components."""
|
trigger = staticmethod(SelectTrigger.create)
value = staticmethod(SelectValue.create)
icon = staticmethod(SelectIcon.create)
backdrop = staticmethod(SelectBackdrop.create)
portal = staticmethod(SelectPortal.create)
positioner = staticmethod(SelectPositioner.create)
popup = staticmethod(SelectPopup.create)
list = staticmethod(SelectList.create)
arrow = staticmethod(SelectArrow.create)
scroll_up_arrow = staticmethod(SelectScrollUpArrow.create)
scroll_down_arrow = staticmethod(SelectScrollDownArrow.create)
item = staticmethod(SelectItem.create)
item_text = staticmethod(SelectItemText.create)
item_indicator = staticmethod(SelectItemIndicator.create)
group = staticmethod(SelectGroup.create)
group_label = staticmethod(SelectGroupLabel.create)
separator = staticmethod(SelectSeparator.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelSelect.create)
select = Select()
| root = staticmethod(SelectRoot.create) |
select_arrow(class_name="size-4 text-secondary-9")
),
variant="outline",
size=size,
type="button",
class_name=ClassNames.TRIGGER,
disabled=props.get("disabled", False),
),
),
SelectPortal.create(
SelectPositioner.create(
SelectPopup.create(
items_children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
*children,
**props,
)
class Select(ComponentNamespace):
"""Namespace for Select components."""
root = staticmethod(SelectRoot.create)
|
value = staticmethod(SelectValue.create)
icon = staticmethod(SelectIcon.create)
backdrop = staticmethod(SelectBackdrop.create)
portal = staticmethod(SelectPortal.create)
positioner = staticmethod(SelectPositioner.create)
popup = staticmethod(SelectPopup.create)
list = staticmethod(SelectList.create)
arrow = staticmethod(SelectArrow.create)
scroll_up_arrow = staticmethod(SelectScrollUpArrow.create)
scroll_down_arrow = staticmethod(SelectScrollDownArrow.create)
item = staticmethod(SelectItem.create)
item_text = staticmethod(SelectItemText.create)
item_indicator = staticmethod(SelectItemIndicator.create)
group = staticmethod(SelectGroup.create)
group_label = staticmethod(SelectGroupLabel.create)
separator = staticmethod(SelectSeparator.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelSelect.create)
select = Select()
| trigger = staticmethod(SelectTrigger.create) |
e-4 text-secondary-9")
),
variant="outline",
size=size,
type="button",
class_name=ClassNames.TRIGGER,
disabled=props.get("disabled", False),
),
),
SelectPortal.create(
SelectPositioner.create(
SelectPopup.create(
items_children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
*children,
**props,
)
class Select(ComponentNamespace):
"""Namespace for Select components."""
root = staticmethod(SelectRoot.create)
trigger = staticmethod(SelectTrigger.create)
|
icon = staticmethod(SelectIcon.create)
backdrop = staticmethod(SelectBackdrop.create)
portal = staticmethod(SelectPortal.create)
positioner = staticmethod(SelectPositioner.create)
popup = staticmethod(SelectPopup.create)
list = staticmethod(SelectList.create)
arrow = staticmethod(SelectArrow.create)
scroll_up_arrow = staticmethod(SelectScrollUpArrow.create)
scroll_down_arrow = staticmethod(SelectScrollDownArrow.create)
item = staticmethod(SelectItem.create)
item_text = staticmethod(SelectItemText.create)
item_indicator = staticmethod(SelectItemIndicator.create)
group = staticmethod(SelectGroup.create)
group_label = staticmethod(SelectGroupLabel.create)
separator = staticmethod(SelectSeparator.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelSelect.create)
select = Select()
| value = staticmethod(SelectValue.create) |
variant="outline",
size=size,
type="button",
class_name=ClassNames.TRIGGER,
disabled=props.get("disabled", False),
),
),
SelectPortal.create(
SelectPositioner.create(
SelectPopup.create(
items_children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
*children,
**props,
)
class Select(ComponentNamespace):
"""Namespace for Select components."""
root = staticmethod(SelectRoot.create)
trigger = staticmethod(SelectTrigger.create)
value = staticmethod(SelectValue.create)
|
backdrop = staticmethod(SelectBackdrop.create)
portal = staticmethod(SelectPortal.create)
positioner = staticmethod(SelectPositioner.create)
popup = staticmethod(SelectPopup.create)
list = staticmethod(SelectList.create)
arrow = staticmethod(SelectArrow.create)
scroll_up_arrow = staticmethod(SelectScrollUpArrow.create)
scroll_down_arrow = staticmethod(SelectScrollDownArrow.create)
item = staticmethod(SelectItem.create)
item_text = staticmethod(SelectItemText.create)
item_indicator = staticmethod(SelectItemIndicator.create)
group = staticmethod(SelectGroup.create)
group_label = staticmethod(SelectGroupLabel.create)
separator = staticmethod(SelectSeparator.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelSelect.create)
select = Select()
| icon = staticmethod(SelectIcon.create) |
size=size,
type="button",
class_name=ClassNames.TRIGGER,
disabled=props.get("disabled", False),
),
),
SelectPortal.create(
SelectPositioner.create(
SelectPopup.create(
items_children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
*children,
**props,
)
class Select(ComponentNamespace):
"""Namespace for Select components."""
root = staticmethod(SelectRoot.create)
trigger = staticmethod(SelectTrigger.create)
value = staticmethod(SelectValue.create)
icon = staticmethod(SelectIcon.create)
|
portal = staticmethod(SelectPortal.create)
positioner = staticmethod(SelectPositioner.create)
popup = staticmethod(SelectPopup.create)
list = staticmethod(SelectList.create)
arrow = staticmethod(SelectArrow.create)
scroll_up_arrow = staticmethod(SelectScrollUpArrow.create)
scroll_down_arrow = staticmethod(SelectScrollDownArrow.create)
item = staticmethod(SelectItem.create)
item_text = staticmethod(SelectItemText.create)
item_indicator = staticmethod(SelectItemIndicator.create)
group = staticmethod(SelectGroup.create)
group_label = staticmethod(SelectGroupLabel.create)
separator = staticmethod(SelectSeparator.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelSelect.create)
select = Select()
| backdrop = staticmethod(SelectBackdrop.create) |
e="button",
class_name=ClassNames.TRIGGER,
disabled=props.get("disabled", False),
),
),
SelectPortal.create(
SelectPositioner.create(
SelectPopup.create(
items_children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
*children,
**props,
)
class Select(ComponentNamespace):
"""Namespace for Select components."""
root = staticmethod(SelectRoot.create)
trigger = staticmethod(SelectTrigger.create)
value = staticmethod(SelectValue.create)
icon = staticmethod(SelectIcon.create)
backdrop = staticmethod(SelectBackdrop.create)
|
positioner = staticmethod(SelectPositioner.create)
popup = staticmethod(SelectPopup.create)
list = staticmethod(SelectList.create)
arrow = staticmethod(SelectArrow.create)
scroll_up_arrow = staticmethod(SelectScrollUpArrow.create)
scroll_down_arrow = staticmethod(SelectScrollDownArrow.create)
item = staticmethod(SelectItem.create)
item_text = staticmethod(SelectItemText.create)
item_indicator = staticmethod(SelectItemIndicator.create)
group = staticmethod(SelectGroup.create)
group_label = staticmethod(SelectGroupLabel.create)
separator = staticmethod(SelectSeparator.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelSelect.create)
select = Select()
| portal = staticmethod(SelectPortal.create) |
sNames.TRIGGER,
disabled=props.get("disabled", False),
),
),
SelectPortal.create(
SelectPositioner.create(
SelectPopup.create(
items_children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
*children,
**props,
)
class Select(ComponentNamespace):
"""Namespace for Select components."""
root = staticmethod(SelectRoot.create)
trigger = staticmethod(SelectTrigger.create)
value = staticmethod(SelectValue.create)
icon = staticmethod(SelectIcon.create)
backdrop = staticmethod(SelectBackdrop.create)
portal = staticmethod(SelectPortal.create)
|
popup = staticmethod(SelectPopup.create)
list = staticmethod(SelectList.create)
arrow = staticmethod(SelectArrow.create)
scroll_up_arrow = staticmethod(SelectScrollUpArrow.create)
scroll_down_arrow = staticmethod(SelectScrollDownArrow.create)
item = staticmethod(SelectItem.create)
item_text = staticmethod(SelectItemText.create)
item_indicator = staticmethod(SelectItemIndicator.create)
group = staticmethod(SelectGroup.create)
group_label = staticmethod(SelectGroupLabel.create)
separator = staticmethod(SelectSeparator.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelSelect.create)
select = Select()
| positioner = staticmethod(SelectPositioner.create) |
"disabled", False),
),
),
SelectPortal.create(
SelectPositioner.create(
SelectPopup.create(
items_children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
*children,
**props,
)
class Select(ComponentNamespace):
"""Namespace for Select components."""
root = staticmethod(SelectRoot.create)
trigger = staticmethod(SelectTrigger.create)
value = staticmethod(SelectValue.create)
icon = staticmethod(SelectIcon.create)
backdrop = staticmethod(SelectBackdrop.create)
portal = staticmethod(SelectPortal.create)
positioner = staticmethod(SelectPositioner.create)
|
list = staticmethod(SelectList.create)
arrow = staticmethod(SelectArrow.create)
scroll_up_arrow = staticmethod(SelectScrollUpArrow.create)
scroll_down_arrow = staticmethod(SelectScrollDownArrow.create)
item = staticmethod(SelectItem.create)
item_text = staticmethod(SelectItemText.create)
item_indicator = staticmethod(SelectItemIndicator.create)
group = staticmethod(SelectGroup.create)
group_label = staticmethod(SelectGroupLabel.create)
separator = staticmethod(SelectSeparator.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelSelect.create)
select = Select()
| popup = staticmethod(SelectPopup.create) |
),
SelectPortal.create(
SelectPositioner.create(
SelectPopup.create(
items_children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
*children,
**props,
)
class Select(ComponentNamespace):
"""Namespace for Select components."""
root = staticmethod(SelectRoot.create)
trigger = staticmethod(SelectTrigger.create)
value = staticmethod(SelectValue.create)
icon = staticmethod(SelectIcon.create)
backdrop = staticmethod(SelectBackdrop.create)
portal = staticmethod(SelectPortal.create)
positioner = staticmethod(SelectPositioner.create)
popup = staticmethod(SelectPopup.create)
|
arrow = staticmethod(SelectArrow.create)
scroll_up_arrow = staticmethod(SelectScrollUpArrow.create)
scroll_down_arrow = staticmethod(SelectScrollDownArrow.create)
item = staticmethod(SelectItem.create)
item_text = staticmethod(SelectItemText.create)
item_indicator = staticmethod(SelectItemIndicator.create)
group = staticmethod(SelectGroup.create)
group_label = staticmethod(SelectGroupLabel.create)
separator = staticmethod(SelectSeparator.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelSelect.create)
select = Select()
| list = staticmethod(SelectList.create) |
SelectPositioner.create(
SelectPopup.create(
items_children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
*children,
**props,
)
class Select(ComponentNamespace):
"""Namespace for Select components."""
root = staticmethod(SelectRoot.create)
trigger = staticmethod(SelectTrigger.create)
value = staticmethod(SelectValue.create)
icon = staticmethod(SelectIcon.create)
backdrop = staticmethod(SelectBackdrop.create)
portal = staticmethod(SelectPortal.create)
positioner = staticmethod(SelectPositioner.create)
popup = staticmethod(SelectPopup.create)
list = staticmethod(SelectList.create)
|
scroll_up_arrow = staticmethod(SelectScrollUpArrow.create)
scroll_down_arrow = staticmethod(SelectScrollDownArrow.create)
item = staticmethod(SelectItem.create)
item_text = staticmethod(SelectItemText.create)
item_indicator = staticmethod(SelectItemIndicator.create)
group = staticmethod(SelectGroup.create)
group_label = staticmethod(SelectGroupLabel.create)
separator = staticmethod(SelectSeparator.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelSelect.create)
select = Select()
| arrow = staticmethod(SelectArrow.create) |
SelectPopup.create(
items_children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
*children,
**props,
)
class Select(ComponentNamespace):
"""Namespace for Select components."""
root = staticmethod(SelectRoot.create)
trigger = staticmethod(SelectTrigger.create)
value = staticmethod(SelectValue.create)
icon = staticmethod(SelectIcon.create)
backdrop = staticmethod(SelectBackdrop.create)
portal = staticmethod(SelectPortal.create)
positioner = staticmethod(SelectPositioner.create)
popup = staticmethod(SelectPopup.create)
list = staticmethod(SelectList.create)
arrow = staticmethod(SelectArrow.create)
|
scroll_down_arrow = staticmethod(SelectScrollDownArrow.create)
item = staticmethod(SelectItem.create)
item_text = staticmethod(SelectItemText.create)
item_indicator = staticmethod(SelectItemIndicator.create)
group = staticmethod(SelectGroup.create)
group_label = staticmethod(SelectGroupLabel.create)
separator = staticmethod(SelectSeparator.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelSelect.create)
select = Select()
| scroll_up_arrow = staticmethod(SelectScrollUpArrow.create) |
s_children,
class_name=cn(
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
*children,
**props,
)
class Select(ComponentNamespace):
"""Namespace for Select components."""
root = staticmethod(SelectRoot.create)
trigger = staticmethod(SelectTrigger.create)
value = staticmethod(SelectValue.create)
icon = staticmethod(SelectIcon.create)
backdrop = staticmethod(SelectBackdrop.create)
portal = staticmethod(SelectPortal.create)
positioner = staticmethod(SelectPositioner.create)
popup = staticmethod(SelectPopup.create)
list = staticmethod(SelectList.create)
arrow = staticmethod(SelectArrow.create)
scroll_up_arrow = staticmethod(SelectScrollUpArrow.create)
|
item = staticmethod(SelectItem.create)
item_text = staticmethod(SelectItemText.create)
item_indicator = staticmethod(SelectItemIndicator.create)
group = staticmethod(SelectGroup.create)
group_label = staticmethod(SelectGroupLabel.create)
separator = staticmethod(SelectSeparator.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelSelect.create)
select = Select()
| scroll_down_arrow = staticmethod(SelectScrollDownArrow.create) |
ClassNames.POPUP,
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
*children,
**props,
)
class Select(ComponentNamespace):
"""Namespace for Select components."""
root = staticmethod(SelectRoot.create)
trigger = staticmethod(SelectTrigger.create)
value = staticmethod(SelectValue.create)
icon = staticmethod(SelectIcon.create)
backdrop = staticmethod(SelectBackdrop.create)
portal = staticmethod(SelectPortal.create)
positioner = staticmethod(SelectPositioner.create)
popup = staticmethod(SelectPopup.create)
list = staticmethod(SelectList.create)
arrow = staticmethod(SelectArrow.create)
scroll_up_arrow = staticmethod(SelectScrollUpArrow.create)
scroll_down_arrow = staticmethod(SelectScrollDownArrow.create)
|
item_text = staticmethod(SelectItemText.create)
item_indicator = staticmethod(SelectItemIndicator.create)
group = staticmethod(SelectGroup.create)
group_label = staticmethod(SelectGroupLabel.create)
separator = staticmethod(SelectSeparator.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelSelect.create)
select = Select()
| item = staticmethod(SelectItem.create) |
f"rounded-[calc(var(--radius-ui-{size})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
*children,
**props,
)
class Select(ComponentNamespace):
"""Namespace for Select components."""
root = staticmethod(SelectRoot.create)
trigger = staticmethod(SelectTrigger.create)
value = staticmethod(SelectValue.create)
icon = staticmethod(SelectIcon.create)
backdrop = staticmethod(SelectBackdrop.create)
portal = staticmethod(SelectPortal.create)
positioner = staticmethod(SelectPositioner.create)
popup = staticmethod(SelectPopup.create)
list = staticmethod(SelectList.create)
arrow = staticmethod(SelectArrow.create)
scroll_up_arrow = staticmethod(SelectScrollUpArrow.create)
scroll_down_arrow = staticmethod(SelectScrollDownArrow.create)
item = staticmethod(SelectItem.create)
|
item_indicator = staticmethod(SelectItemIndicator.create)
group = staticmethod(SelectGroup.create)
group_label = staticmethod(SelectGroupLabel.create)
separator = staticmethod(SelectSeparator.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelSelect.create)
select = Select()
| item_text = staticmethod(SelectItemText.create) |
})+0.25rem)]",
),
),
**positioner_props,
),
**portal_props,
),
*children,
**props,
)
class Select(ComponentNamespace):
"""Namespace for Select components."""
root = staticmethod(SelectRoot.create)
trigger = staticmethod(SelectTrigger.create)
value = staticmethod(SelectValue.create)
icon = staticmethod(SelectIcon.create)
backdrop = staticmethod(SelectBackdrop.create)
portal = staticmethod(SelectPortal.create)
positioner = staticmethod(SelectPositioner.create)
popup = staticmethod(SelectPopup.create)
list = staticmethod(SelectList.create)
arrow = staticmethod(SelectArrow.create)
scroll_up_arrow = staticmethod(SelectScrollUpArrow.create)
scroll_down_arrow = staticmethod(SelectScrollDownArrow.create)
item = staticmethod(SelectItem.create)
item_text = staticmethod(SelectItemText.create)
|
group = staticmethod(SelectGroup.create)
group_label = staticmethod(SelectGroupLabel.create)
separator = staticmethod(SelectSeparator.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelSelect.create)
select = Select()
| item_indicator = staticmethod(SelectItemIndicator.create) |
),
**positioner_props,
),
**portal_props,
),
*children,
**props,
)
class Select(ComponentNamespace):
"""Namespace for Select components."""
root = staticmethod(SelectRoot.create)
trigger = staticmethod(SelectTrigger.create)
value = staticmethod(SelectValue.create)
icon = staticmethod(SelectIcon.create)
backdrop = staticmethod(SelectBackdrop.create)
portal = staticmethod(SelectPortal.create)
positioner = staticmethod(SelectPositioner.create)
popup = staticmethod(SelectPopup.create)
list = staticmethod(SelectList.create)
arrow = staticmethod(SelectArrow.create)
scroll_up_arrow = staticmethod(SelectScrollUpArrow.create)
scroll_down_arrow = staticmethod(SelectScrollDownArrow.create)
item = staticmethod(SelectItem.create)
item_text = staticmethod(SelectItemText.create)
item_indicator = staticmethod(SelectItemIndicator.create)
|
group_label = staticmethod(SelectGroupLabel.create)
separator = staticmethod(SelectSeparator.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelSelect.create)
select = Select()
| group = staticmethod(SelectGroup.create) |
),
**portal_props,
),
*children,
**props,
)
class Select(ComponentNamespace):
"""Namespace for Select components."""
root = staticmethod(SelectRoot.create)
trigger = staticmethod(SelectTrigger.create)
value = staticmethod(SelectValue.create)
icon = staticmethod(SelectIcon.create)
backdrop = staticmethod(SelectBackdrop.create)
portal = staticmethod(SelectPortal.create)
positioner = staticmethod(SelectPositioner.create)
popup = staticmethod(SelectPopup.create)
list = staticmethod(SelectList.create)
arrow = staticmethod(SelectArrow.create)
scroll_up_arrow = staticmethod(SelectScrollUpArrow.create)
scroll_down_arrow = staticmethod(SelectScrollDownArrow.create)
item = staticmethod(SelectItem.create)
item_text = staticmethod(SelectItemText.create)
item_indicator = staticmethod(SelectItemIndicator.create)
group = staticmethod(SelectGroup.create)
|
separator = staticmethod(SelectSeparator.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelSelect.create)
select = Select()
| group_label = staticmethod(SelectGroupLabel.create) |
),
*children,
**props,
)
class Select(ComponentNamespace):
"""Namespace for Select components."""
root = staticmethod(SelectRoot.create)
trigger = staticmethod(SelectTrigger.create)
value = staticmethod(SelectValue.create)
icon = staticmethod(SelectIcon.create)
backdrop = staticmethod(SelectBackdrop.create)
portal = staticmethod(SelectPortal.create)
positioner = staticmethod(SelectPositioner.create)
popup = staticmethod(SelectPopup.create)
list = staticmethod(SelectList.create)
arrow = staticmethod(SelectArrow.create)
scroll_up_arrow = staticmethod(SelectScrollUpArrow.create)
scroll_down_arrow = staticmethod(SelectScrollDownArrow.create)
item = staticmethod(SelectItem.create)
item_text = staticmethod(SelectItemText.create)
item_indicator = staticmethod(SelectItemIndicator.create)
group = staticmethod(SelectGroup.create)
group_label = staticmethod(SelectGroupLabel.create)
|
class_names = ClassNames
__call__ = staticmethod(HighLevelSelect.create)
select = Select()
| separator = staticmethod(SelectSeparator.create) |
)
class Select(ComponentNamespace):
"""Namespace for Select components."""
root = staticmethod(SelectRoot.create)
trigger = staticmethod(SelectTrigger.create)
value = staticmethod(SelectValue.create)
icon = staticmethod(SelectIcon.create)
backdrop = staticmethod(SelectBackdrop.create)
portal = staticmethod(SelectPortal.create)
positioner = staticmethod(SelectPositioner.create)
popup = staticmethod(SelectPopup.create)
list = staticmethod(SelectList.create)
arrow = staticmethod(SelectArrow.create)
scroll_up_arrow = staticmethod(SelectScrollUpArrow.create)
scroll_down_arrow = staticmethod(SelectScrollDownArrow.create)
item = staticmethod(SelectItem.create)
item_text = staticmethod(SelectItemText.create)
item_indicator = staticmethod(SelectItemIndicator.create)
group = staticmethod(SelectGroup.create)
group_label = staticmethod(SelectGroupLabel.create)
separator = staticmethod(SelectSeparator.create)
|
__call__ = staticmethod(HighLevelSelect.create)
select = Select()
| class_names = ClassNames |
nentNamespace):
"""Namespace for Select components."""
root = staticmethod(SelectRoot.create)
trigger = staticmethod(SelectTrigger.create)
value = staticmethod(SelectValue.create)
icon = staticmethod(SelectIcon.create)
backdrop = staticmethod(SelectBackdrop.create)
portal = staticmethod(SelectPortal.create)
positioner = staticmethod(SelectPositioner.create)
popup = staticmethod(SelectPopup.create)
list = staticmethod(SelectList.create)
arrow = staticmethod(SelectArrow.create)
scroll_up_arrow = staticmethod(SelectScrollUpArrow.create)
scroll_down_arrow = staticmethod(SelectScrollDownArrow.create)
item = staticmethod(SelectItem.create)
item_text = staticmethod(SelectItemText.create)
item_indicator = staticmethod(SelectItemIndicator.create)
group = staticmethod(SelectGroup.create)
group_label = staticmethod(SelectGroupLabel.create)
separator = staticmethod(SelectSeparator.create)
class_names = ClassNames
|
select = Select()
| __call__ = staticmethod(HighLevelSelect.create) |
ents."""
root = staticmethod(SelectRoot.create)
trigger = staticmethod(SelectTrigger.create)
value = staticmethod(SelectValue.create)
icon = staticmethod(SelectIcon.create)
backdrop = staticmethod(SelectBackdrop.create)
portal = staticmethod(SelectPortal.create)
positioner = staticmethod(SelectPositioner.create)
popup = staticmethod(SelectPopup.create)
list = staticmethod(SelectList.create)
arrow = staticmethod(SelectArrow.create)
scroll_up_arrow = staticmethod(SelectScrollUpArrow.create)
scroll_down_arrow = staticmethod(SelectScrollDownArrow.create)
item = staticmethod(SelectItem.create)
item_text = staticmethod(SelectItemText.create)
item_indicator = staticmethod(SelectItemIndicator.create)
group = staticmethod(SelectGroup.create)
group_label = staticmethod(SelectGroupLabel.create)
separator = staticmethod(SelectSeparator.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelSelect.create)
| select = Select() | |
"""Custom skeleton component."""
from reflex.components.component import Component, memo
|
from reflex.vars.base import Var
from reflex_ui.utils.twmerge import cn
class ClassNames:
"""Class names for skeleton component."""
ROOT = "animate-pulse bg-secondary-6"
@memo
def skeleton_component(
class_name: str | Var[str] = "",
) -> Component:
"""Skeleton component."""
return Div.create(class_name=cn(ClassNames.ROOT, class_name))
skeleton = skeleton_component
| from reflex.components.el import Div |
"""Custom skeleton component."""
from reflex.components.component import Component, memo
from reflex.components.el import Div
|
from reflex_ui.utils.twmerge import cn
class ClassNames:
"""Class names for skeleton component."""
ROOT = "animate-pulse bg-secondary-6"
@memo
def skeleton_component(
class_name: str | Var[str] = "",
) -> Component:
"""Skeleton component."""
return Div.create(class_name=cn(ClassNames.ROOT, class_name))
skeleton = skeleton_component
| from reflex.vars.base import Var |
"""Custom skeleton component."""
from reflex.components.component import Component, memo
from reflex.components.el import Div
from reflex.vars.base import Var
|
class ClassNames:
"""Class names for skeleton component."""
ROOT = "animate-pulse bg-secondary-6"
@memo
def skeleton_component(
class_name: str | Var[str] = "",
) -> Component:
"""Skeleton component."""
return Div.create(class_name=cn(ClassNames.ROOT, class_name))
skeleton = skeleton_component
| from reflex_ui.utils.twmerge import cn |
"""Custom skeleton component."""
from reflex.components.component import Component, memo
from reflex.components.el import Div
from reflex.vars.base import Var
from reflex_ui.utils.twmerge import cn
class ClassNames:
"""Class names for skeleton component."""
|
@memo
def skeleton_component(
class_name: str | Var[str] = "",
) -> Component:
"""Skeleton component."""
return Div.create(class_name=cn(ClassNames.ROOT, class_name))
skeleton = skeleton_component
| ROOT = "animate-pulse bg-secondary-6" |
"""Custom skeleton component."""
from reflex.components.component import Component, memo
from reflex.components.el import Div
from reflex.vars.base import Var
from reflex_ui.utils.twmerge import cn
class ClassNames:
"""Class names for skeleton component."""
ROOT = "animate-pulse bg-secondary-6"
@memo
def skeleton_component(
class_name: str | Var[str] = "",
) -> Component:
"""Skeleton component."""
return Div.create(class_name=cn(ClassNames.ROOT, class_name))
| skeleton = skeleton_component | |
"""Custom Slider component."""
|
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
LiteralOrientation = Literal["horizontal", "vertical"]
on_value_event_spec = (
passthrough_event_spec(int),
passthrough_event_spec(float),
passthrough_event_spec(list[int | float]),
passthrough_event_spec(list[int]),
passthrough_event_spec(list[float]),
)
class ClassNames:
"""Class names for slider components."""
ROOT = "flex max-w-64 w-full touch-none items-center select-none"
VALUE = "text-sm text-primary-11 font-medium"
CONTROL = "flex items-center justify-center w-full"
TRACK = "h-2 w-full rounded-full bg-secondary-4 select-none"
INDICATOR = "absolute h-full rounded-full bg-primary-9 select-none"
THUMB = "h-4 w-[0.575rem] rounded-[2px] bg-white outline | from typing import Literal |
"""Custom Slider component."""
from typing import Literal
|
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
LiteralOrientation = Literal["horizontal", "vertical"]
on_value_event_spec = (
passthrough_event_spec(int),
passthrough_event_spec(float),
passthrough_event_spec(list[int | float]),
passthrough_event_spec(list[int]),
passthrough_event_spec(list[float]),
)
class ClassNames:
"""Class names for slider components."""
ROOT = "flex max-w-64 w-full touch-none items-center select-none"
VALUE = "text-sm text-primary-11 font-medium"
CONTROL = "flex items-center justify-center w-full"
TRACK = "h-2 w-full rounded-full bg-secondary-4 select-none"
INDICATOR = "absolute h-full rounded-full bg-primary-9 select-none"
THUMB = "h-4 w-[0.575rem] rounded-[2px] bg-white outline outline-black/30 select-none box-shadow:[0_0_0_1px_rgba(0,0,0,1),0_1px_ | from reflex.components.component import Component, ComponentNamespace |
"""Custom Slider component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
|
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
LiteralOrientation = Literal["horizontal", "vertical"]
on_value_event_spec = (
passthrough_event_spec(int),
passthrough_event_spec(float),
passthrough_event_spec(list[int | float]),
passthrough_event_spec(list[int]),
passthrough_event_spec(list[float]),
)
class ClassNames:
"""Class names for slider components."""
ROOT = "flex max-w-64 w-full touch-none items-center select-none"
VALUE = "text-sm text-primary-11 font-medium"
CONTROL = "flex items-center justify-center w-full"
TRACK = "h-2 w-full rounded-full bg-secondary-4 select-none"
INDICATOR = "absolute h-full rounded-full bg-primary-9 select-none"
THUMB = "h-4 w-[0.575rem] rounded-[2px] bg-white outline outline-black/30 select-none box-shadow:[0_0_0_1px_rgba(0,0,0,1),0_1px_2px_rgba(0,0,0,.04)] data-[dragging]:h-5 transition-[height,sc | from reflex.event import EventHandler, passthrough_event_spec |
"""Custom Slider component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
|
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
LiteralOrientation = Literal["horizontal", "vertical"]
on_value_event_spec = (
passthrough_event_spec(int),
passthrough_event_spec(float),
passthrough_event_spec(list[int | float]),
passthrough_event_spec(list[int]),
passthrough_event_spec(list[float]),
)
class ClassNames:
"""Class names for slider components."""
ROOT = "flex max-w-64 w-full touch-none items-center select-none"
VALUE = "text-sm text-primary-11 font-medium"
CONTROL = "flex items-center justify-center w-full"
TRACK = "h-2 w-full rounded-full bg-secondary-4 select-none"
INDICATOR = "absolute h-full rounded-full bg-primary-9 select-none"
THUMB = "h-4 w-[0.575rem] rounded-[2px] bg-white outline outline-black/30 select-none box-shadow:[0_0_0_1px_rgba(0,0,0,1),0_1px_2px_rgba(0,0,0,.04)] data-[dragging]:h-5 transition-[height,scale] hover:h-4.5"
class SliderBaseCompone | from reflex.utils.imports import ImportVar |
"""Custom Slider component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
|
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
LiteralOrientation = Literal["horizontal", "vertical"]
on_value_event_spec = (
passthrough_event_spec(int),
passthrough_event_spec(float),
passthrough_event_spec(list[int | float]),
passthrough_event_spec(list[int]),
passthrough_event_spec(list[float]),
)
class ClassNames:
"""Class names for slider components."""
ROOT = "flex max-w-64 w-full touch-none items-center select-none"
VALUE = "text-sm text-primary-11 font-medium"
CONTROL = "flex items-center justify-center w-full"
TRACK = "h-2 w-full rounded-full bg-secondary-4 select-none"
INDICATOR = "absolute h-full rounded-full bg-primary-9 select-none"
THUMB = "h-4 w-[0.575rem] rounded-[2px] bg-white outline outline-black/30 select-none box-shadow:[0_0_0_1px_rgba(0,0,0,1),0_1px_2px_rgba(0,0,0,.04)] data-[dragging]:h-5 transition-[height,scale] hover:h-4.5"
class SliderBaseComponent(BaseUIComponent):
"""Base | from reflex.vars.base import Var |
"""Custom Slider component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
|
LiteralOrientation = Literal["horizontal", "vertical"]
on_value_event_spec = (
passthrough_event_spec(int),
passthrough_event_spec(float),
passthrough_event_spec(list[int | float]),
passthrough_event_spec(list[int]),
passthrough_event_spec(list[float]),
)
class ClassNames:
"""Class names for slider components."""
ROOT = "flex max-w-64 w-full touch-none items-center select-none"
VALUE = "text-sm text-primary-11 font-medium"
CONTROL = "flex items-center justify-center w-full"
TRACK = "h-2 w-full rounded-full bg-secondary-4 select-none"
INDICATOR = "absolute h-full rounded-full bg-primary-9 select-none"
THUMB = "h-4 w-[0.575rem] rounded-[2px] bg-white outline outline-black/30 select-none box-shadow:[0_0_0_1px_rgba(0,0,0,1),0_1px_2px_rgba(0,0,0,.04)] data-[dragging]:h-5 transition-[height,scale] hover:h-4.5"
class SliderBaseComponent(BaseUIComponent):
"""Base component for slider components."""
library = f"{PACKAGE_NAME}/slid | from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent |
"""Custom Slider component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
|
on_value_event_spec = (
passthrough_event_spec(int),
passthrough_event_spec(float),
passthrough_event_spec(list[int | float]),
passthrough_event_spec(list[int]),
passthrough_event_spec(list[float]),
)
class ClassNames:
"""Class names for slider components."""
ROOT = "flex max-w-64 w-full touch-none items-center select-none"
VALUE = "text-sm text-primary-11 font-medium"
CONTROL = "flex items-center justify-center w-full"
TRACK = "h-2 w-full rounded-full bg-secondary-4 select-none"
INDICATOR = "absolute h-full rounded-full bg-primary-9 select-none"
THUMB = "h-4 w-[0.575rem] rounded-[2px] bg-white outline outline-black/30 select-none box-shadow:[0_0_0_1px_rgba(0,0,0,1),0_1px_2px_rgba(0,0,0,.04)] data-[dragging]:h-5 transition-[height,scale] hover:h-4.5"
class SliderBaseComponent(BaseUIComponent):
"""Base component for slider components."""
library = f"{PACKAGE_NAME}/slider"
@property
def import_var(self):
""" | LiteralOrientation = Literal["horizontal", "vertical"] |
"""Custom Slider component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
LiteralOrientation = Literal["horizontal", "vertical"]
|
class ClassNames:
"""Class names for slider components."""
ROOT = "flex max-w-64 w-full touch-none items-center select-none"
VALUE = "text-sm text-primary-11 font-medium"
CONTROL = "flex items-center justify-center w-full"
TRACK = "h-2 w-full rounded-full bg-secondary-4 select-none"
INDICATOR = "absolute h-full rounded-full bg-primary-9 select-none"
THUMB = "h-4 w-[0.575rem] rounded-[2px] bg-white outline outline-black/30 select-none box-shadow:[0_0_0_1px_rgba(0,0,0,1),0_1px_2px_rgba(0,0,0,.04)] data-[dragging]:h-5 transition-[height,scale] hover:h-4.5"
class SliderBaseComponent(BaseUIComponent):
"""Base component for slider components."""
library = f"{PACKAGE_NAME}/slider"
@property
def import_var(self):
"""Return the import variable for the slider component."""
return ImportVar(tag="Slider", package_path="", install=False)
class SliderRoot(SliderBaseComponent):
"""Groups all parts of the slider. Renders a div e | on_value_event_spec = (
passthrough_event_spec(int),
passthrough_event_spec(float),
passthrough_event_spec(list[int | float]),
passthrough_event_spec(list[int]),
passthrough_event_spec(list[float]),
) |
"""Custom Slider component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
LiteralOrientation = Literal["horizontal", "vertical"]
on_value_event_spec = (
passthrough_event_spec(int),
passthrough_event_spec(float),
passthrough_event_spec(list[int | float]),
passthrough_event_spec(list[int]),
passthrough_event_spec(list[float]),
)
|
class SliderBaseComponent(BaseUIComponent):
"""Base component for slider components."""
library = f"{PACKAGE_NAME}/slider"
@property
def import_var(self):
"""Return the import variable for the slider component."""
return ImportVar(tag="Slider", package_path="", install=False)
class SliderRoot(SliderBaseComponent):
"""Groups all parts of the slider. Renders a div element."""
tag = "Slider.Root"
# Identifies the field when a form is submitted.
name: Var[str]
# The uncontrolled value of the slider when it's initially rendered. To render a controlled slider, use the value prop instead.
default_value: Var[int | float | list[int | float]]
# The value of the slider. For ranged sliders, provide an array with two values.
value: Var[int | float | list[int | float]]
# Callback function that is fired when the slider's value changed.
on_value_change: EventHandler[on_value_event_spec]
# Callback function that is | class ClassNames:
"""Class names for slider components."""
ROOT = "flex max-w-64 w-full touch-none items-center select-none"
VALUE = "text-sm text-primary-11 font-medium"
CONTROL = "flex items-center justify-center w-full"
TRACK = "h-2 w-full rounded-full bg-secondary-4 select-none"
INDICATOR = "absolute h-full rounded-full bg-primary-9 select-none"
THUMB = "h-4 w-[0.575rem] rounded-[2px] bg-white outline outline-black/30 select-none box-shadow:[0_0_0_1px_rgba(0,0,0,1),0_1px_2px_rgba(0,0,0,.04)] data-[dragging]:h-5 transition-[height,scale] hover:h-4.5" |
"""Custom Slider component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
LiteralOrientation = Literal["horizontal", "vertical"]
on_value_event_spec = (
passthrough_event_spec(int),
passthrough_event_spec(float),
passthrough_event_spec(list[int | float]),
passthrough_event_spec(list[int]),
passthrough_event_spec(list[float]),
)
class ClassNames:
"""Class names for slider components."""
|
VALUE = "text-sm text-primary-11 font-medium"
CONTROL = "flex items-center justify-center w-full"
TRACK = "h-2 w-full rounded-full bg-secondary-4 select-none"
INDICATOR = "absolute h-full rounded-full bg-primary-9 select-none"
THUMB = "h-4 w-[0.575rem] rounded-[2px] bg-white outline outline-black/30 select-none box-shadow:[0_0_0_1px_rgba(0,0,0,1),0_1px_2px_rgba(0,0,0,.04)] data-[dragging]:h-5 transition-[height,scale] hover:h-4.5"
class SliderBaseComponent(BaseUIComponent):
"""Base component for slider components."""
library = f"{PACKAGE_NAME}/slider"
@property
def import_var(self):
"""Return the import variable for the slider component."""
return ImportVar(tag="Slider", package_path="", install=False)
class SliderRoot(SliderBaseComponent):
"""Groups all parts of the slider. Renders a div element."""
tag = "Slider.Root"
# Identifies the field when a form is submitted.
name: Var[str]
# The uncontrolled val | ROOT = "flex max-w-64 w-full touch-none items-center select-none" |
"""Custom Slider component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
LiteralOrientation = Literal["horizontal", "vertical"]
on_value_event_spec = (
passthrough_event_spec(int),
passthrough_event_spec(float),
passthrough_event_spec(list[int | float]),
passthrough_event_spec(list[int]),
passthrough_event_spec(list[float]),
)
class ClassNames:
"""Class names for slider components."""
ROOT = "flex max-w-64 w-full touch-none items-center select-none"
|
CONTROL = "flex items-center justify-center w-full"
TRACK = "h-2 w-full rounded-full bg-secondary-4 select-none"
INDICATOR = "absolute h-full rounded-full bg-primary-9 select-none"
THUMB = "h-4 w-[0.575rem] rounded-[2px] bg-white outline outline-black/30 select-none box-shadow:[0_0_0_1px_rgba(0,0,0,1),0_1px_2px_rgba(0,0,0,.04)] data-[dragging]:h-5 transition-[height,scale] hover:h-4.5"
class SliderBaseComponent(BaseUIComponent):
"""Base component for slider components."""
library = f"{PACKAGE_NAME}/slider"
@property
def import_var(self):
"""Return the import variable for the slider component."""
return ImportVar(tag="Slider", package_path="", install=False)
class SliderRoot(SliderBaseComponent):
"""Groups all parts of the slider. Renders a div element."""
tag = "Slider.Root"
# Identifies the field when a form is submitted.
name: Var[str]
# The uncontrolled value of the slider when it's initially rendered. To | VALUE = "text-sm text-primary-11 font-medium" |
"""Custom Slider component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
LiteralOrientation = Literal["horizontal", "vertical"]
on_value_event_spec = (
passthrough_event_spec(int),
passthrough_event_spec(float),
passthrough_event_spec(list[int | float]),
passthrough_event_spec(list[int]),
passthrough_event_spec(list[float]),
)
class ClassNames:
"""Class names for slider components."""
ROOT = "flex max-w-64 w-full touch-none items-center select-none"
VALUE = "text-sm text-primary-11 font-medium"
|
TRACK = "h-2 w-full rounded-full bg-secondary-4 select-none"
INDICATOR = "absolute h-full rounded-full bg-primary-9 select-none"
THUMB = "h-4 w-[0.575rem] rounded-[2px] bg-white outline outline-black/30 select-none box-shadow:[0_0_0_1px_rgba(0,0,0,1),0_1px_2px_rgba(0,0,0,.04)] data-[dragging]:h-5 transition-[height,scale] hover:h-4.5"
class SliderBaseComponent(BaseUIComponent):
"""Base component for slider components."""
library = f"{PACKAGE_NAME}/slider"
@property
def import_var(self):
"""Return the import variable for the slider component."""
return ImportVar(tag="Slider", package_path="", install=False)
class SliderRoot(SliderBaseComponent):
"""Groups all parts of the slider. Renders a div element."""
tag = "Slider.Root"
# Identifies the field when a form is submitted.
name: Var[str]
# The uncontrolled value of the slider when it's initially rendered. To render a controlled slider, use the value prop instead.
| CONTROL = "flex items-center justify-center w-full" |
"""Custom Slider component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
LiteralOrientation = Literal["horizontal", "vertical"]
on_value_event_spec = (
passthrough_event_spec(int),
passthrough_event_spec(float),
passthrough_event_spec(list[int | float]),
passthrough_event_spec(list[int]),
passthrough_event_spec(list[float]),
)
class ClassNames:
"""Class names for slider components."""
ROOT = "flex max-w-64 w-full touch-none items-center select-none"
VALUE = "text-sm text-primary-11 font-medium"
CONTROL = "flex items-center justify-center w-full"
|
INDICATOR = "absolute h-full rounded-full bg-primary-9 select-none"
THUMB = "h-4 w-[0.575rem] rounded-[2px] bg-white outline outline-black/30 select-none box-shadow:[0_0_0_1px_rgba(0,0,0,1),0_1px_2px_rgba(0,0,0,.04)] data-[dragging]:h-5 transition-[height,scale] hover:h-4.5"
class SliderBaseComponent(BaseUIComponent):
"""Base component for slider components."""
library = f"{PACKAGE_NAME}/slider"
@property
def import_var(self):
"""Return the import variable for the slider component."""
return ImportVar(tag="Slider", package_path="", install=False)
class SliderRoot(SliderBaseComponent):
"""Groups all parts of the slider. Renders a div element."""
tag = "Slider.Root"
# Identifies the field when a form is submitted.
name: Var[str]
# The uncontrolled value of the slider when it's initially rendered. To render a controlled slider, use the value prop instead.
default_value: Var[int | float | list[int | float]]
# Th | TRACK = "h-2 w-full rounded-full bg-secondary-4 select-none" |
"""Custom Slider component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
LiteralOrientation = Literal["horizontal", "vertical"]
on_value_event_spec = (
passthrough_event_spec(int),
passthrough_event_spec(float),
passthrough_event_spec(list[int | float]),
passthrough_event_spec(list[int]),
passthrough_event_spec(list[float]),
)
class ClassNames:
"""Class names for slider components."""
ROOT = "flex max-w-64 w-full touch-none items-center select-none"
VALUE = "text-sm text-primary-11 font-medium"
CONTROL = "flex items-center justify-center w-full"
TRACK = "h-2 w-full rounded-full bg-secondary-4 select-none"
|
THUMB = "h-4 w-[0.575rem] rounded-[2px] bg-white outline outline-black/30 select-none box-shadow:[0_0_0_1px_rgba(0,0,0,1),0_1px_2px_rgba(0,0,0,.04)] data-[dragging]:h-5 transition-[height,scale] hover:h-4.5"
class SliderBaseComponent(BaseUIComponent):
"""Base component for slider components."""
library = f"{PACKAGE_NAME}/slider"
@property
def import_var(self):
"""Return the import variable for the slider component."""
return ImportVar(tag="Slider", package_path="", install=False)
class SliderRoot(SliderBaseComponent):
"""Groups all parts of the slider. Renders a div element."""
tag = "Slider.Root"
# Identifies the field when a form is submitted.
name: Var[str]
# The uncontrolled value of the slider when it's initially rendered. To render a controlled slider, use the value prop instead.
default_value: Var[int | float | list[int | float]]
# The value of the slider. For ranged sliders, provide an array with two val | INDICATOR = "absolute h-full rounded-full bg-primary-9 select-none" |
""Custom Slider component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
LiteralOrientation = Literal["horizontal", "vertical"]
on_value_event_spec = (
passthrough_event_spec(int),
passthrough_event_spec(float),
passthrough_event_spec(list[int | float]),
passthrough_event_spec(list[int]),
passthrough_event_spec(list[float]),
)
class ClassNames:
"""Class names for slider components."""
ROOT = "flex max-w-64 w-full touch-none items-center select-none"
VALUE = "text-sm text-primary-11 font-medium"
CONTROL = "flex items-center justify-center w-full"
TRACK = "h-2 w-full rounded-full bg-secondary-4 select-none"
INDICATOR = "absolute h-full rounded-full bg-primary-9 select-none"
|
class SliderBaseComponent(BaseUIComponent):
"""Base component for slider components."""
library = f"{PACKAGE_NAME}/slider"
@property
def import_var(self):
"""Return the import variable for the slider component."""
return ImportVar(tag="Slider", package_path="", install=False)
class SliderRoot(SliderBaseComponent):
"""Groups all parts of the slider. Renders a div element."""
tag = "Slider.Root"
# Identifies the field when a form is submitted.
name: Var[str]
# The uncontrolled value of the slider when it's initially rendered. To render a controlled slider, use the value prop instead.
default_value: Var[int | float | list[int | float]]
# The value of the slider. For ranged sliders, provide an array with two values.
value: Var[int | float | list[int | float]]
# Callback function that is fired when the slider's value changed.
on_value_change: EventHandler[on_value_event_spec]
# Callback function that is | THUMB = "h-4 w-[0.575rem] rounded-[2px] bg-white outline outline-black/30 select-none box-shadow:[0_0_0_1px_rgba(0,0,0,1),0_1px_2px_rgba(0,0,0,.04)] data-[dragging]:h-5 transition-[height,scale] hover:h-4.5" |
mports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
LiteralOrientation = Literal["horizontal", "vertical"]
on_value_event_spec = (
passthrough_event_spec(int),
passthrough_event_spec(float),
passthrough_event_spec(list[int | float]),
passthrough_event_spec(list[int]),
passthrough_event_spec(list[float]),
)
class ClassNames:
"""Class names for slider components."""
ROOT = "flex max-w-64 w-full touch-none items-center select-none"
VALUE = "text-sm text-primary-11 font-medium"
CONTROL = "flex items-center justify-center w-full"
TRACK = "h-2 w-full rounded-full bg-secondary-4 select-none"
INDICATOR = "absolute h-full rounded-full bg-primary-9 select-none"
THUMB = "h-4 w-[0.575rem] rounded-[2px] bg-white outline outline-black/30 select-none box-shadow:[0_0_0_1px_rgba(0,0,0,1),0_1px_2px_rgba(0,0,0,.04)] data-[dragging]:h-5 transition-[height,scale] hover:h-4.5"
|
class SliderRoot(SliderBaseComponent):
"""Groups all parts of the slider. Renders a div element."""
tag = "Slider.Root"
# Identifies the field when a form is submitted.
name: Var[str]
# The uncontrolled value of the slider when it's initially rendered. To render a controlled slider, use the value prop instead.
default_value: Var[int | float | list[int | float]]
# The value of the slider. For ranged sliders, provide an array with two values.
value: Var[int | float | list[int | float]]
# Callback function that is fired when the slider's value changed.
on_value_change: EventHandler[on_value_event_spec]
# Callback function that is fired when the pointerup is triggered.
on_value_committed: EventHandler[on_value_event_spec]
# Locale information for formatting.
locale: Var[str]
# The granularity with which the slider can step through values. (A "discrete" slider.) The min prop serves as the origin for the valid values. We | class SliderBaseComponent(BaseUIComponent):
"""Base component for slider components."""
library = f"{PACKAGE_NAME}/slider"
@property
def import_var(self):
"""Return the import variable for the slider component."""
return ImportVar(tag="Slider", package_path="", install=False) |
t PACKAGE_NAME, BaseUIComponent
LiteralOrientation = Literal["horizontal", "vertical"]
on_value_event_spec = (
passthrough_event_spec(int),
passthrough_event_spec(float),
passthrough_event_spec(list[int | float]),
passthrough_event_spec(list[int]),
passthrough_event_spec(list[float]),
)
class ClassNames:
"""Class names for slider components."""
ROOT = "flex max-w-64 w-full touch-none items-center select-none"
VALUE = "text-sm text-primary-11 font-medium"
CONTROL = "flex items-center justify-center w-full"
TRACK = "h-2 w-full rounded-full bg-secondary-4 select-none"
INDICATOR = "absolute h-full rounded-full bg-primary-9 select-none"
THUMB = "h-4 w-[0.575rem] rounded-[2px] bg-white outline outline-black/30 select-none box-shadow:[0_0_0_1px_rgba(0,0,0,1),0_1px_2px_rgba(0,0,0,.04)] data-[dragging]:h-5 transition-[height,scale] hover:h-4.5"
class SliderBaseComponent(BaseUIComponent):
"""Base component for slider components."""
|
@property
def import_var(self):
"""Return the import variable for the slider component."""
return ImportVar(tag="Slider", package_path="", install=False)
class SliderRoot(SliderBaseComponent):
"""Groups all parts of the slider. Renders a div element."""
tag = "Slider.Root"
# Identifies the field when a form is submitted.
name: Var[str]
# The uncontrolled value of the slider when it's initially rendered. To render a controlled slider, use the value prop instead.
default_value: Var[int | float | list[int | float]]
# The value of the slider. For ranged sliders, provide an array with two values.
value: Var[int | float | list[int | float]]
# Callback function that is fired when the slider's value changed.
on_value_change: EventHandler[on_value_event_spec]
# Callback function that is fired when the pointerup is triggered.
on_value_committed: EventHandler[on_value_event_spec]
# Locale information for format | library = f"{PACKAGE_NAME}/slider" |
mes:
"""Class names for slider components."""
ROOT = "flex max-w-64 w-full touch-none items-center select-none"
VALUE = "text-sm text-primary-11 font-medium"
CONTROL = "flex items-center justify-center w-full"
TRACK = "h-2 w-full rounded-full bg-secondary-4 select-none"
INDICATOR = "absolute h-full rounded-full bg-primary-9 select-none"
THUMB = "h-4 w-[0.575rem] rounded-[2px] bg-white outline outline-black/30 select-none box-shadow:[0_0_0_1px_rgba(0,0,0,1),0_1px_2px_rgba(0,0,0,.04)] data-[dragging]:h-5 transition-[height,scale] hover:h-4.5"
class SliderBaseComponent(BaseUIComponent):
"""Base component for slider components."""
library = f"{PACKAGE_NAME}/slider"
@property
def import_var(self):
"""Return the import variable for the slider component."""
return ImportVar(tag="Slider", package_path="", install=False)
class SliderRoot(SliderBaseComponent):
"""Groups all parts of the slider. Renders a div element."""
|
# Identifies the field when a form is submitted.
name: Var[str]
# The uncontrolled value of the slider when it's initially rendered. To render a controlled slider, use the value prop instead.
default_value: Var[int | float | list[int | float]]
# The value of the slider. For ranged sliders, provide an array with two values.
value: Var[int | float | list[int | float]]
# Callback function that is fired when the slider's value changed.
on_value_change: EventHandler[on_value_event_spec]
# Callback function that is fired when the pointerup is triggered.
on_value_committed: EventHandler[on_value_event_spec]
# Locale information for formatting.
locale: Var[str]
# The granularity with which the slider can step through values. (A "discrete" slider.) The min prop serves as the origin for the valid values. We recommend (max - min) to be evenly divisible by the step. Defaults to 1.
step: Var[float | int]
# The granularity with whi | tag = "Slider.Root" |
(max - min) to be evenly divisible by the step. Defaults to 1.
step: Var[float | int]
# The granularity with which the slider can step through values when using Page Up/Page Down or Shift + Arrow Up/Arrow Down. Defaults to 10.
large_step: Var[float | int]
# The minimum steps between values in a range slider. Defaults to 0.
min_steps_between_values: Var[float | int]
# The minimum allowed value of the slider. Should not be equal to max. Defaults to 0.
min: Var[float | int]
# The maximum allowed value of the slider. Should not be equal to min. Defaults to 100.
max: Var[float | int]
# Options to format the input value.
format: Var[dict]
# Whether the slider is disabled.
disabled: Var[bool]
# The component orientation. Defaults to "horizontal".
orientation: Var[LiteralOrientation]
# A ref to access the hidden input element.
input_ref: Var[str]
# The render prop
render_: Var[Component]
@classmethod
|
class SliderValue(SliderBaseComponent):
"""Displays the current value of the slider as text. Renders an output element."""
tag = "Slider.Value"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider value component."""
props["data-slot"] = "slider-value"
cls.set_class_name(ClassNames.VALUE, props)
return super().create(*children, **props)
class SliderControl(SliderBaseComponent):
"""The clickable, interactive part of the slider. Renders a div element."""
tag = "Slider.Control"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider control component."""
props["data-slot"] = "slider-control"
cls.set_class_name(ClassNames.CONTROL, props)
return super().create(*children, **props)
class SliderTrack(SliderBaseComponen | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider root component."""
props["data-slot"] = "slider"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props) |
with which the slider can step through values when using Page Up/Page Down or Shift + Arrow Up/Arrow Down. Defaults to 10.
large_step: Var[float | int]
# The minimum steps between values in a range slider. Defaults to 0.
min_steps_between_values: Var[float | int]
# The minimum allowed value of the slider. Should not be equal to max. Defaults to 0.
min: Var[float | int]
# The maximum allowed value of the slider. Should not be equal to min. Defaults to 100.
max: Var[float | int]
# Options to format the input value.
format: Var[dict]
# Whether the slider is disabled.
disabled: Var[bool]
# The component orientation. Defaults to "horizontal".
orientation: Var[LiteralOrientation]
# A ref to access the hidden input element.
input_ref: Var[str]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider root component."""
|
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class SliderValue(SliderBaseComponent):
"""Displays the current value of the slider as text. Renders an output element."""
tag = "Slider.Value"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider value component."""
props["data-slot"] = "slider-value"
cls.set_class_name(ClassNames.VALUE, props)
return super().create(*children, **props)
class SliderControl(SliderBaseComponent):
"""The clickable, interactive part of the slider. Renders a div element."""
tag = "Slider.Control"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider control component."""
props["data-slot"] = "slider-control"
cls.set_class_name(ClassNames.CON | props["data-slot"] = "slider" |
_step: Var[float | int]
# The minimum steps between values in a range slider. Defaults to 0.
min_steps_between_values: Var[float | int]
# The minimum allowed value of the slider. Should not be equal to max. Defaults to 0.
min: Var[float | int]
# The maximum allowed value of the slider. Should not be equal to min. Defaults to 100.
max: Var[float | int]
# Options to format the input value.
format: Var[dict]
# Whether the slider is disabled.
disabled: Var[bool]
# The component orientation. Defaults to "horizontal".
orientation: Var[LiteralOrientation]
# A ref to access the hidden input element.
input_ref: Var[str]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider root component."""
props["data-slot"] = "slider"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
|
class SliderControl(SliderBaseComponent):
"""The clickable, interactive part of the slider. Renders a div element."""
tag = "Slider.Control"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider control component."""
props["data-slot"] = "slider-control"
cls.set_class_name(ClassNames.CONTROL, props)
return super().create(*children, **props)
class SliderTrack(SliderBaseComponent):
"""Contains the slider indicator and represents the entire range of the slider. Renders a div element."""
tag = "Slider.Track"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider track component."""
props["data-slot"] = "slider-track"
cls.set_class_name(ClassNames.TRACK, props)
return super().create(*children, **props)
class SliderI | class SliderValue(SliderBaseComponent):
"""Displays the current value of the slider as text. Renders an output element."""
tag = "Slider.Value"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider value component."""
props["data-slot"] = "slider-value"
cls.set_class_name(ClassNames.VALUE, props)
return super().create(*children, **props) |
float | int]
# The minimum allowed value of the slider. Should not be equal to max. Defaults to 0.
min: Var[float | int]
# The maximum allowed value of the slider. Should not be equal to min. Defaults to 100.
max: Var[float | int]
# Options to format the input value.
format: Var[dict]
# Whether the slider is disabled.
disabled: Var[bool]
# The component orientation. Defaults to "horizontal".
orientation: Var[LiteralOrientation]
# A ref to access the hidden input element.
input_ref: Var[str]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider root component."""
props["data-slot"] = "slider"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class SliderValue(SliderBaseComponent):
"""Displays the current value of the slider as text. Renders an output element."""
|
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider value component."""
props["data-slot"] = "slider-value"
cls.set_class_name(ClassNames.VALUE, props)
return super().create(*children, **props)
class SliderControl(SliderBaseComponent):
"""The clickable, interactive part of the slider. Renders a div element."""
tag = "Slider.Control"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider control component."""
props["data-slot"] = "slider-control"
cls.set_class_name(ClassNames.CONTROL, props)
return super().create(*children, **props)
class SliderTrack(SliderBaseComponent):
"""Contains the slider indicator and represents the entire range of the slider. Renders a div element."""
tag = "Slider.Track"
# The rend | tag = "Slider.Value" |
lts to 0.
min: Var[float | int]
# The maximum allowed value of the slider. Should not be equal to min. Defaults to 100.
max: Var[float | int]
# Options to format the input value.
format: Var[dict]
# Whether the slider is disabled.
disabled: Var[bool]
# The component orientation. Defaults to "horizontal".
orientation: Var[LiteralOrientation]
# A ref to access the hidden input element.
input_ref: Var[str]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider root component."""
props["data-slot"] = "slider"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class SliderValue(SliderBaseComponent):
"""Displays the current value of the slider as text. Renders an output element."""
tag = "Slider.Value"
# The render prop
render_: Var[Component]
@classmethod
|
class SliderControl(SliderBaseComponent):
"""The clickable, interactive part of the slider. Renders a div element."""
tag = "Slider.Control"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider control component."""
props["data-slot"] = "slider-control"
cls.set_class_name(ClassNames.CONTROL, props)
return super().create(*children, **props)
class SliderTrack(SliderBaseComponent):
"""Contains the slider indicator and represents the entire range of the slider. Renders a div element."""
tag = "Slider.Track"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider track component."""
props["data-slot"] = "slider-track"
cls.set_class_name(ClassNames.TRACK, props)
return super().create(*children, **props)
class SliderI | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider value component."""
props["data-slot"] = "slider-value"
cls.set_class_name(ClassNames.VALUE, props)
return super().create(*children, **props) |
efaults to 100.
max: Var[float | int]
# Options to format the input value.
format: Var[dict]
# Whether the slider is disabled.
disabled: Var[bool]
# The component orientation. Defaults to "horizontal".
orientation: Var[LiteralOrientation]
# A ref to access the hidden input element.
input_ref: Var[str]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider root component."""
props["data-slot"] = "slider"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class SliderValue(SliderBaseComponent):
"""Displays the current value of the slider as text. Renders an output element."""
tag = "Slider.Value"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider value component."""
|
cls.set_class_name(ClassNames.VALUE, props)
return super().create(*children, **props)
class SliderControl(SliderBaseComponent):
"""The clickable, interactive part of the slider. Renders a div element."""
tag = "Slider.Control"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider control component."""
props["data-slot"] = "slider-control"
cls.set_class_name(ClassNames.CONTROL, props)
return super().create(*children, **props)
class SliderTrack(SliderBaseComponent):
"""Contains the slider indicator and represents the entire range of the slider. Renders a div element."""
tag = "Slider.Track"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider track component."""
props["data-slot"] = "slider-track"
cls.set | props["data-slot"] = "slider-value" |
led.
disabled: Var[bool]
# The component orientation. Defaults to "horizontal".
orientation: Var[LiteralOrientation]
# A ref to access the hidden input element.
input_ref: Var[str]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider root component."""
props["data-slot"] = "slider"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class SliderValue(SliderBaseComponent):
"""Displays the current value of the slider as text. Renders an output element."""
tag = "Slider.Value"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider value component."""
props["data-slot"] = "slider-value"
cls.set_class_name(ClassNames.VALUE, props)
return super().create(*children, **props)
|
class SliderTrack(SliderBaseComponent):
"""Contains the slider indicator and represents the entire range of the slider. Renders a div element."""
tag = "Slider.Track"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider track component."""
props["data-slot"] = "slider-track"
cls.set_class_name(ClassNames.TRACK, props)
return super().create(*children, **props)
class SliderIndicator(SliderBaseComponent):
"""Visualizes the current value of the slider. Renders a div element."""
tag = "Slider.Indicator"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider indicator component."""
props["data-slot"] = "slider-indicator"
cls.set_class_name(ClassNames.INDICATOR, props)
return super().create(*children, **props)
class | class SliderControl(SliderBaseComponent):
"""The clickable, interactive part of the slider. Renders a div element."""
tag = "Slider.Control"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider control component."""
props["data-slot"] = "slider-control"
cls.set_class_name(ClassNames.CONTROL, props)
return super().create(*children, **props) |
n]
# A ref to access the hidden input element.
input_ref: Var[str]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider root component."""
props["data-slot"] = "slider"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class SliderValue(SliderBaseComponent):
"""Displays the current value of the slider as text. Renders an output element."""
tag = "Slider.Value"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider value component."""
props["data-slot"] = "slider-value"
cls.set_class_name(ClassNames.VALUE, props)
return super().create(*children, **props)
class SliderControl(SliderBaseComponent):
"""The clickable, interactive part of the slider. Renders a div element."""
|
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider control component."""
props["data-slot"] = "slider-control"
cls.set_class_name(ClassNames.CONTROL, props)
return super().create(*children, **props)
class SliderTrack(SliderBaseComponent):
"""Contains the slider indicator and represents the entire range of the slider. Renders a div element."""
tag = "Slider.Track"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider track component."""
props["data-slot"] = "slider-track"
cls.set_class_name(ClassNames.TRACK, props)
return super().create(*children, **props)
class SliderIndicator(SliderBaseComponent):
"""Visualizes the current value of the slider. Renders a div element."""
tag = "Slider.Indicator"
# The ren | tag = "Slider.Control" |
op
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider root component."""
props["data-slot"] = "slider"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class SliderValue(SliderBaseComponent):
"""Displays the current value of the slider as text. Renders an output element."""
tag = "Slider.Value"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider value component."""
props["data-slot"] = "slider-value"
cls.set_class_name(ClassNames.VALUE, props)
return super().create(*children, **props)
class SliderControl(SliderBaseComponent):
"""The clickable, interactive part of the slider. Renders a div element."""
tag = "Slider.Control"
# The render prop
render_: Var[Component]
@classmethod
|
class SliderTrack(SliderBaseComponent):
"""Contains the slider indicator and represents the entire range of the slider. Renders a div element."""
tag = "Slider.Track"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider track component."""
props["data-slot"] = "slider-track"
cls.set_class_name(ClassNames.TRACK, props)
return super().create(*children, **props)
class SliderIndicator(SliderBaseComponent):
"""Visualizes the current value of the slider. Renders a div element."""
tag = "Slider.Indicator"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider indicator component."""
props["data-slot"] = "slider-indicator"
cls.set_class_name(ClassNames.INDICATOR, props)
return super().create(*children, **props)
class | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider control component."""
props["data-slot"] = "slider-control"
cls.set_class_name(ClassNames.CONTROL, props)
return super().create(*children, **props) |
"""Create the slider root component."""
props["data-slot"] = "slider"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class SliderValue(SliderBaseComponent):
"""Displays the current value of the slider as text. Renders an output element."""
tag = "Slider.Value"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider value component."""
props["data-slot"] = "slider-value"
cls.set_class_name(ClassNames.VALUE, props)
return super().create(*children, **props)
class SliderControl(SliderBaseComponent):
"""The clickable, interactive part of the slider. Renders a div element."""
tag = "Slider.Control"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider control component."""
|
cls.set_class_name(ClassNames.CONTROL, props)
return super().create(*children, **props)
class SliderTrack(SliderBaseComponent):
"""Contains the slider indicator and represents the entire range of the slider. Renders a div element."""
tag = "Slider.Track"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider track component."""
props["data-slot"] = "slider-track"
cls.set_class_name(ClassNames.TRACK, props)
return super().create(*children, **props)
class SliderIndicator(SliderBaseComponent):
"""Visualizes the current value of the slider. Renders a div element."""
tag = "Slider.Indicator"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider indicator component."""
props["data-slot"] = "slider-indicator"
cl | props["data-slot"] = "slider-control" |
n super().create(*children, **props)
class SliderValue(SliderBaseComponent):
"""Displays the current value of the slider as text. Renders an output element."""
tag = "Slider.Value"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider value component."""
props["data-slot"] = "slider-value"
cls.set_class_name(ClassNames.VALUE, props)
return super().create(*children, **props)
class SliderControl(SliderBaseComponent):
"""The clickable, interactive part of the slider. Renders a div element."""
tag = "Slider.Control"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider control component."""
props["data-slot"] = "slider-control"
cls.set_class_name(ClassNames.CONTROL, props)
return super().create(*children, **props)
|
class SliderIndicator(SliderBaseComponent):
"""Visualizes the current value of the slider. Renders a div element."""
tag = "Slider.Indicator"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider indicator component."""
props["data-slot"] = "slider-indicator"
cls.set_class_name(ClassNames.INDICATOR, props)
return super().create(*children, **props)
class SliderThumb(SliderBaseComponent):
"""The draggable part of the slider at the tip of the indicator. Renders a div element."""
tag = "Slider.Thumb"
# Accepts a function which returns a string value that provides a user-friendly name for the input associated with the thumb.
get_aria_label: Var[str]
# Accepts a function which returns a string value that provides a user-friendly name for the current value of the slider. This is important for screen reader users.
get_aria_valu | class SliderTrack(SliderBaseComponent):
"""Contains the slider indicator and represents the entire range of the slider. Renders a div element."""
tag = "Slider.Track"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider track component."""
props["data-slot"] = "slider-track"
cls.set_class_name(ClassNames.TRACK, props)
return super().create(*children, **props) |
lement."""
tag = "Slider.Value"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider value component."""
props["data-slot"] = "slider-value"
cls.set_class_name(ClassNames.VALUE, props)
return super().create(*children, **props)
class SliderControl(SliderBaseComponent):
"""The clickable, interactive part of the slider. Renders a div element."""
tag = "Slider.Control"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider control component."""
props["data-slot"] = "slider-control"
cls.set_class_name(ClassNames.CONTROL, props)
return super().create(*children, **props)
class SliderTrack(SliderBaseComponent):
"""Contains the slider indicator and represents the entire range of the slider. Renders a div element."""
|
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider track component."""
props["data-slot"] = "slider-track"
cls.set_class_name(ClassNames.TRACK, props)
return super().create(*children, **props)
class SliderIndicator(SliderBaseComponent):
"""Visualizes the current value of the slider. Renders a div element."""
tag = "Slider.Indicator"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider indicator component."""
props["data-slot"] = "slider-indicator"
cls.set_class_name(ClassNames.INDICATOR, props)
return super().create(*children, **props)
class SliderThumb(SliderBaseComponent):
"""The draggable part of the slider at the tip of the indicator. Renders a div element."""
tag = "Slider.Thumb"
# Accepts a functi | tag = "Slider.Track" |
classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider value component."""
props["data-slot"] = "slider-value"
cls.set_class_name(ClassNames.VALUE, props)
return super().create(*children, **props)
class SliderControl(SliderBaseComponent):
"""The clickable, interactive part of the slider. Renders a div element."""
tag = "Slider.Control"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider control component."""
props["data-slot"] = "slider-control"
cls.set_class_name(ClassNames.CONTROL, props)
return super().create(*children, **props)
class SliderTrack(SliderBaseComponent):
"""Contains the slider indicator and represents the entire range of the slider. Renders a div element."""
tag = "Slider.Track"
# The render prop
render_: Var[Component]
@classmethod
|
class SliderIndicator(SliderBaseComponent):
"""Visualizes the current value of the slider. Renders a div element."""
tag = "Slider.Indicator"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider indicator component."""
props["data-slot"] = "slider-indicator"
cls.set_class_name(ClassNames.INDICATOR, props)
return super().create(*children, **props)
class SliderThumb(SliderBaseComponent):
"""The draggable part of the slider at the tip of the indicator. Renders a div element."""
tag = "Slider.Thumb"
# Accepts a function which returns a string value that provides a user-friendly name for the input associated with the thumb.
get_aria_label: Var[str]
# Accepts a function which returns a string value that provides a user-friendly name for the current value of the slider. This is important for screen reader users.
get_aria_valu | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider track component."""
props["data-slot"] = "slider-track"
cls.set_class_name(ClassNames.TRACK, props)
return super().create(*children, **props) |
ent."""
props["data-slot"] = "slider-value"
cls.set_class_name(ClassNames.VALUE, props)
return super().create(*children, **props)
class SliderControl(SliderBaseComponent):
"""The clickable, interactive part of the slider. Renders a div element."""
tag = "Slider.Control"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider control component."""
props["data-slot"] = "slider-control"
cls.set_class_name(ClassNames.CONTROL, props)
return super().create(*children, **props)
class SliderTrack(SliderBaseComponent):
"""Contains the slider indicator and represents the entire range of the slider. Renders a div element."""
tag = "Slider.Track"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider track component."""
|
cls.set_class_name(ClassNames.TRACK, props)
return super().create(*children, **props)
class SliderIndicator(SliderBaseComponent):
"""Visualizes the current value of the slider. Renders a div element."""
tag = "Slider.Indicator"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider indicator component."""
props["data-slot"] = "slider-indicator"
cls.set_class_name(ClassNames.INDICATOR, props)
return super().create(*children, **props)
class SliderThumb(SliderBaseComponent):
"""The draggable part of the slider at the tip of the indicator. Renders a div element."""
tag = "Slider.Thumb"
# Accepts a function which returns a string value that provides a user-friendly name for the input associated with the thumb.
get_aria_label: Var[str]
# Accepts a function which returns a string value that provides a user-friendly | props["data-slot"] = "slider-track" |
ren, **props)
class SliderControl(SliderBaseComponent):
"""The clickable, interactive part of the slider. Renders a div element."""
tag = "Slider.Control"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider control component."""
props["data-slot"] = "slider-control"
cls.set_class_name(ClassNames.CONTROL, props)
return super().create(*children, **props)
class SliderTrack(SliderBaseComponent):
"""Contains the slider indicator and represents the entire range of the slider. Renders a div element."""
tag = "Slider.Track"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider track component."""
props["data-slot"] = "slider-track"
cls.set_class_name(ClassNames.TRACK, props)
return super().create(*children, **props)
|
class SliderThumb(SliderBaseComponent):
"""The draggable part of the slider at the tip of the indicator. Renders a div element."""
tag = "Slider.Thumb"
# Accepts a function which returns a string value that provides a user-friendly name for the input associated with the thumb.
get_aria_label: Var[str]
# Accepts a function which returns a string value that provides a user-friendly name for the current value of the slider. This is important for screen reader users.
get_aria_value_text: Var[str]
# Whether the thumb should ignore user interaction.
disabled: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider thumb component."""
props["data-slot"] = "slider-thumb"
cls.set_class_name(ClassNames.THUMB, props)
return super().create(*children, **props)
class HighLevelSlider(SliderRoot):
"""High-level wrapper for | class SliderIndicator(SliderBaseComponent):
"""Visualizes the current value of the slider. Renders a div element."""
tag = "Slider.Indicator"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider indicator component."""
props["data-slot"] = "slider-indicator"
cls.set_class_name(ClassNames.INDICATOR, props)
return super().create(*children, **props) |
element."""
tag = "Slider.Control"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider control component."""
props["data-slot"] = "slider-control"
cls.set_class_name(ClassNames.CONTROL, props)
return super().create(*children, **props)
class SliderTrack(SliderBaseComponent):
"""Contains the slider indicator and represents the entire range of the slider. Renders a div element."""
tag = "Slider.Track"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider track component."""
props["data-slot"] = "slider-track"
cls.set_class_name(ClassNames.TRACK, props)
return super().create(*children, **props)
class SliderIndicator(SliderBaseComponent):
"""Visualizes the current value of the slider. Renders a div element."""
|
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider indicator component."""
props["data-slot"] = "slider-indicator"
cls.set_class_name(ClassNames.INDICATOR, props)
return super().create(*children, **props)
class SliderThumb(SliderBaseComponent):
"""The draggable part of the slider at the tip of the indicator. Renders a div element."""
tag = "Slider.Thumb"
# Accepts a function which returns a string value that provides a user-friendly name for the input associated with the thumb.
get_aria_label: Var[str]
# Accepts a function which returns a string value that provides a user-friendly name for the current value of the slider. This is important for screen reader users.
get_aria_value_text: Var[str]
# Whether the thumb should ignore user interaction.
disabled: Var[bool]
# The render prop
render_: Var[Component]
| tag = "Slider.Indicator" |
lassmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider control component."""
props["data-slot"] = "slider-control"
cls.set_class_name(ClassNames.CONTROL, props)
return super().create(*children, **props)
class SliderTrack(SliderBaseComponent):
"""Contains the slider indicator and represents the entire range of the slider. Renders a div element."""
tag = "Slider.Track"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider track component."""
props["data-slot"] = "slider-track"
cls.set_class_name(ClassNames.TRACK, props)
return super().create(*children, **props)
class SliderIndicator(SliderBaseComponent):
"""Visualizes the current value of the slider. Renders a div element."""
tag = "Slider.Indicator"
# The render prop
render_: Var[Component]
@classmethod
|
class SliderThumb(SliderBaseComponent):
"""The draggable part of the slider at the tip of the indicator. Renders a div element."""
tag = "Slider.Thumb"
# Accepts a function which returns a string value that provides a user-friendly name for the input associated with the thumb.
get_aria_label: Var[str]
# Accepts a function which returns a string value that provides a user-friendly name for the current value of the slider. This is important for screen reader users.
get_aria_value_text: Var[str]
# Whether the thumb should ignore user interaction.
disabled: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider thumb component."""
props["data-slot"] = "slider-thumb"
cls.set_class_name(ClassNames.THUMB, props)
return super().create(*children, **props)
class HighLevelSlider(SliderRoot):
"""High-level wrapper for | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider indicator component."""
props["data-slot"] = "slider-indicator"
cls.set_class_name(ClassNames.INDICATOR, props)
return super().create(*children, **props) |
a div element."""
tag = "Slider.Track"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider track component."""
props["data-slot"] = "slider-track"
cls.set_class_name(ClassNames.TRACK, props)
return super().create(*children, **props)
class SliderIndicator(SliderBaseComponent):
"""Visualizes the current value of the slider. Renders a div element."""
tag = "Slider.Indicator"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider indicator component."""
props["data-slot"] = "slider-indicator"
cls.set_class_name(ClassNames.INDICATOR, props)
return super().create(*children, **props)
class SliderThumb(SliderBaseComponent):
"""The draggable part of the slider at the tip of the indicator. Renders a div element."""
|
# Accepts a function which returns a string value that provides a user-friendly name for the input associated with the thumb.
get_aria_label: Var[str]
# Accepts a function which returns a string value that provides a user-friendly name for the current value of the slider. This is important for screen reader users.
get_aria_value_text: Var[str]
# Whether the thumb should ignore user interaction.
disabled: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider thumb component."""
props["data-slot"] = "slider-thumb"
cls.set_class_name(ClassNames.THUMB, props)
return super().create(*children, **props)
class HighLevelSlider(SliderRoot):
"""High-level wrapper for the Slider component."""
@classmethod
def create(cls, **props) -> BaseUIComponent:
"""Create a complete slider component.
Args:
| tag = "Slider.Thumb" |
prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider indicator component."""
props["data-slot"] = "slider-indicator"
cls.set_class_name(ClassNames.INDICATOR, props)
return super().create(*children, **props)
class SliderThumb(SliderBaseComponent):
"""The draggable part of the slider at the tip of the indicator. Renders a div element."""
tag = "Slider.Thumb"
# Accepts a function which returns a string value that provides a user-friendly name for the input associated with the thumb.
get_aria_label: Var[str]
# Accepts a function which returns a string value that provides a user-friendly name for the current value of the slider. This is important for screen reader users.
get_aria_value_text: Var[str]
# Whether the thumb should ignore user interaction.
disabled: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
|
class HighLevelSlider(SliderRoot):
"""High-level wrapper for the Slider component."""
@classmethod
def create(cls, **props) -> BaseUIComponent:
"""Create a complete slider component.
Args:
**props: Additional properties to apply to the slider component.
Returns:
The slider component.
"""
return SliderRoot.create(
SliderControl.create(
SliderTrack.create(
SliderIndicator.create(),
SliderThumb.create(),
),
),
**props,
)
class Slider(ComponentNamespace):
"""Namespace for Slider components."""
root = staticmethod(SliderRoot.create)
value = staticmethod(SliderValue.create)
control = staticmethod(SliderControl.create)
track = staticmethod(SliderTrack.create)
indicator = staticmethod(SliderIndicator.create)
thumb = staticmethod(SliderThumb.create)
class_names = Cl | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the slider thumb component."""
props["data-slot"] = "slider-thumb"
cls.set_class_name(ClassNames.THUMB, props)
return super().create(*children, **props) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.