instruction stringlengths 0 1k | input stringlengths 1 1k | output stringlengths 10 6.51k |
|---|---|---|
"""Custom toggle group component."""
from typing import Literal
from reflex.components.component import Component
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, BaseUIComp... |
class ToggleGroupBaseComponent(BaseUIComponent):
"""Base component for toggle group components."""
library = f"{PACKAGE_NAME}/toggle-group"
@property
def import_var(self):
"""Return the import variable for the toggle group component."""
return ImportVar(tag="ToggleGroup", package_pa... | class ClassNames:
"""Class names for toggle group components."""
ROOT = "inline-flex items-center gap-1 p-1 rounded-ui-md bg-secondary-3 data-[orientation=vertical]:flex-col data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed" |
"""Custom toggle group component."""
from typing import Literal
from reflex.components.component import Component
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, BaseUIComp... |
class ToggleGroupBaseComponent(BaseUIComponent):
"""Base component for toggle group components."""
library = f"{PACKAGE_NAME}/toggle-group"
@property
def import_var(self):
"""Return the import variable for the toggle group component."""
return ImportVar(tag="ToggleGroup", package_pa... | ROOT = "inline-flex items-center gap-1 p-1 rounded-ui-md bg-secondary-3 data-[orientation=vertical]:flex-col data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed" |
"""Custom toggle group component."""
from typing import Literal
from reflex.components.component import Component
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, BaseUIComp... |
@property
def import_var(self):
"""Return the import variable for the toggle group component."""
return ImportVar(tag="ToggleGroup", package_path="", install=False)
class ToggleGroupRoot(ToggleGroupBaseComponent):
"""Provides a shared state to a series of toggle buttons."""
tag = "T... | library = f"{PACKAGE_NAME}/toggle-group" |
"""Custom toggle group component."""
from typing import Literal
from reflex.components.component import Component
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, BaseUIComp... |
class ToggleGroupRoot(ToggleGroupBaseComponent):
"""Provides a shared state to a series of toggle buttons."""
tag = "ToggleGroup"
# The open state of the toggle group represented by an array of the values of all pressed toggle buttons. This is the uncontrolled counterpart of value.
default_value: V... | def import_var(self):
"""Return the import variable for the toggle group component."""
return ImportVar(tag="ToggleGroup", package_path="", install=False) |
ponent import Component
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:
"""Cla... |
# The open state of the toggle group represented by an array of the values of all pressed toggle buttons. This is the uncontrolled counterpart of value.
default_value: Var[list[str | int]]
# The open state of the toggle group represented by an array of the values of all pressed toggle buttons. This is th... | tag = "ToggleGroup" |
ented by an array of the values of all pressed toggle buttons. This is the controlled counterpart of default_value.
value: Var[list[str | int]]
# Callback fired when the pressed states of the toggle group changes.
on_value_change: EventHandler[passthrough_event_spec(list[str | int], dict)]
# When fals... |
toggle_group = ToggleGroupRoot.create
| def create(cls, *children, **props) -> BaseUIComponent:
"""Create the toggle group root component."""
props["data-slot"] = "toggle-group"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props) |
value: Var[list[str | int]]
# Callback fired when the pressed states of the toggle group changes.
on_value_change: EventHandler[passthrough_event_spec(list[str | int], dict)]
# When false only one item in the group can be pressed. If any item in the group becomes pressed, the others will become unpresse... |
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
toggle_group = ToggleGroupRoot.create
| props["data-slot"] = "toggle-group" |
passthrough_event_spec(list[str | int], dict)]
# When false only one item in the group can be pressed. If any item in the group becomes pressed, the others will become unpressed. When true multiple items can be pressed. Defaults to False.
toggle_multiple: Var[bool]
# Whether the toggle group should ignore... | toggle_group = ToggleGroupRoot.create | |
"""Tooltip component from base-ui components."""
|
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
from reflex_ui.components.icons.others... | from typing import Literal |
"""Tooltip component from base-ui components."""
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
from reflex_ui.components.icons.others import arrow_svg
LiteralSide = Literal["top", "right", "bottom", "lef... | from reflex.components.component import Component, ComponentNamespace |
"""Tooltip component from base-ui components."""
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
from reflex_ui.components.icons.others import arrow_svg
LiteralSide = Literal["top", "right", "bottom", "left", "inline-end", "inline-start"]
LiteralAlign = Literal["start", "center", "end"]
LiteralPositionMethod ... | from reflex.utils.imports import ImportVar |
"""Tooltip component from base-ui components."""
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
from reflex_ui.components.icons.others import arrow_svg
LiteralSide = Literal["top", "right", "bottom", "left", "inline-end", "inline-start"]
LiteralAlign = Literal["start", "center", "end"]
LiteralPositionMethod = Literal["absolute", "fixed"]
Li... | from reflex.vars.base import Var |
"""Tooltip component from base-ui components."""
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.icons.others import arrow_svg
LiteralSide = Literal["top", "right", "bottom", "left", "inline-end", "inline-start"]
LiteralAlign = Literal["start", "center", "end"]
LiteralPositionMethod = Literal["absolute", "fixed"]
LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"]
# Constants... | from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent |
"""Tooltip component from base-ui components."""
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... |
LiteralSide = Literal["top", "right", "bottom", "left", "inline-end", "inline-start"]
LiteralAlign = Literal["start", "center", "end"]
LiteralPositionMethod = Literal["absolute", "fixed"]
LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"]
# Constants for default class names
class ClassNames:
"""Class ... | from reflex_ui.components.icons.others import arrow_svg |
"""Tooltip component from base-ui components."""
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... |
LiteralAlign = Literal["start", "center", "end"]
LiteralPositionMethod = Literal["absolute", "fixed"]
LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"]
# Constants for default class names
class ClassNames:
"""Class names for tooltip components."""
TRIGGER = "inline-flex items-center justify-cente... | LiteralSide = Literal["top", "right", "bottom", "left", "inline-end", "inline-start"] |
"""Tooltip component from base-ui components."""
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... |
LiteralPositionMethod = Literal["absolute", "fixed"]
LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"]
# Constants for default class names
class ClassNames:
"""Class names for tooltip components."""
TRIGGER = "inline-flex items-center justify-center"
POPUP = "rounded-ui-sm bg-secondary-12 px-... | LiteralAlign = Literal["start", "center", "end"] |
"""Tooltip component from base-ui components."""
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... |
LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"]
# Constants for default class names
class ClassNames:
"""Class names for tooltip components."""
TRIGGER = "inline-flex items-center justify-center"
POPUP = "rounded-ui-sm bg-secondary-12 px-2.5 py-1.5 text-balance text-sm font-medium text-seco... | LiteralPositionMethod = Literal["absolute", "fixed"] |
"""Tooltip component from base-ui components."""
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... |
# Constants for default class names
class ClassNames:
"""Class names for tooltip components."""
TRIGGER = "inline-flex items-center justify-center"
POPUP = "rounded-ui-sm bg-secondary-12 px-2.5 py-1.5 text-balance text-sm font-medium text-secondary-1 shadow-small transition-all duration-150 data-[ending... | LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"] |
"""Tooltip component from base-ui components."""
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... |
class TooltipBaseComponent(BaseUIComponent):
"""Base component for tooltip components."""
library = f"{PACKAGE_NAME}/tooltip"
@property
def import_var(self):
"""Return the import variable for the tooltip component."""
return ImportVar(tag="Tooltip", package_path="", install=False)
... | class ClassNames:
"""Class names for tooltip components."""
TRIGGER = "inline-flex items-center justify-center"
POPUP = "rounded-ui-sm bg-secondary-12 px-2.5 py-1.5 text-balance text-sm font-medium text-secondary-1 shadow-small transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:op... |
"""Tooltip component from base-ui components."""
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... |
POPUP = "rounded-ui-sm bg-secondary-12 px-2.5 py-1.5 text-balance text-sm font-medium text-secondary-1 shadow-small transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
ARROW = "data-[side=bottom]:top-[-7.5px] dat... | TRIGGER = "inline-flex items-center justify-center" |
"""Tooltip component from base-ui components."""
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... |
ARROW = "data-[side=bottom]:top-[-7.5px] data-[side=left]:right-[-12.5px] data-[side=left]:rotate-90 data-[side=right]:left-[-12.5px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-7.5px] data-[side=top]:rotate-180"
class TooltipBaseComponent(BaseUIComponent):
"""Base component for tooltip components.... | POPUP = "rounded-ui-sm bg-secondary-12 px-2.5 py-1.5 text-balance text-sm font-medium text-secondary-1 shadow-small transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0" |
ts.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
from reflex_ui.components.icons.others import arrow_svg
Lit... |
class TooltipBaseComponent(BaseUIComponent):
"""Base component for tooltip components."""
library = f"{PACKAGE_NAME}/tooltip"
@property
def import_var(self):
"""Return the import variable for the tooltip component."""
return ImportVar(tag="Tooltip", package_path="", install=False)
... | ARROW = "data-[side=bottom]:top-[-7.5px] data-[side=left]:right-[-12.5px] data-[side=left]:rotate-90 data-[side=right]:left-[-12.5px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-7.5px] data-[side=top]:rotate-180" |
port PACKAGE_NAME, BaseUIComponent
from reflex_ui.components.icons.others import arrow_svg
LiteralSide = Literal["top", "right", "bottom", "left", "inline-end", "inline-start"]
LiteralAlign = Literal["start", "center", "end"]
LiteralPositionMethod = Literal["absolute", "fixed"]
LiteralTrackCursorAxis = Literal["none",... |
class TooltipRoot(TooltipBaseComponent):
"""Root component for a tooltip."""
tag = "Tooltip.Root"
# Whether the tooltip is currently open.
open: Var[bool]
# Whether the tooltip is initially open. To render a controlled tooltip, use the open prop instead. Defaults to False.
default_open: Va... | class TooltipBaseComponent(BaseUIComponent):
"""Base component for tooltip components."""
library = f"{PACKAGE_NAME}/tooltip"
@property
def import_var(self):
"""Return the import variable for the tooltip component."""
return ImportVar(tag="Tooltip", package_path="", install=False) |
Side = Literal["top", "right", "bottom", "left", "inline-end", "inline-start"]
LiteralAlign = Literal["start", "center", "end"]
LiteralPositionMethod = Literal["absolute", "fixed"]
LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"]
# Constants for default class names
class ClassNames:
"""Class names for... |
@property
def import_var(self):
"""Return the import variable for the tooltip component."""
return ImportVar(tag="Tooltip", package_path="", install=False)
class TooltipRoot(TooltipBaseComponent):
"""Root component for a tooltip."""
tag = "Tooltip.Root"
# Whether the tooltip is... | library = f"{PACKAGE_NAME}/tooltip" |
e-end", "inline-start"]
LiteralAlign = Literal["start", "center", "end"]
LiteralPositionMethod = Literal["absolute", "fixed"]
LiteralTrackCursorAxis = Literal["none", "bottom", "x", "y"]
# Constants for default class names
class ClassNames:
"""Class names for tooltip components."""
TRIGGER = "inline-flex ite... |
class TooltipRoot(TooltipBaseComponent):
"""Root component for a tooltip."""
tag = "Tooltip.Root"
# Whether the tooltip is currently open.
open: Var[bool]
# Whether the tooltip is initially open. To render a controlled tooltip, use the open prop instead. Defaults to False.
default_open: Va... | def import_var(self):
"""Return the import variable for the tooltip component."""
return ImportVar(tag="Tooltip", package_path="", install=False) |
Class names for tooltip components."""
TRIGGER = "inline-flex items-center justify-center"
POPUP = "rounded-ui-sm bg-secondary-12 px-2.5 py-1.5 text-balance text-sm font-medium text-secondary-1 shadow-small transition-all duration-150 data-[ending-style]:scale-90 data-[ending-style]:opacity-0 data-[starting-st... |
# Whether the tooltip is currently open.
open: Var[bool]
# Whether the tooltip is initially open. To render a controlled tooltip, use the open prop instead. Defaults to False.
default_open: Var[bool]
# Event handler called when the tooltip is opened or closed.
on_open_change: EventHandler[pa... | tag = "Tooltip.Root" |
ontrolled tooltip, use the open prop instead. Defaults to False.
default_open: Var[bool]
# Event handler called when the tooltip is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Event handler called after any animations complete when the tooltip is opened or clos... |
class TooltipProvider(TooltipBaseComponent):
"""Provider component for tooltips."""
tag = "Tooltip.Provider"
# How long to wait before opening a tooltip. Specified in milliseconds.
delay: Var[int]
# How long to wait before closing a tooltip. Specified in milliseconds.
close_delay: Var[int]... | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip root component."""
props["data-slot"] = "tooltip"
return super().create(*children, **props) |
called when the tooltip is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool, dict)]
# Event handler called after any animations complete when the tooltip is opened or closed.
on_open_change_complete: EventHandler[passthrough_event_spec(bool)]
# Determines which axis the tool... |
return super().create(*children, **props)
class TooltipProvider(TooltipBaseComponent):
"""Provider component for tooltips."""
tag = "Tooltip.Provider"
# How long to wait before opening a tooltip. Specified in milliseconds.
delay: Var[int]
# How long to wait before closing a tooltip. Sp... | props["data-slot"] = "tooltip" |
through_event_spec(bool, dict)]
# Event handler called after any animations complete when the tooltip is opened or closed.
on_open_change_complete: EventHandler[passthrough_event_spec(bool)]
# Determines which axis the tooltip should track the cursor on. Defaults to "None".
track_cursor_axis: Var[Lite... |
class TooltipTrigger(TooltipBaseComponent):
"""Trigger element for the tooltip."""
tag = "Tooltip.Trigger"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip trigger component."""
props["data-... | class TooltipProvider(TooltipBaseComponent):
"""Provider component for tooltips."""
tag = "Tooltip.Provider"
# How long to wait before opening a tooltip. Specified in milliseconds.
delay: Var[int]
# How long to wait before closing a tooltip. Specified in milliseconds.
close_delay: Var[int]
... |
n the tooltip is opened or closed.
on_open_change_complete: EventHandler[passthrough_event_spec(bool)]
# Determines which axis the tooltip should track the cursor on. Defaults to "None".
track_cursor_axis: Var[LiteralTrackCursorAxis]
# Whether the tooltip is disabled. Defaults to False.
disabled: ... |
# How long to wait before opening a tooltip. Specified in milliseconds.
delay: Var[int]
# How long to wait before closing a tooltip. Specified in milliseconds.
close_delay: Var[int]
# Another tooltip will open instantly if the previous tooltip is closed within this timeout. Specified in millisec... | tag = "Tooltip.Provider" |
faults to 600.
delay: Var[int]
# How long to wait before closing the tooltip. Specified in milliseconds. Defaults to 0.
close_delay: Var[int]
# Whether the tooltip contents can be hovered without closing the tooltip. Defaults to True.
hoverable: Var[bool]
@classmethod
def create(cls, *chi... |
class TooltipTrigger(TooltipBaseComponent):
"""Trigger element for the tooltip."""
tag = "Tooltip.Trigger"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip trigger component."""
props["data-... | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip provider component."""
props["data-slot"] = "tooltip-provider"
return super().create(*children, **props) |
aults to 0.
close_delay: Var[int]
# Whether the tooltip contents can be hovered without closing the tooltip. Defaults to True.
hoverable: Var[bool]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip root component."""
props["data-slot"] = "to... |
return super().create(*children, **props)
class TooltipTrigger(TooltipBaseComponent):
"""Trigger element for the tooltip."""
tag = "Tooltip.Trigger"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the ... | props["data-slot"] = "tooltip-provider" |
hout closing the tooltip. Defaults to True.
hoverable: Var[bool]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip root component."""
props["data-slot"] = "tooltip"
return super().create(*children, **props)
class TooltipProvider(TooltipBase... |
class TooltipPortal(TooltipBaseComponent):
"""Portal that moves the tooltip to a different part of the DOM."""
tag = "Tooltip.Portal"
# A parent element to render the portal element into.
container: Var[str]
# Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to... | class TooltipTrigger(TooltipBaseComponent):
"""Trigger element for the tooltip."""
tag = "Tooltip.Trigger"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip trigger component."""
props["data-slo... |
ef create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip root component."""
props["data-slot"] = "tooltip"
return super().create(*children, **props)
class TooltipProvider(TooltipBaseComponent):
"""Provider component for tooltips."""
tag = "Tooltip.Provider"
# ... |
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip trigger component."""
props["data-slot"] = "tooltip-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*childr... | tag = "Tooltip.Trigger" |
nt."""
props["data-slot"] = "tooltip"
return super().create(*children, **props)
class TooltipProvider(TooltipBaseComponent):
"""Provider component for tooltips."""
tag = "Tooltip.Provider"
# How long to wait before opening a tooltip. Specified in milliseconds.
delay: Var[int]
# ... |
class TooltipPortal(TooltipBaseComponent):
"""Portal that moves the tooltip to a different part of the DOM."""
tag = "Tooltip.Portal"
# A parent element to render the portal element into.
container: Var[str]
# Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to... | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip trigger component."""
props["data-slot"] = "tooltip-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props) |
der(TooltipBaseComponent):
"""Provider component for tooltips."""
tag = "Tooltip.Provider"
# How long to wait before opening a tooltip. Specified in milliseconds.
delay: Var[int]
# How long to wait before closing a tooltip. Specified in milliseconds.
close_delay: Var[int]
# Another toolt... |
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class TooltipPortal(TooltipBaseComponent):
"""Portal that moves the tooltip to a different part of the DOM."""
tag = "Tooltip.Portal"
# A parent element to render the portal element into.
contain... | props["data-slot"] = "tooltip-trigger" |
tip. Specified in milliseconds.
delay: Var[int]
# How long to wait before closing a tooltip. Specified in milliseconds.
close_delay: Var[int]
# Another tooltip will open instantly if the previous tooltip is closed within this timeout. Specified in milliseconds. Defaults to 400.
timeout: Var[int]
... |
class TooltipPositioner(TooltipBaseComponent):
"""Positions the tooltip relative to the trigger."""
tag = "Tooltip.Positioner"
# How to align the popup relative to the specified side. Defaults to "center".
align: Var[LiteralAlign]
# Additional offset along the alignment axis in pixels. Default... | class TooltipPortal(TooltipBaseComponent):
"""Portal that moves the tooltip to a different part of the DOM."""
tag = "Tooltip.Portal"
# A parent element to render the portal element into.
container: Var[str]
# Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to Fa... |
seconds.
close_delay: Var[int]
# Another tooltip will open instantly if the previous tooltip is closed within this timeout. Specified in milliseconds. Defaults to 400.
timeout: Var[int]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip provider comp... |
# A parent element to render the portal element into.
container: Var[str]
# Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False.
keep_mounted: Var[bool]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip p... | tag = "Tooltip.Portal" |
) -> BaseUIComponent:
"""Create the tooltip provider component."""
props["data-slot"] = "tooltip-provider"
return super().create(*children, **props)
class TooltipTrigger(TooltipBaseComponent):
"""Trigger element for the tooltip."""
tag = "Tooltip.Trigger"
# The render prop
re... |
class TooltipPositioner(TooltipBaseComponent):
"""Positions the tooltip relative to the trigger."""
tag = "Tooltip.Positioner"
# How to align the popup relative to the specified side. Defaults to "center".
align: Var[LiteralAlign]
# Additional offset along the alignment axis in pixels. Default... | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip portal component."""
props["data-slot"] = "tooltip-portal"
return super().create(*children, **props) |
ovider"
return super().create(*children, **props)
class TooltipTrigger(TooltipBaseComponent):
"""Trigger element for the tooltip."""
tag = "Tooltip.Trigger"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Crea... |
return super().create(*children, **props)
class TooltipPositioner(TooltipBaseComponent):
"""Positions the tooltip relative to the trigger."""
tag = "Tooltip.Positioner"
# How to align the popup relative to the specified side. Defaults to "center".
align: Var[LiteralAlign]
# Additional ... | props["data-slot"] = "tooltip-portal" |
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip trigger component."""
props["data-slot"] = "tooltip-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class Too... |
# How to align the popup relative to the specified side. Defaults to "center".
align: Var[LiteralAlign]
# Additional offset along the alignment axis in pixels. Defaults to 0.
align_offset: Var[int]
# Which side of the anchor element to align the popup against. May automatically change to avoid c... | tag = "Tooltip.Positioner" |
Var[int]
# An element to position the popup against. By default, the popup will be positioned against the trigger.
anchor: Var[str]
# An element or a rectangle that delimits the area that the popup is confined to. Defaults to "clipping-ancestors".
collision_boundary: Var[str]
# Additional space t... |
class TooltipPopup(TooltipBaseComponent):
"""Container for the tooltip content."""
tag = "Tooltip.Popup"
# Render prop for the popup
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip popup component."""
props[... | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip positioner component."""
props["data-slot"] = "tooltip-positioner"
return super().create(*children, **props) |
anchor: Var[str]
# An element or a rectangle that delimits the area that the popup is confined to. Defaults to "clipping-ancestors".
collision_boundary: Var[str]
# Additional space to maintain from the edge of the collision boundary. Defaults to 5.
collision_padding: Var[int]
# Whether to ma... |
return super().create(*children, **props)
class TooltipPopup(TooltipBaseComponent):
"""Container for the tooltip content."""
tag = "Tooltip.Popup"
# Render prop for the popup
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Cre... | props["data-slot"] = "tooltip-positioner" |
s confined to. Defaults to "clipping-ancestors".
collision_boundary: Var[str]
# Additional space to maintain from the edge of the collision boundary. Defaults to 5.
collision_padding: Var[int]
# Whether to maintain the popup in the viewport after the anchor element was scrolled out of view. Defaults t... |
class TooltipArrow(TooltipBaseComponent):
"""Arrow element for the tooltip."""
tag = "Tooltip.Arrow"
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip arrow component."""
props["data-slot"] = "tooltip-arrow"
cls.set_class_name(ClassNa... | class TooltipPopup(TooltipBaseComponent):
"""Container for the tooltip content."""
tag = "Tooltip.Popup"
# Render prop for the popup
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip popup component."""
props["da... |
itional space to maintain from the edge of the collision boundary. Defaults to 5.
collision_padding: Var[int]
# Whether to maintain the popup in the viewport after the anchor element was scrolled out of view. Defaults to False.
sticky: Var[bool]
# Determines which CSS position property to use. Default... |
# Render prop for the popup
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip popup component."""
props["data-slot"] = "tooltip-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*ch... | tag = "Tooltip.Popup" |
Var[int]
# Whether to maintain the popup in the viewport after the anchor element was scrolled out of view. Defaults to False.
sticky: Var[bool]
# Determines which CSS position property to use. Defaults to "absolute".
position_method: Var[LiteralPositionMethod]
# Indicates whether the tooltip sho... |
class TooltipArrow(TooltipBaseComponent):
"""Arrow element for the tooltip."""
tag = "Tooltip.Arrow"
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip arrow component."""
props["data-slot"] = "tooltip-arrow"
cls.set_class_name(ClassNa... | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip popup component."""
props["data-slot"] = "tooltip-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props) |
efaults to False.
sticky: Var[bool]
# Determines which CSS position property to use. Defaults to "absolute".
position_method: Var[LiteralPositionMethod]
# Indicates whether the tooltip should track the anchor's position
track_anchor: Var[bool]
# Determines how to handle collisions when positi... |
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class TooltipArrow(TooltipBaseComponent):
"""Arrow element for the tooltip."""
tag = "Tooltip.Arrow"
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the toolt... | props["data-slot"] = "tooltip-popup" |
r[LiteralPositionMethod]
# Indicates whether the tooltip should track the anchor's position
track_anchor: Var[bool]
# Determines how to handle collisions when positioning the popup.
collision_avoidance: Var[str | dict[str, str]]
# Render prop for the positioner
render_: Var[Component]
@c... |
class HighLevelTooltip(TooltipRoot):
"""High level wrapper for the Tooltip component."""
# Content to display in the tooltip
content: Var[str] | Component
# Props for different component parts
_root_props = {
"open",
"default_open",
"on_open_change",
"on_open_cha... | class TooltipArrow(TooltipBaseComponent):
"""Arrow element for the tooltip."""
tag = "Tooltip.Arrow"
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip arrow component."""
props["data-slot"] = "tooltip-arrow"
cls.set_class_name(ClassNames... |
position
track_anchor: Var[bool]
# Determines how to handle collisions when positioning the popup.
collision_avoidance: Var[str | dict[str, str]]
# Render prop for the positioner
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create... |
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip arrow component."""
props["data-slot"] = "tooltip-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class HighLevelTooltip(TooltipRoot):
"... | tag = "Tooltip.Arrow" |
Determines how to handle collisions when positioning the popup.
collision_avoidance: Var[str | dict[str, str]]
# Render prop for the positioner
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip positioner component."""
... |
class HighLevelTooltip(TooltipRoot):
"""High level wrapper for the Tooltip component."""
# Content to display in the tooltip
content: Var[str] | Component
# Props for different component parts
_root_props = {
"open",
"default_open",
"on_open_change",
"on_open_cha... | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip arrow component."""
props["data-slot"] = "tooltip-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props) |
# Render prop for the positioner
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip positioner component."""
props["data-slot"] = "tooltip-positioner"
return super().create(*children, **props)
class TooltipPopup... |
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class HighLevelTooltip(TooltipRoot):
"""High level wrapper for the Tooltip component."""
# Content to display in the tooltip
content: Var[str] | Component
# Props for different component parts
... | props["data-slot"] = "tooltip-arrow" |
iner for the tooltip content."""
tag = "Tooltip.Popup"
# Render prop for the popup
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip popup component."""
props["data-slot"] = "tooltip-popup"
cls.set_class_name... |
_portal_props = {
"container",
"keep_mounted",
}
_positioner_props = {
"align",
"align_offset",
"side",
"side_offset",
"arrow_padding",
"anchor",
"collision_boundary",
"collision_padding",
"sticky",
"position_me... | _root_props = {
"open",
"default_open",
"on_open_change",
"on_open_change_complete",
"track_cursor_axis",
"disabled",
"delay",
"close_delay",
"hoverable",
} |
mponent."""
props["data-slot"] = "tooltip-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class TooltipArrow(TooltipBaseComponent):
"""Arrow element for the tooltip."""
tag = "Tooltip.Arrow"
@classmethod
def create(cls, *children, ... |
_positioner_props = {
"align",
"align_offset",
"side",
"side_offset",
"arrow_padding",
"anchor",
"collision_boundary",
"collision_padding",
"sticky",
"position_method",
"track_anchor",
"collision_avoidance",
"cl... | _portal_props = {
"container",
"keep_mounted",
} |
class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class TooltipArrow(TooltipBaseComponent):
"""Arrow element for the tooltip."""
tag = "Tooltip.Arrow"
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the tooltip arrow componen... |
@classmethod
def create(
cls,
trigger: Component,
content: str | Component | None = None,
**props,
) -> BaseUIComponent:
"""Create a high level tooltip component.
Args:
trigger: The component that triggers the tooltip.
content: The c... | _positioner_props = {
"align",
"align_offset",
"side",
"side_offset",
"arrow_padding",
"anchor",
"collision_boundary",
"collision_padding",
"sticky",
"position_method",
"track_anchor",
"collision_avoidance",
"class_n... |
_portal_props = {
"container",
"keep_mounted",
}
_positioner_props = {
"align",
"align_offset",
"side",
"side_offset",
"arrow_padding",
"anchor",
"collision_boundary",
"collision_padding",
"sticky",
"position_meth... |
# Extract props for different parts
root_props = {k: props.pop(k) for k in cls._root_props & props.keys()}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}... | if content is None and "content" in props:
content = props.pop("content") |
_mounted",
}
_positioner_props = {
"align",
"align_offset",
"side",
"side_offset",
"arrow_padding",
"anchor",
"collision_boundary",
"collision_padding",
"sticky",
"position_method",
"track_anchor",
"collision_avoidan... |
# Extract props for different parts
root_props = {k: props.pop(k) for k in cls._root_props & props.keys()}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}... | content = props.pop("content") |
"side",
"side_offset",
"arrow_padding",
"anchor",
"collision_boundary",
"collision_padding",
"sticky",
"position_method",
"track_anchor",
"collision_avoidance",
"class_name",
}
@classmethod
def create(
cls,
... |
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
# Set default values
positioner_props.setdefault("side_offset", 8)
root_props.setdefault("delay", ... | root_props = {k: props.pop(k) for k in cls._root_props & props.keys()} |
",
"collision_boundary",
"collision_padding",
"sticky",
"position_method",
"track_anchor",
"collision_avoidance",
"class_name",
}
@classmethod
def create(
cls,
trigger: Component,
content: str | Component | None = None,
... |
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
# Set default values
positioner_props.setdefault("side_offset", 8)
root_props.setdefault("delay", 0)
root_props.setdefault("close_delay", 0)
return TooltipRoot.crea... | portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()} |
"position_method",
"track_anchor",
"collision_avoidance",
"class_name",
}
@classmethod
def create(
cls,
trigger: Component,
content: str | Component | None = None,
**props,
) -> BaseUIComponent:
"""Create a high level tooltip componen... |
# Set default values
positioner_props.setdefault("side_offset", 8)
root_props.setdefault("delay", 0)
root_props.setdefault("close_delay", 0)
return TooltipRoot.create(
TooltipTrigger.create(
render_=trigger,
),
TooltipPortal.... | positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
} |
ops.pop(k) for k in cls._root_props & props.keys()}
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
# Set default values
positioner_props.setdefault("side_... |
root = staticmethod(TooltipRoot.create)
trigger = staticmethod(TooltipTrigger.create)
portal = staticmethod(TooltipPortal.create)
positioner = staticmethod(TooltipPositioner.create)
popup = staticmethod(TooltipPopup.create)
arrow = staticmethod(TooltipArrow.create)
class_names = ClassNames
... | provider = staticmethod(TooltipProvider.create) |
portal_props = {k: props.pop(k) for k in cls._portal_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
# Set default values
positioner_props.setdefault("side_offset", 8)
root_props.setdefault("delay", 0... |
trigger = staticmethod(TooltipTrigger.create)
portal = staticmethod(TooltipPortal.create)
positioner = staticmethod(TooltipPositioner.create)
popup = staticmethod(TooltipPopup.create)
arrow = staticmethod(TooltipArrow.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelTooltip... | root = staticmethod(TooltipRoot.create) |
k in cls._portal_props & props.keys()}
positioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
# Set default values
positioner_props.setdefault("side_offset", 8)
root_props.setdefault("delay", 0)
root_props.setdefault("close_delay... |
portal = staticmethod(TooltipPortal.create)
positioner = staticmethod(TooltipPositioner.create)
popup = staticmethod(TooltipPopup.create)
arrow = staticmethod(TooltipArrow.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelTooltip.create)
tooltip = Tooltip()
| trigger = staticmethod(TooltipTrigger.create) |
itioner_props = {
k: props.pop(k) for k in cls._positioner_props & props.keys()
}
# Set default values
positioner_props.setdefault("side_offset", 8)
root_props.setdefault("delay", 0)
root_props.setdefault("close_delay", 0)
return TooltipRoot.create(
... |
positioner = staticmethod(TooltipPositioner.create)
popup = staticmethod(TooltipPopup.create)
arrow = staticmethod(TooltipArrow.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelTooltip.create)
tooltip = Tooltip()
| portal = staticmethod(TooltipPortal.create) |
r k in cls._positioner_props & props.keys()
}
# Set default values
positioner_props.setdefault("side_offset", 8)
root_props.setdefault("delay", 0)
root_props.setdefault("close_delay", 0)
return TooltipRoot.create(
TooltipTrigger.create(
rende... |
popup = staticmethod(TooltipPopup.create)
arrow = staticmethod(TooltipArrow.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelTooltip.create)
tooltip = Tooltip()
| positioner = staticmethod(TooltipPositioner.create) |
# Set default values
positioner_props.setdefault("side_offset", 8)
root_props.setdefault("delay", 0)
root_props.setdefault("close_delay", 0)
return TooltipRoot.create(
TooltipTrigger.create(
render_=trigger,
),
TooltipPortal.cre... |
arrow = staticmethod(TooltipArrow.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelTooltip.create)
tooltip = Tooltip()
| popup = staticmethod(TooltipPopup.create) |
_props.setdefault("side_offset", 8)
root_props.setdefault("delay", 0)
root_props.setdefault("close_delay", 0)
return TooltipRoot.create(
TooltipTrigger.create(
render_=trigger,
),
TooltipPortal.create(
TooltipPositioner.create(... |
class_names = ClassNames
__call__ = staticmethod(HighLevelTooltip.create)
tooltip = Tooltip()
| arrow = staticmethod(TooltipArrow.create) |
ot_props.setdefault("delay", 0)
root_props.setdefault("close_delay", 0)
return TooltipRoot.create(
TooltipTrigger.create(
render_=trigger,
),
TooltipPortal.create(
TooltipPositioner.create(
TooltipPopup.create(
... |
__call__ = staticmethod(HighLevelTooltip.create)
tooltip = Tooltip()
| class_names = ClassNames |
0)
root_props.setdefault("close_delay", 0)
return TooltipRoot.create(
TooltipTrigger.create(
render_=trigger,
),
TooltipPortal.create(
TooltipPositioner.create(
TooltipPopup.create(
TooltipAr... |
tooltip = Tooltip()
| __call__ = staticmethod(HighLevelTooltip.create) |
return TooltipRoot.create(
TooltipTrigger.create(
render_=trigger,
),
TooltipPortal.create(
TooltipPositioner.create(
TooltipPopup.create(
TooltipArrow.create(arrow_svg()),
co... | tooltip = Tooltip() | |
"""Base components sub-package."""
|
from reflex_ui import _REFLEX_UI_MAPPING
_SUBMODULES = set()
_SUBMOD_ATTRS = {
"".join(k.split("components.base.")[-1]): v for k, v in _REFLEX_UI_MAPPING.items()
}
__getattr__, __dir__, __all__ = lazy_loader.attach(
__name__,
submodules=_SUBMODULES,
submod_attrs=_SUBMOD_ATTRS,
)
| from reflex.utils import lazy_loader |
"""Base components sub-package."""
from reflex.utils import lazy_loader
from reflex_ui import _REFLEX_UI_MAPPING
|
_SUBMOD_ATTRS = {
"".join(k.split("components.base.")[-1]): v for k, v in _REFLEX_UI_MAPPING.items()
}
__getattr__, __dir__, __all__ = lazy_loader.attach(
__name__,
submodules=_SUBMODULES,
submod_attrs=_SUBMOD_ATTRS,
)
| _SUBMODULES = set() |
"""Hugeicons Icon component."""
|
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var, VarData
from reflex_ui.components.component import CoreComponent
class HugeIcon(CoreComponent):
"""A HugeIcon component."""
library = "@hugeicons/react@1.1.1"
tag = "HugeiconsIcon"
# The main icon to display
icon: Va... | from reflex.components.component import Component |
"""Hugeicons Icon component."""
from reflex.components.component import Component
|
from reflex.vars.base import Var, VarData
from reflex_ui.components.component import CoreComponent
class HugeIcon(CoreComponent):
"""A HugeIcon component."""
library = "@hugeicons/react@1.1.1"
tag = "HugeiconsIcon"
# The main icon to display
icon: Var[str]
# Alternative icon for states/i... | from reflex.utils.imports import ImportVar |
"""Hugeicons Icon component."""
from reflex.components.component import Component
from reflex.utils.imports import ImportVar
|
from reflex_ui.components.component import CoreComponent
class HugeIcon(CoreComponent):
"""A HugeIcon component."""
library = "@hugeicons/react@1.1.1"
tag = "HugeiconsIcon"
# The main icon to display
icon: Var[str]
# Alternative icon for states/interactions
alt_icon: Var[str | None]
... | from reflex.vars.base import Var, VarData |
"""Hugeicons Icon component."""
from reflex.components.component import Component
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var, VarData
|
class HugeIcon(CoreComponent):
"""A HugeIcon component."""
library = "@hugeicons/react@1.1.1"
tag = "HugeiconsIcon"
# The main icon to display
icon: Var[str]
# Alternative icon for states/interactions
alt_icon: Var[str | None]
# Whether to show the alternative icon
show_alt: ... | from reflex_ui.components.component import CoreComponent |
"""Hugeicons Icon component."""
from reflex.components.component import Component
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var, VarData
from reflex_ui.components.component import CoreComponent
class HugeIcon(CoreComponent):
"""A HugeIcon component."""
|
tag = "HugeiconsIcon"
# The main icon to display
icon: Var[str]
# Alternative icon for states/interactions
alt_icon: Var[str | None]
# Whether to show the alternative icon
show_alt: Var[bool]
# The size of the icon in pixels
size: Var[int] = Var.create(16)
# The stroke wid... | library = "@hugeicons/react@1.1.1" |
"""Hugeicons Icon component."""
from reflex.components.component import Component
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var, VarData
from reflex_ui.components.component import CoreComponent
class HugeIcon(CoreComponent):
"""A HugeIcon component."""
library = "@hugeicons/re... |
# The main icon to display
icon: Var[str]
# Alternative icon for states/interactions
alt_icon: Var[str | None]
# Whether to show the alternative icon
show_alt: Var[bool]
# The size of the icon in pixels
size: Var[int] = Var.create(16)
# The stroke width of the icon
stroke_w... | tag = "HugeiconsIcon" |
ugeicons Icon component."""
from reflex.components.component import Component
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var, VarData
from reflex_ui.components.component import CoreComponent
class HugeIcon(CoreComponent):
"""A HugeIcon component."""
library = "@hugeicons/react@... |
for prop in ["icon", "alt_icon"]:
if prop in props and isinstance(props[prop], str):
icon_name = props[prop]
props[prop] = Var(
icon_name,
_var_data=VarData(
imports={
"@hugei... | if children and isinstance(children[0], str) and "icon" not in props:
props["icon"] = children[0]
children = children[1:] |
m reflex.utils.imports import ImportVar
from reflex.vars.base import Var, VarData
from reflex_ui.components.component import CoreComponent
class HugeIcon(CoreComponent):
"""A HugeIcon component."""
library = "@hugeicons/react@1.1.1"
tag = "HugeiconsIcon"
# The main icon to display
icon: Var[st... |
children = children[1:]
for prop in ["icon", "alt_icon"]:
if prop in props and isinstance(props[prop], str):
icon_name = props[prop]
props[prop] = Var(
icon_name,
_var_data=VarData(
imports={... | props["icon"] = children[0] |
from reflex.vars.base import Var, VarData
from reflex_ui.components.component import CoreComponent
class HugeIcon(CoreComponent):
"""A HugeIcon component."""
library = "@hugeicons/react@1.1.1"
tag = "HugeiconsIcon"
# The main icon to display
icon: Var[str]
# Alternative icon for states/in... |
for prop in ["icon", "alt_icon"]:
if prop in props and isinstance(props[prop], str):
icon_name = props[prop]
props[prop] = Var(
icon_name,
_var_data=VarData(
imports={
"@hugei... | children = children[1:] |
eIcon component."""
library = "@hugeicons/react@1.1.1"
tag = "HugeiconsIcon"
# The main icon to display
icon: Var[str]
# Alternative icon for states/interactions
alt_icon: Var[str | None]
# Whether to show the alternative icon
show_alt: Var[bool]
# The size of the icon in pixel... |
props[prop] = Var(
icon_name,
_var_data=VarData(
imports={
"@hugeicons/core-free-icons@1.2.1": ImportVar(tag=icon_name)
}
),
)
stroke_width = p... | icon_name = props[prop] |
ize: Var[int] = Var.create(16)
# The stroke width of the icon
stroke_width: Var[float] = Var.create(2)
@classmethod
def create(cls, *children, **props) -> Component:
"""Initialize the Icon component.
Args:
*children: The positional arguments
**props: The keywor... |
cls.set_class_name(f"[&_path]:stroke-[{stroke_width}]", props)
return super().create(*children, **props)
hi = icon = HugeIcon.create
| stroke_width = props.pop("stroke_width", 2) |
) -> Component:
"""Initialize the Icon component.
Args:
*children: The positional arguments
**props: The keyword arguments
Returns:
The created component.
"""
if children and isinstance(children[0], str) and "icon" not in props:
... | hi = icon = HugeIcon.create | |
"""Set of custom icons."""
|
from reflex.components.el import svg
from reflex.vars.base import Var
from reflex_ui.utils.twmerge import cn
@memo
def spinner_component(
class_name: str | Var[str] = "",
) -> Component:
"""Create a spinner SVG icon.
Args:
class_name: The class name of the spinner.
Returns:
The spi... | from reflex.components.component import Component, memo |
"""Set of custom icons."""
from reflex.components.component import Component, memo
|
from reflex.vars.base import Var
from reflex_ui.utils.twmerge import cn
@memo
def spinner_component(
class_name: str | Var[str] = "",
) -> Component:
"""Create a spinner SVG icon.
Args:
class_name: The class name of the spinner.
Returns:
The spinner SVG icon.
"""
return sv... | from reflex.components.el import svg |
"""Set of custom icons."""
from reflex.components.component import Component, memo
from reflex.components.el import svg
|
from reflex_ui.utils.twmerge import cn
@memo
def spinner_component(
class_name: str | Var[str] = "",
) -> Component:
"""Create a spinner SVG icon.
Args:
class_name: The class name of the spinner.
Returns:
The spinner SVG icon.
"""
return svg(
svg.path(
... | from reflex.vars.base import Var |
"""Set of custom icons."""
from reflex.components.component import Component, memo
from reflex.components.el import svg
from reflex.vars.base import Var
|
@memo
def spinner_component(
class_name: str | Var[str] = "",
) -> Component:
"""Create a spinner SVG icon.
Args:
class_name: The class name of the spinner.
Returns:
The spinner SVG icon.
"""
return svg(
svg.path(
opacity="0.2",
d="M14.66 8a6... | from reflex_ui.utils.twmerge import cn |
"""Set of custom icons."""
from reflex.components.component import Component, memo
from reflex.components.el import svg
from reflex.vars.base import Var
from reflex_ui.utils.twmerge import cn
@memo
def spinner_component(
class_name: str | Var[str] = "",
) -> Component:
"""Create a spinner SVG icon.
Arg... |
@memo
def select_arrow_icon(
class_name: str | Var[str] = "",
) -> Component:
"""A select arrow SVG icon."""
return svg(
svg.path(
d="M4.99902 10.0003L7.99967 13.0003L10.999 10.0003M4.99902 6.00033L7.99967 3.00033L10.999 6.00033",
stroke="currentColor",
stroke_... | spinner = spinner_component |
stroke="currentColor",
stroke_width="1.5",
),
svg.path(
d="M13.413 11.877A6.666 6.666 0 1 1 10.26 1.728",
stroke="currentColor",
stroke_width="1.5",
),
xmlns="http://www.w3.org/2000/svg",
custom_attrs={"viewBox": "0 0 16 ... |
@memo
def arrow_svg_component(class_name: str | Var[str] = "") -> Component:
"""Create a tooltip arrow SVG icon.
The arrow SVG icon.
"""
return svg(
svg.path(
d="M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V9H20V8H18.5349C17.5468 8 16.5936 7.63423 15.859... | select_arrow = select_arrow_icon |
_svg_component(class_name: str | Var[str] = "") -> Component:
"""Create a tooltip arrow SVG icon.
The arrow SVG icon.
"""
return svg(
svg.path(
d="M9.66437 2.60207L4.80758 6.97318C4.07308 7.63423 3.11989 8 2.13172 8H0V9H20V8H18.5349C17.5468 8 16.5936 7.63423 15.8591 6.97318L11.0023 ... | arrow_svg = arrow_svg_component | |
"""Simple Icon component wrapper for @icons-pack/react-simple-icons."""
|
from reflex.utils.imports import ImportVar
class SimpleIcon(rx.Component):
"""Simple Icon component wrapper for @icons-pack/react-simple-icons."""
library = "@icons-pack/react-simple-icons@13.8.0"
tag = "SiReact"
# The color of the icon
color: rx.Var[str]
# The size of the icon
size: ... | import reflex as rx |
"""Simple Icon component wrapper for @icons-pack/react-simple-icons."""
import reflex as rx
|
class SimpleIcon(rx.Component):
"""Simple Icon component wrapper for @icons-pack/react-simple-icons."""
library = "@icons-pack/react-simple-icons@13.8.0"
tag = "SiReact"
# The color of the icon
color: rx.Var[str]
# The size of the icon
size: rx.Var[int | str]
@classmethod
def... | from reflex.utils.imports import ImportVar |
"""Simple Icon component wrapper for @icons-pack/react-simple-icons."""
import reflex as rx
from reflex.utils.imports import ImportVar
class SimpleIcon(rx.Component):
"""Simple Icon component wrapper for @icons-pack/react-simple-icons."""
|
tag = "SiReact"
# The color of the icon
color: rx.Var[str]
# The size of the icon
size: rx.Var[int | str]
@classmethod
def create(cls, icon_name: str, **props):
"""Create a SimpleIcon component.
Args:
icon_name: The icon component name (e.g., "SiReact", "SiG... | library = "@icons-pack/react-simple-icons@13.8.0" |
"""Simple Icon component wrapper for @icons-pack/react-simple-icons."""
import reflex as rx
from reflex.utils.imports import ImportVar
class SimpleIcon(rx.Component):
"""Simple Icon component wrapper for @icons-pack/react-simple-icons."""
library = "@icons-pack/react-simple-icons@13.8.0"
|
# The color of the icon
color: rx.Var[str]
# The size of the icon
size: rx.Var[int | str]
@classmethod
def create(cls, icon_name: str, **props):
"""Create a SimpleIcon component.
Args:
icon_name: The icon component name (e.g., "SiReact", "SiGithub", "SiPython")
... | tag = "SiReact" |
"""Simple Icon component wrapper for @icons-pack/react-simple-icons."""
import reflex as rx
from reflex.utils.imports import ImportVar
class SimpleIcon(rx.Component):
"""Simple Icon component wrapper for @icons-pack/react-simple-icons."""
library = "@icons-pack/react-simple-icons@13.8.0"
tag = "SiReact... |
instance.tag = icon_name
return instance
def add_imports(self):
"""Add the specific icon import."""
return {
self.library: ImportVar(
tag=self.tag,
is_default=False,
)
}
simple_icon = SimpleIcon.create
| instance = super().create(**props) |
"""Simple Icon component wrapper for @icons-pack/react-simple-icons."""
import reflex as rx
from reflex.utils.imports import ImportVar
class SimpleIcon(rx.Component):
"""Simple Icon component wrapper for @icons-pack/react-simple-icons."""
library = "@icons-pack/react-simple-icons@13.8.0"
tag = "SiReact... |
return instance
def add_imports(self):
"""Add the specific icon import."""
return {
self.library: ImportVar(
tag=self.tag,
is_default=False,
)
}
simple_icon = SimpleIcon.create
| instance.tag = icon_name |
rt reflex as rx
from reflex.utils.imports import ImportVar
class SimpleIcon(rx.Component):
"""Simple Icon component wrapper for @icons-pack/react-simple-icons."""
library = "@icons-pack/react-simple-icons@13.8.0"
tag = "SiReact"
# The color of the icon
color: rx.Var[str]
# The size of the ... | simple_icon = SimpleIcon.create | |
"""Icons sub-package."""
|
_SUBMODULES: set[str] = {
"hugeicon",
"others",
}
_SUBMOD_ATTRS: dict[str, list[str]] = {
"hugeicon": ["hi", "icon"],
"others": ["spinner", "select_arrow"],
}
__getattr__, __dir__, __all__ = lazy_loader.attach(
__name__,
submodules=_SUBMODULES,
submod_attrs=_SUBMOD_ATTRS,
)
| from reflex.utils import lazy_loader |
"""Merge Tailwind CSS classes utility."""
|
from reflex.vars import FunctionVar, Var
from reflex.vars.base import VarData
def cn(
*classes: Var | str | tuple | list | None,
) -> Var:
"""Merge Tailwind CSS classes. Accepts strings, Vars, lists, or tuples.
Args:
*classes: Any number of class strings, Vars, tuples, or lists.
Returns:
... | from reflex.utils.imports import ImportVar |
"""Merge Tailwind CSS classes utility."""
from reflex.utils.imports import ImportVar
|
from reflex.vars.base import VarData
def cn(
*classes: Var | str | tuple | list | None,
) -> Var:
"""Merge Tailwind CSS classes. Accepts strings, Vars, lists, or tuples.
Args:
*classes: Any number of class strings, Vars, tuples, or lists.
Returns:
Var: A Var representing the merged ... | from reflex.vars import FunctionVar, Var |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.