instruction stringlengths 0 1k | input stringlengths 1 1k | output stringlengths 10 6.51k |
|---|---|---|
rties to apply to the checkbox component.
Returns:
The checkbox component and its indicator.
"""
class_name = props.pop("class_name", "")
if label := props.pop("label", None):
return Label.create( # pyright: ignore[reportReturnType]
CheckboxRoot.... |
checkbox = CheckboxNamespace()
| __call__ = staticmethod(HighLevelCheckbox.create) |
eturns:
The checkbox component and its indicator.
"""
class_name = props.pop("class_name", "")
if label := props.pop("label", None):
return Label.create( # pyright: ignore[reportReturnType]
CheckboxRoot.create(
CheckboxIndicator.create... | checkbox = CheckboxNamespace() | |
"""Custom collapsible 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
class ClassNames:
"""Class names for collapsible components."""
ROOT = "flex flex-col justify-cent... | from reflex.components.component import Component, ComponentNamespace |
"""Custom collapsible component."""
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
class ClassNames:
"""Class names for collapsible components."""
ROOT = "flex flex-col justify-center text-secondary-12"
TRIGGER = "group flex items-center g... | from reflex.event import EventHandler, passthrough_event_spec |
"""Custom collapsible component."""
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
class ClassNames:
"""Class names for collapsible components."""
ROOT = "flex flex-col justify-center text-secondary-12"
TRIGGER = "group flex items-center gap-2"
PANEL = "flex h-[var(--collapsibl... | from reflex.utils.imports import ImportVar |
"""Custom collapsible component."""
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
class ClassNames:
"""Class names for collapsible components."""
ROOT = "flex flex-col justify-center text-secondary-12"
TRIGGER = "group flex items-center gap-2"
PANEL = "flex h-[var(--collapsible-panel-height)] flex-col justify... | from reflex.vars.base import Var |
"""Custom collapsible 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
|
class ClassNames:
"""Class names for collapsible components."""
ROOT = "flex flex-col justify-center text-secondary-12"
TRIGGER = "group flex items-center gap-2"
PANEL = "flex h-[var(--collapsible-panel-height)] flex-col justify-end overflow-hidden text-sm transition-all ease-out data-[ending-style]... | from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent |
"""Custom collapsible 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
|
class CollapsibleBaseComponent(BaseUIComponent):
"""Base component for collapsible components."""
library = f"{PACKAGE_NAME}/collapsible"
@property
def import_var(self):
"""Return the import variable for the collapsible component."""
return ImportVar(tag="Collapsible", package_path=... | class ClassNames:
"""Class names for collapsible components."""
ROOT = "flex flex-col justify-center text-secondary-12"
TRIGGER = "group flex items-center gap-2"
PANEL = "flex h-[var(--collapsible-panel-height)] flex-col justify-end overflow-hidden text-sm transition-all ease-out data-[ending-style]:h-... |
"""Custom collapsible 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
c... |
TRIGGER = "group flex items-center gap-2"
PANEL = "flex h-[var(--collapsible-panel-height)] flex-col justify-end overflow-hidden text-sm transition-all ease-out data-[ending-style]:h-0 data-[starting-style]:h-0"
class CollapsibleBaseComponent(BaseUIComponent):
"""Base component for collapsible components... | ROOT = "flex flex-col justify-center text-secondary-12" |
"""Custom collapsible 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
c... |
PANEL = "flex h-[var(--collapsible-panel-height)] flex-col justify-end overflow-hidden text-sm transition-all ease-out data-[ending-style]:h-0 data-[starting-style]:h-0"
class CollapsibleBaseComponent(BaseUIComponent):
"""Base component for collapsible components."""
library = f"{PACKAGE_NAME}/collapsib... | TRIGGER = "group flex items-center gap-2" |
"""Custom collapsible 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
c... |
class CollapsibleBaseComponent(BaseUIComponent):
"""Base component for collapsible components."""
library = f"{PACKAGE_NAME}/collapsible"
@property
def import_var(self):
"""Return the import variable for the collapsible component."""
return ImportVar(tag="Collapsible", package_path=... | PANEL = "flex h-[var(--collapsible-panel-height)] flex-col justify-end overflow-hidden text-sm transition-all ease-out data-[ending-style]:h-0 data-[starting-style]:h-0" |
"""Custom collapsible 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
c... |
class CollapsibleRoot(CollapsibleBaseComponent):
"""Groups all parts of the collapsible. Renders a <div> element."""
tag = "Collapsible.Root"
# Whether the collapsible panel is initially open. To render a controlled collapsible, use the `open` prop instead. Defaults to False.
default_open: Var[bool... | class CollapsibleBaseComponent(BaseUIComponent):
"""Base component for collapsible components."""
library = f"{PACKAGE_NAME}/collapsible"
@property
def import_var(self):
"""Return the import variable for the collapsible component."""
return ImportVar(tag="Collapsible", package_path="",... |
"""Custom collapsible 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
c... |
@property
def import_var(self):
"""Return the import variable for the collapsible component."""
return ImportVar(tag="Collapsible", package_path="", install=False)
class CollapsibleRoot(CollapsibleBaseComponent):
"""Groups all parts of the collapsible. Renders a <div> element."""
ta... | library = f"{PACKAGE_NAME}/collapsible" |
"""Custom collapsible 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
c... |
class CollapsibleRoot(CollapsibleBaseComponent):
"""Groups all parts of the collapsible. Renders a <div> element."""
tag = "Collapsible.Root"
# Whether the collapsible panel is initially open. To render a controlled collapsible, use the `open` prop instead. Defaults to False.
default_open: Var[bool... | def import_var(self):
"""Return the import variable for the collapsible component."""
return ImportVar(tag="Collapsible", package_path="", install=False) |
entHandler, 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
class ClassNames:
"""Class names for collapsible components."""
ROOT = "flex flex-col justify-center text-secondary-12"
TR... |
# Whether the collapsible panel is initially open. To render a controlled collapsible, use the `open` prop instead. Defaults to False.
default_open: Var[bool]
# Whether the collapsible panel is currently open. To render an uncontrolled collapsible, use the `default_open` prop instead.
open: Var[bool]... | tag = "Collapsible.Root" |
= f"{PACKAGE_NAME}/collapsible"
@property
def import_var(self):
"""Return the import variable for the collapsible component."""
return ImportVar(tag="Collapsible", package_path="", install=False)
class CollapsibleRoot(CollapsibleBaseComponent):
"""Groups all parts of the collapsible. Ren... |
class CollapsibleTrigger(CollapsibleBaseComponent):
"""A button that opens and closes the collapsible panel. Renders a <button> element."""
tag = "Collapsible.Trigger"
# Whether the component renders a native `<button>` element when replacing it via the `render` prop. Set to `false` if the rendered ele... | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the collapsible root component."""
props["data-slot"] = "collapsible"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props) |
he collapsible component."""
return ImportVar(tag="Collapsible", package_path="", install=False)
class CollapsibleRoot(CollapsibleBaseComponent):
"""Groups all parts of the collapsible. Renders a <div> element."""
tag = "Collapsible.Root"
# Whether the collapsible panel is initially open. To ren... |
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class CollapsibleTrigger(CollapsibleBaseComponent):
"""A button that opens and closes the collapsible panel. Renders a <button> element."""
tag = "Collapsible.Trigger"
# Whether the component renders a ... | props["data-slot"] = "collapsible" |
e panel is initially open. To render a controlled collapsible, use the `open` prop instead. Defaults to False.
default_open: Var[bool]
# Whether the collapsible panel is currently open. To render an uncontrolled collapsible, use the `default_open` prop instead.
open: Var[bool]
# Event handler called w... |
# Whether the component renders a native `<button>` element when replacing it via the `render` prop. Set to `false` if the rendered element is not a button (e.g. `<div>`). Defaults to True.
native_button: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *chil... | tag = "Collapsible.Trigger" |
e panel is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool)]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUICompo... |
class CollapsiblePanel(CollapsibleBaseComponent):
"""A panel with the collapsible contents. Renders a <div> element."""
tag = "Collapsible.Panel"
# Allows the browser's built-in page search to find and expand the panel contents. Overrides the `keep_mounted` prop and uses `hidden="until-found"` to hide ... | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the collapsible trigger component."""
props["data-slot"] = "collapsible-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props) |
should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the collapsible root component."""
props["data-slot"] = "collapsible"
cls.set_cl... |
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class CollapsiblePanel(CollapsibleBaseComponent):
"""A panel with the collapsible contents. Renders a <div> element."""
tag = "Collapsible.Panel"
# Allows the browser's built-in page search to find a... | props["data-slot"] = "collapsible-trigger" |
-slot"] = "collapsible"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class CollapsibleTrigger(CollapsibleBaseComponent):
"""A button that opens and closes the collapsible panel. Renders a <button> element."""
tag = "Collapsible.Trigger"
# Whether t... |
# Allows the browser's built-in page search to find and expand the panel contents. Overrides the `keep_mounted` prop and uses `hidden="until-found"` to hide the element without removing it from the DOM. Defaults to False.
hidden_until_found: Var[bool]
# Whether to keep the element in the DOM while the pa... | tag = "Collapsible.Panel" |
ent."""
props["data-slot"] = "collapsible-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class CollapsiblePanel(CollapsibleBaseComponent):
"""A panel with the collapsible contents. Renders a <div> element."""
tag = "Collapsible.Panel"
... |
class HighLevelCollapsible(CollapsibleRoot):
"""High level collapsible component."""
# The trigger component.
trigger: Var[Component | None]
# The content component.
content: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Cre... | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the collapsible panel component."""
props["data-slot"] = "collapsible-panel"
cls.set_class_name(ClassNames.PANEL, props)
return super().create(*children, **props) |
return super().create(*children, **props)
class CollapsiblePanel(CollapsibleBaseComponent):
"""A panel with the collapsible contents. Renders a <div> element."""
tag = "Collapsible.Panel"
# Allows the browser's built-in page search to find and expand the panel contents. Overrides the `keep_mounted` p... |
cls.set_class_name(ClassNames.PANEL, props)
return super().create(*children, **props)
class HighLevelCollapsible(CollapsibleRoot):
"""High level collapsible component."""
# The trigger component.
trigger: Var[Component | None]
# The content component.
content: Var[str | Componen... | props["data-slot"] = "collapsible-panel" |
it from the DOM. Defaults to False.
hidden_until_found: Var[bool]
# Whether to keep the element in the DOM while the panel is hidden. This prop is ignored when `hidden_until_found` is used. Defaults to False.
keep_mounted: Var[bool]
# Allows you to replace the component's HTML element with a differen... |
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
]
class Collapsible(ComponentNamespace):
"""Namespace for Collapsible components."""
root = staticmethod(CollapsibleRoot.create)
trigger = staticmetho... | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the collapsible component."""
trigger = props.pop("trigger", None)
content = props.pop("content", None)
return CollapsibleRoot.create(
CollapsibleTrigger.create(render_=trigger) if trigger else None,
... |
DOM while the panel is hidden. This prop is ignored when `hidden_until_found` is used. Defaults to False.
keep_mounted: Var[bool]
# Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to ... |
content = props.pop("content", None)
return CollapsibleRoot.create(
CollapsibleTrigger.create(render_=trigger) if trigger else None,
CollapsiblePanel.create(
content,
*children,
),
**props,
)
def _exclude_prop... | trigger = props.pop("trigger", None) |
ignored when `hidden_until_found` is used. Defaults to False.
keep_mounted: Var[bool]
# Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render.
render_: Var[Component]
@cla... |
return CollapsibleRoot.create(
CollapsibleTrigger.create(render_=trigger) if trigger else None,
CollapsiblePanel.create(
content,
*children,
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
... | content = props.pop("content", None) |
: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the collapsible panel component."""
props["data-slot"] = "collapsible-panel"
cls.set_class_name(ClassNames.PANEL, props)
return super().create(*children, **props)
class HighLevelCol... |
class Collapsible(ComponentNamespace):
"""Namespace for Collapsible components."""
root = staticmethod(CollapsibleRoot.create)
trigger = staticmethod(CollapsibleTrigger.create)
panel = staticmethod(CollapsiblePanel.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelCollapsible... | def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
] |
props["data-slot"] = "collapsible-panel"
cls.set_class_name(ClassNames.PANEL, props)
return super().create(*children, **props)
class HighLevelCollapsible(CollapsibleRoot):
"""High level collapsible component."""
# The trigger component.
trigger: Var[Component | None]
# The conten... |
collapsible = Collapsible()
| class Collapsible(ComponentNamespace):
"""Namespace for Collapsible components."""
root = staticmethod(CollapsibleRoot.create)
trigger = staticmethod(CollapsibleTrigger.create)
panel = staticmethod(CollapsiblePanel.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelCollapsible.cr... |
ops)
return super().create(*children, **props)
class HighLevelCollapsible(CollapsibleRoot):
"""High level collapsible component."""
# The trigger component.
trigger: Var[Component | None]
# The content component.
content: Var[str | Component | None]
@classmethod
def create(cls, ... |
trigger = staticmethod(CollapsibleTrigger.create)
panel = staticmethod(CollapsiblePanel.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelCollapsible.create)
collapsible = Collapsible()
| root = staticmethod(CollapsibleRoot.create) |
props)
class HighLevelCollapsible(CollapsibleRoot):
"""High level collapsible component."""
# The trigger component.
trigger: Var[Component | None]
# The content component.
content: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
... |
panel = staticmethod(CollapsiblePanel.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelCollapsible.create)
collapsible = Collapsible()
| trigger = staticmethod(CollapsibleTrigger.create) |
"""High level collapsible component."""
# The trigger component.
trigger: Var[Component | None]
# The content component.
content: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the collapsible component."""
trigge... |
class_names = ClassNames
__call__ = staticmethod(HighLevelCollapsible.create)
collapsible = Collapsible()
| panel = staticmethod(CollapsiblePanel.create) |
The trigger component.
trigger: Var[Component | None]
# The content component.
content: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the collapsible component."""
trigger = props.pop("trigger", None)
content = p... |
__call__ = staticmethod(HighLevelCollapsible.create)
collapsible = Collapsible()
| class_names = ClassNames |
rigger: Var[Component | None]
# The content component.
content: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the collapsible component."""
trigger = props.pop("trigger", None)
content = props.pop("content", None)
... |
collapsible = Collapsible()
| __call__ = staticmethod(HighLevelCollapsible.create) |
ent.
content: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the collapsible component."""
trigger = props.pop("trigger", None)
content = props.pop("content", None)
return CollapsibleRoot.create(
Collap... | collapsible = Collapsible() | |
"""Custom context menu component."""
|
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.foreach import foreach
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.button import button
from r... | from typing import Literal |
"""Custom context menu component."""
from typing import Literal
|
from reflex.components.core.foreach import foreach
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.button import button
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from r... | from reflex.components.component import Component, ComponentNamespace |
"""Custom context menu 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.button import button
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.utils.twmerge import cn
LiteralOpenChange... | from reflex.components.core.foreach import foreach |
"""Custom context menu component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.foreach import foreach
|
from reflex.utils.imports import ImportVar
from reflex.vars.base import Var
from reflex_ui.components.base.button import button
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.utils.twmerge import cn
LiteralOpenChangeReason = Literal[
"arrowKey",
"escapeKey",
"select... | from reflex.event import EventHandler, passthrough_event_spec |
"""Custom context menu component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.foreach import foreach
from reflex.event import EventHandler, passthrough_event_spec
|
from reflex.vars.base import Var
from reflex_ui.components.base.button import button
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.utils.twmerge import cn
LiteralOpenChangeReason = Literal[
"arrowKey",
"escapeKey",
"select",
"hover",
"click",
"focus",
... | from reflex.utils.imports import ImportVar |
"""Custom context menu component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.foreach import foreach
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
|
from reflex_ui.components.base.button import button
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.utils.twmerge import cn
LiteralOpenChangeReason = Literal[
"arrowKey",
"escapeKey",
"select",
"hover",
"click",
"focus",
"dismiss",
"typeahead",
... | from reflex.vars.base import Var |
"""Custom context menu component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.foreach import foreach
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import... |
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.utils.twmerge import cn
LiteralOpenChangeReason = Literal[
"arrowKey",
"escapeKey",
"select",
"hover",
"click",
"focus",
"dismiss",
"typeahead",
"tab",
]
LiteralMenuOrientation = Literal["vertical... | from reflex_ui.components.base.button import button |
"""Custom context menu component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.foreach import foreach
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import... |
from reflex_ui.utils.twmerge import cn
LiteralOpenChangeReason = Literal[
"arrowKey",
"escapeKey",
"select",
"hover",
"click",
"focus",
"dismiss",
"typeahead",
"tab",
]
LiteralMenuOrientation = Literal["vertical", "horizontal"]
LiteralSide = Literal["top", "right", "bottom", "left"... | from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent |
"""Custom context menu component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.foreach import foreach
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import... |
LiteralOpenChangeReason = Literal[
"arrowKey",
"escapeKey",
"select",
"hover",
"click",
"focus",
"dismiss",
"typeahead",
"tab",
]
LiteralMenuOrientation = Literal["vertical", "horizontal"]
LiteralSide = Literal["top", "right", "bottom", "left"]
LiteralAlign = Literal["start", "cent... | from reflex_ui.utils.twmerge import cn |
"""Custom context menu component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.foreach import foreach
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import... |
LiteralMenuOrientation = Literal["vertical", "horizontal"]
LiteralSide = Literal["top", "right", "bottom", "left"]
LiteralAlign = Literal["start", "center", "end"]
LiteralPositionMethod = Literal["absolute", "fixed"]
LiteralCollisionAvoidance = Literal["flip", "shift", "auto"]
LiteralMenuSize = Literal["xs", "sm", "md... | LiteralOpenChangeReason = Literal[
"arrowKey",
"escapeKey",
"select",
"hover",
"click",
"focus",
"dismiss",
"typeahead",
"tab",
] |
"""Custom context menu component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.foreach import foreach
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import... |
LiteralSide = Literal["top", "right", "bottom", "left"]
LiteralAlign = Literal["start", "center", "end"]
LiteralPositionMethod = Literal["absolute", "fixed"]
LiteralCollisionAvoidance = Literal["flip", "shift", "auto"]
LiteralMenuSize = Literal["xs", "sm", "md", "lg", "xl"]
class ClassNames:
"""Class names for c... | LiteralMenuOrientation = Literal["vertical", "horizontal"] |
"""Custom context menu component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.foreach import foreach
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import... |
LiteralAlign = Literal["start", "center", "end"]
LiteralPositionMethod = Literal["absolute", "fixed"]
LiteralCollisionAvoidance = Literal["flip", "shift", "auto"]
LiteralMenuSize = Literal["xs", "sm", "md", "lg", "xl"]
class ClassNames:
"""Class names for context menu components."""
TRIGGER = "cursor-contex... | LiteralSide = Literal["top", "right", "bottom", "left"] |
"""Custom context menu component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.foreach import foreach
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import... |
LiteralPositionMethod = Literal["absolute", "fixed"]
LiteralCollisionAvoidance = Literal["flip", "shift", "auto"]
LiteralMenuSize = Literal["xs", "sm", "md", "lg", "xl"]
class ClassNames:
"""Class names for context menu components."""
TRIGGER = "cursor-context-menu"
PORTAL = "relative"
BACKDROP = "f... | LiteralAlign = Literal["start", "center", "end"] |
"""Custom context menu component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.foreach import foreach
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import... |
LiteralCollisionAvoidance = Literal["flip", "shift", "auto"]
LiteralMenuSize = Literal["xs", "sm", "md", "lg", "xl"]
class ClassNames:
"""Class names for context menu components."""
TRIGGER = "cursor-context-menu"
PORTAL = "relative"
BACKDROP = "fixed inset-0"
POPUP = "group/popup max-h-[17.25re... | LiteralPositionMethod = Literal["absolute", "fixed"] |
"""Custom context menu component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.foreach import foreach
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import... |
LiteralMenuSize = Literal["xs", "sm", "md", "lg", "xl"]
class ClassNames:
"""Class names for context menu components."""
TRIGGER = "cursor-context-menu"
PORTAL = "relative"
BACKDROP = "fixed inset-0"
POPUP = "group/popup max-h-[17.25rem] overflow-y-auto origin-(--transform-origin) p-1 border bor... | LiteralCollisionAvoidance = Literal["flip", "shift", "auto"] |
"""Custom context menu component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.foreach import foreach
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import... |
class ClassNames:
"""Class names for context menu components."""
TRIGGER = "cursor-context-menu"
PORTAL = "relative"
BACKDROP = "fixed inset-0"
POPUP = "group/popup max-h-[17.25rem] overflow-y-auto origin-(--transform-origin) p-1 border border-secondary-a4 bg-secondary-1 shadow-large transition-... | LiteralMenuSize = Literal["xs", "sm", "md", "lg", "xl"] |
"""Custom context menu component."""
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.foreach import foreach
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars.base import... |
class ContextMenuBaseComponent(BaseUIComponent):
"""Base component for context menu components."""
library = f"{PACKAGE_NAME}/context-menu"
@property
def import_var(self):
"""Return the import variable for the context menu component."""
return ImportVar(tag="ContextMenu", package_pa... | class ClassNames:
"""Class names for context menu components."""
TRIGGER = "cursor-context-menu"
PORTAL = "relative"
BACKDROP = "fixed inset-0"
POPUP = "group/popup max-h-[17.25rem] overflow-y-auto origin-(--transform-origin) p-1 border border-secondary-a4 bg-secondary-1 shadow-large transition-[tr... |
from reflex.components.component import Component, ComponentNamespace
from reflex.components.core.foreach import foreach
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.button import button
from re... |
PORTAL = "relative"
BACKDROP = "fixed inset-0"
POPUP = "group/popup max-h-[17.25rem] overflow-y-auto origin-(--transform-origin) p-1 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:op... | TRIGGER = "cursor-context-menu" |
port Component, ComponentNamespace
from reflex.components.core.foreach import foreach
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.button import button
from reflex_ui.components.base_ui import PA... |
BACKDROP = "fixed inset-0"
POPUP = "group/popup max-h-[17.25rem] overflow-y-auto origin-(--transform-origin) p-1 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-s... | PORTAL = "relative" |
tNamespace
from reflex.components.core.foreach import foreach
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.button import button
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUICompon... |
POPUP = "group/popup max-h-[17.25rem] overflow-y-auto origin-(--transform-origin) p-1 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none sc... | BACKDROP = "fixed inset-0" |
ts.core.foreach import foreach
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.button import button
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
from reflex_ui.utils.twmerg... |
ITEM = "grid w-full items-center gap-2 text-sm select-none font-medium text-secondary-12 cursor-pointer outline-none data-[highlighted]:bg-secondary-3 scroll-m-1 text-start justify-start"
ITEM_INDICATOR = "text-current"
ITEM_TEXT = "text-start"
SEPARATOR = "-mx-1 my-1 h-[0.5px] bg-secondary-a4"
ARR... | POPUP = "group/popup max-h-[17.25rem] overflow-y-auto origin-(--transform-origin) p-1 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none scrollb... |
",
"select",
"hover",
"click",
"focus",
"dismiss",
"typeahead",
"tab",
]
LiteralMenuOrientation = Literal["vertical", "horizontal"]
LiteralSide = Literal["top", "right", "bottom", "left"]
LiteralAlign = Literal["start", "center", "end"]
LiteralPositionMethod = Literal["absolute", "fixed"]
Li... |
ITEM_INDICATOR = "text-current"
ITEM_TEXT = "text-start"
SEPARATOR = "-mx-1 my-1 h-[0.5px] bg-secondary-a4"
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[si... | ITEM = "grid w-full items-center gap-2 text-sm select-none font-medium text-secondary-12 cursor-pointer outline-none data-[highlighted]:bg-secondary-3 scroll-m-1 text-start justify-start" |
ght", "bottom", "left"]
LiteralAlign = Literal["start", "center", "end"]
LiteralPositionMethod = Literal["absolute", "fixed"]
LiteralCollisionAvoidance = Literal["flip", "shift", "auto"]
LiteralMenuSize = Literal["xs", "sm", "md", "lg", "xl"]
class ClassNames:
"""Class names for context menu components."""
T... |
ITEM_TEXT = "text-start"
SEPARATOR = "-mx-1 my-1 h-[0.5px] bg-secondary-a4"
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180"
POSITIONER =... | ITEM_INDICATOR = "text-current" |
= Literal["start", "center", "end"]
LiteralPositionMethod = Literal["absolute", "fixed"]
LiteralCollisionAvoidance = Literal["flip", "shift", "auto"]
LiteralMenuSize = Literal["xs", "sm", "md", "lg", "xl"]
class ClassNames:
"""Class names for context menu components."""
TRIGGER = "cursor-context-menu"
P... |
SEPARATOR = "-mx-1 my-1 h-[0.5px] bg-secondary-a4"
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180"
POSITIONER = "outline-none"
GROUP = "... | ITEM_TEXT = "text-start" |
"end"]
LiteralPositionMethod = Literal["absolute", "fixed"]
LiteralCollisionAvoidance = Literal["flip", "shift", "auto"]
LiteralMenuSize = Literal["xs", "sm", "md", "lg", "xl"]
class ClassNames:
"""Class names for context menu components."""
TRIGGER = "cursor-context-menu"
PORTAL = "relative"
BACKDR... |
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180"
POSITIONER = "outline-none"
GROUP = "p-1"
GROUP_LABEL = "px-2 py-1.5 text-sm font-semibo... | SEPARATOR = "-mx-1 my-1 h-[0.5px] bg-secondary-a4" |
xed"]
LiteralCollisionAvoidance = Literal["flip", "shift", "auto"]
LiteralMenuSize = Literal["xs", "sm", "md", "lg", "xl"]
class ClassNames:
"""Class names for context menu components."""
TRIGGER = "cursor-context-menu"
PORTAL = "relative"
BACKDROP = "fixed inset-0"
POPUP = "group/popup max-h-[17... |
POSITIONER = "outline-none"
GROUP = "p-1"
GROUP_LABEL = "px-2 py-1.5 text-sm font-semibold"
RADIO_GROUP = ""
RADIO_ITEM = "grid min-w-(--anchor-width) grid-cols-[1fr_auto] items-center gap-2 text-sm select-none font-[450] text-secondary-11 cursor-pointer outline-none data-[highlighted]:bg-secondary... | ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180" |
ntext-menu"
PORTAL = "relative"
BACKDROP = "fixed inset-0"
POPUP = "group/popup max-h-[17.25rem] overflow-y-auto origin-(--transform-origin) p-1 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[endin... |
GROUP = "p-1"
GROUP_LABEL = "px-2 py-1.5 text-sm font-semibold"
RADIO_GROUP = ""
RADIO_ITEM = "grid min-w-(--anchor-width) grid-cols-[1fr_auto] items-center gap-2 text-sm select-none font-[450] text-secondary-11 cursor-pointer outline-none data-[highlighted]:bg-secondary-3 scroll-m-1"
RADIO_ITEM_IN... | POSITIONER = "outline-none" |
ve"
BACKDROP = "fixed inset-0"
POPUP = "group/popup max-h-[17.25rem] overflow-y-auto origin-(--transform-origin) p-1 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[startin... |
GROUP_LABEL = "px-2 py-1.5 text-sm font-semibold"
RADIO_GROUP = ""
RADIO_ITEM = "grid min-w-(--anchor-width) grid-cols-[1fr_auto] items-center gap-2 text-sm select-none font-[450] text-secondary-11 cursor-pointer outline-none data-[highlighted]:bg-secondary-3 scroll-m-1"
RADIO_ITEM_INDICATOR = "text-cu... | GROUP = "p-1" |
"fixed inset-0"
POPUP = "group/popup max-h-[17.25rem] overflow-y-auto origin-(--transform-origin) p-1 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0... |
RADIO_GROUP = ""
RADIO_ITEM = "grid min-w-(--anchor-width) grid-cols-[1fr_auto] items-center gap-2 text-sm select-none font-[450] text-secondary-11 cursor-pointer outline-none data-[highlighted]:bg-secondary-3 scroll-m-1"
RADIO_ITEM_INDICATOR = "text-current"
CHECKBOX_ITEM = "grid min-w-(--anchor-width... | GROUP_LABEL = "px-2 py-1.5 text-sm font-semibold" |
rem] overflow-y-auto origin-(--transform-origin) p-1 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none scrollbar-thin scrollbar-thumb-secondary... |
RADIO_ITEM = "grid min-w-(--anchor-width) grid-cols-[1fr_auto] items-center gap-2 text-sm select-none font-[450] text-secondary-11 cursor-pointer outline-none data-[highlighted]:bg-secondary-3 scroll-m-1"
RADIO_ITEM_INDICATOR = "text-current"
CHECKBOX_ITEM = "grid min-w-(--anchor-width) grid-cols-[1fr_auto... | RADIO_GROUP = "" |
origin-(--transform-origin) p-1 border border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:opacity-0 outline-none scrollbar-thin scrollbar-thumb-secondary-9 scrollbar-track-tr... |
RADIO_ITEM_INDICATOR = "text-current"
CHECKBOX_ITEM = "grid min-w-(--anchor-width) grid-cols-[1fr_auto] items-center gap-2 text-sm select-none font-[450] text-secondary-11 cursor-pointer outline-none data-[highlighted]:bg-secondary-3 scroll-m-1"
CHECKBOX_ITEM_INDICATOR = "text-current"
SUBMENU_TRIGGER ... | RADIO_ITEM = "grid min-w-(--anchor-width) grid-cols-[1fr_auto] items-center gap-2 text-sm select-none font-[450] text-secondary-11 cursor-pointer outline-none data-[highlighted]:bg-secondary-3 scroll-m-1" |
ty-0 data-[starting-style]:opacity-0 outline-none scrollbar-thin scrollbar-thumb-secondary-9 scrollbar-track-transparent min-w-36"
ITEM = "grid w-full items-center gap-2 text-sm select-none font-medium text-secondary-12 cursor-pointer outline-none data-[highlighted]:bg-secondary-3 scroll-m-1 text-start justify-star... |
CHECKBOX_ITEM = "grid min-w-(--anchor-width) grid-cols-[1fr_auto] items-center gap-2 text-sm select-none font-[450] text-secondary-11 cursor-pointer outline-none data-[highlighted]:bg-secondary-3 scroll-m-1"
CHECKBOX_ITEM_INDICATOR = "text-current"
SUBMENU_TRIGGER = "grid min-w-(--anchor-width) grid-cols-[... | RADIO_ITEM_INDICATOR = "text-current" |
ne-none scrollbar-thin scrollbar-thumb-secondary-9 scrollbar-track-transparent min-w-36"
ITEM = "grid w-full items-center gap-2 text-sm select-none font-medium text-secondary-12 cursor-pointer outline-none data-[highlighted]:bg-secondary-3 scroll-m-1 text-start justify-start"
ITEM_INDICATOR = "text-current"
... |
CHECKBOX_ITEM_INDICATOR = "text-current"
SUBMENU_TRIGGER = "grid min-w-(--anchor-width) grid-cols-[1fr_auto] items-center gap-2 text-sm select-none font-[450] text-secondary-11 cursor-pointer outline-none data-[highlighted]:bg-secondary-3 scroll-m-1"
class ContextMenuBaseComponent(BaseUIComponent):
"""Ba... | CHECKBOX_ITEM = "grid min-w-(--anchor-width) grid-cols-[1fr_auto] items-center gap-2 text-sm select-none font-[450] text-secondary-11 cursor-pointer outline-none data-[highlighted]:bg-secondary-3 scroll-m-1" |
ta-[highlighted]:bg-secondary-3 scroll-m-1 text-start justify-start"
ITEM_INDICATOR = "text-current"
ITEM_TEXT = "text-start"
SEPARATOR = "-mx-1 my-1 h-[0.5px] bg-secondary-a4"
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px]... |
SUBMENU_TRIGGER = "grid min-w-(--anchor-width) grid-cols-[1fr_auto] items-center gap-2 text-sm select-none font-[450] text-secondary-11 cursor-pointer outline-none data-[highlighted]:bg-secondary-3 scroll-m-1"
class ContextMenuBaseComponent(BaseUIComponent):
"""Base component for context menu components."""
... | CHECKBOX_ITEM_INDICATOR = "text-current" |
xt-start justify-start"
ITEM_INDICATOR = "text-current"
ITEM_TEXT = "text-start"
SEPARATOR = "-mx-1 my-1 h-[0.5px] bg-secondary-a4"
ARROW = "data-[side=bottom]:top-[-8px] data-[side=left]:right-[-13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]... |
class ContextMenuBaseComponent(BaseUIComponent):
"""Base component for context menu components."""
library = f"{PACKAGE_NAME}/context-menu"
@property
def import_var(self):
"""Return the import variable for the context menu component."""
return ImportVar(tag="ContextMenu", package_pa... | SUBMENU_TRIGGER = "grid min-w-(--anchor-width) grid-cols-[1fr_auto] items-center gap-2 text-sm select-none font-[450] text-secondary-11 cursor-pointer outline-none data-[highlighted]:bg-secondary-3 scroll-m-1" |
13px] data-[side=left]:rotate-90 data-[side=right]:left-[-13px] data-[side=right]:-rotate-90 data-[side=top]:bottom-[-8px] data-[side=top]:rotate-180"
POSITIONER = "outline-none"
GROUP = "p-1"
GROUP_LABEL = "px-2 py-1.5 text-sm font-semibold"
RADIO_GROUP = ""
RADIO_ITEM = "grid min-w-(--anchor-width... |
class ContextMenuRoot(ContextMenuBaseComponent):
"""Groups all parts of the context menu. Doesn't render its own HTML element."""
tag = "ContextMenu.Root"
# Whether the context menu is initially open. To render a controlled context menu, use the open prop instead. Defaults to False.
default_open: V... | class ContextMenuBaseComponent(BaseUIComponent):
"""Base component for context menu components."""
library = f"{PACKAGE_NAME}/context-menu"
@property
def import_var(self):
"""Return the import variable for the context menu component."""
return ImportVar(tag="ContextMenu", package_path=... |
"outline-none"
GROUP = "p-1"
GROUP_LABEL = "px-2 py-1.5 text-sm font-semibold"
RADIO_GROUP = ""
RADIO_ITEM = "grid min-w-(--anchor-width) grid-cols-[1fr_auto] items-center gap-2 text-sm select-none font-[450] text-secondary-11 cursor-pointer outline-none data-[highlighted]:bg-secondary-3 scroll-m-1"
... |
class ContextMenuRoot(ContextMenuBaseComponent):
"""Groups all parts of the context menu. Doesn't render its own HTML element."""
tag = "ContextMenu.Root"
# Whether the context menu is initially open. To render a controlled context menu, use the open prop instead. Defaults to False.
default_open: V... | def import_var(self):
"""Return the import variable for the context menu component."""
return ImportVar(tag="ContextMenu", package_path="", install=False) |
] items-center gap-2 text-sm select-none font-[450] text-secondary-11 cursor-pointer outline-none data-[highlighted]:bg-secondary-3 scroll-m-1"
RADIO_ITEM_INDICATOR = "text-current"
CHECKBOX_ITEM = "grid min-w-(--anchor-width) grid-cols-[1fr_auto] items-center gap-2 text-sm select-none font-[450] text-secondary... |
class ContextMenuTrigger(ContextMenuBaseComponent):
"""An area that opens the context menu on right click or long press. Renders a <div> element."""
tag = "ContextMenu.Trigger"
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
... | class ContextMenuRoot(ContextMenuBaseComponent):
"""Groups all parts of the context menu. Doesn't render its own HTML element."""
tag = "ContextMenu.Root"
# Whether the context menu is initially open. To render a controlled context menu, use the open prop instead. Defaults to False.
default_open: Var[... |
m-1"
RADIO_ITEM_INDICATOR = "text-current"
CHECKBOX_ITEM = "grid min-w-(--anchor-width) grid-cols-[1fr_auto] items-center gap-2 text-sm select-none font-[450] text-secondary-11 cursor-pointer outline-none data-[highlighted]:bg-secondary-3 scroll-m-1"
CHECKBOX_ITEM_INDICATOR = "text-current"
SUBMENU_TRIG... |
# Whether the context menu is initially open. To render a controlled context menu, use the open prop instead. Defaults to False.
default_open: Var[bool]
# Whether the context menu is currently open.
open: Var[bool]
# Event handler called when the context menu is opened or closed.
on_open_cha... | tag = "ContextMenu.Root" |
will not be unmounted when closed. Instead, the unmount function must be called to unmount the context menu manually. Useful when the context menu's animation is controlled by an external library.
actions_ref: Var[str]
# When in a submenu, determines whether pressing the Escape key closes the entire menu, or ... |
class ContextMenuTrigger(ContextMenuBaseComponent):
"""An area that opens the context menu on right click or long press. Renders a <div> element."""
tag = "ContextMenu.Trigger"
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
... | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu root component."""
props["data-slot"] = "context-menu"
return super().create(*children, **props) |
Useful when the context menu's animation is controlled by an external library.
actions_ref: Var[str]
# When in a submenu, determines whether pressing the Escape key closes the entire menu, or only the current child menu. Defaults to True.
close_parent_on_esc: Var[bool]
# Event handler called after an... |
return super().create(*children, **props)
class ContextMenuTrigger(ContextMenuBaseComponent):
"""An area that opens the context menu on right click or long press. Renders a <div> element."""
tag = "ContextMenu.Trigger"
# Whether the component should ignore user interaction. Defaults to False.
... | props["data-slot"] = "context-menu" |
ons_ref: Var[str]
# When in a submenu, determines whether pressing the Escape key closes the entire menu, or only the current child menu. Defaults to True.
close_parent_on_esc: Var[bool]
# Event handler called after any animations complete when the context menu is closed.
on_open_change_complete: Even... |
class ContextMenuPortal(ContextMenuBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "ContextMenu.Portal"
# A parent element to render the portal element into. Defaults to document.body.
container:... | class ContextMenuTrigger(ContextMenuBaseComponent):
"""An area that opens the context menu on right click or long press. Renders a <div> element."""
tag = "ContextMenu.Trigger"
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
re... |
e.
close_parent_on_esc: Var[bool]
# Event handler called after any animations complete when the context menu is closed.
on_open_change_complete: EventHandler[passthrough_event_spec(bool)]
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# Whether ... |
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu trigger component."""
props["data-slot"] =... | tag = "ContextMenu.Trigger" |
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# Whether keyboard navigation should loop around when reaching the end of the items. Defaults to True.
loop: Var[bool]
# The visual orientation of the menu. Controls whether roving focus uses up/down or left... |
class ContextMenuPortal(ContextMenuBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "ContextMenu.Portal"
# A parent element to render the portal element into. Defaults to document.body.
container:... | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu trigger component."""
props["data-slot"] = "context-menu-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props) |
d navigation should loop around when reaching the end of the items. Defaults to True.
loop: Var[bool]
# The visual orientation of the menu. Controls whether roving focus uses up/down or left/right arrow keys. Defaults to "vertical".
orientation: Var[LiteralMenuOrientation]
@classmethod
def create(... |
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class ContextMenuPortal(ContextMenuBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "ContextMenu.Port... | props["data-slot"] = "context-menu-trigger" |
ontrols whether roving focus uses up/down or left/right arrow keys. Defaults to "vertical".
orientation: Var[LiteralMenuOrientation]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu root component."""
props["data-slot"] = "context-menu"
... |
class ContextMenuBackdrop(ContextMenuBaseComponent):
"""A backdrop element that covers the entire viewport when the context menu is open. Renders a <div> element."""
tag = "ContextMenu.Backdrop"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> ... | class ContextMenuPortal(ContextMenuBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "ContextMenu.Portal"
# A parent element to render the portal element into. Defaults to document.body.
container: Va... |
ops) -> BaseUIComponent:
"""Create the context menu root component."""
props["data-slot"] = "context-menu"
return super().create(*children, **props)
class ContextMenuTrigger(ContextMenuBaseComponent):
"""An area that opens the context menu on right click or long press. Renders a <div> elem... |
# A parent element to render the portal element into. Defaults to document.body.
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:
... | tag = "ContextMenu.Portal" |
r long press. Renders a <div> element."""
tag = "ContextMenu.Trigger"
# Whether the component should ignore user interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""... |
class ContextMenuBackdrop(ContextMenuBaseComponent):
"""A backdrop element that covers the entire viewport when the context menu is open. Renders a <div> element."""
tag = "ContextMenu.Backdrop"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> ... | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu portal component."""
props["data-slot"] = "context-menu-portal"
cls.set_class_name(ClassNames.PORTAL, props)
return super().create(*children, **props) |
er interaction. Defaults to False.
disabled: Var[bool]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu trigger component."""
props["data-slot"] = "context-menu-trigger"
cls.set_class_... |
cls.set_class_name(ClassNames.PORTAL, props)
return super().create(*children, **props)
class ContextMenuBackdrop(ContextMenuBaseComponent):
"""A backdrop element that covers the entire viewport when the context menu is open. Renders a <div> element."""
tag = "ContextMenu.Backdrop"
# The... | props["data-slot"] = "context-menu-portal" |
*children, **props) -> BaseUIComponent:
"""Create the context menu trigger component."""
props["data-slot"] = "context-menu-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class ContextMenuPortal(ContextMenuBaseComponent):
"""A port... |
class ContextMenuPositioner(ContextMenuBaseComponent):
"""Positions the context menu popup against the trigger. Renders a <div> element."""
tag = "ContextMenu.Positioner"
# Determines how to handle collisions when positioning the popup.
collision_avoidance: Var[LiteralCollisionAvoidance]
# How... | class ContextMenuBackdrop(ContextMenuBaseComponent):
"""A backdrop element that covers the entire viewport when the context menu is open. Renders a <div> element."""
tag = "ContextMenu.Backdrop"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> Bas... |
e(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class ContextMenuPortal(ContextMenuBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "ContextMenu.Portal"
# A parent elemen... |
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu backdrop component."""
props["data-slot"] = "context-menu-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().... | tag = "ContextMenu.Backdrop" |
l(ContextMenuBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "ContextMenu.Portal"
# A parent element to render the portal element into. Defaults to document.body.
container: Var[str]
# Whether ... |
class ContextMenuPositioner(ContextMenuBaseComponent):
"""Positions the context menu popup against the trigger. Renders a <div> element."""
tag = "ContextMenu.Positioner"
# Determines how to handle collisions when positioning the popup.
collision_avoidance: Var[LiteralCollisionAvoidance]
# How... | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu backdrop component."""
props["data-slot"] = "context-menu-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props) |
portal element is appended to <body>."""
tag = "ContextMenu.Portal"
# A parent element to render the portal element into. Defaults to document.body.
container: Var[str]
# Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False.
keep_mounted: Var[bool]
@clas... |
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props)
class ContextMenuPositioner(ContextMenuBaseComponent):
"""Positions the context menu popup against the trigger. Renders a <div> element."""
tag = "ContextMenu.Positioner"
# Determines how to handle ... | props["data-slot"] = "context-menu-backdrop" |
.body.
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 context menu portal component."""
props["data-slot"] =... |
class ContextMenuPopup(ContextMenuBaseComponent):
"""A container for the context menu items. Renders a <div> element."""
tag = "ContextMenu.Popup"
# Determines the element to focus when the context menu is closed. By default, focus returns to the trigger.
final_focus: Var[str]
# The render pro... | class ContextMenuPositioner(ContextMenuBaseComponent):
"""Positions the context menu popup against the trigger. Renders a <div> element."""
tag = "ContextMenu.Positioner"
# Determines how to handle collisions when positioning the popup.
collision_avoidance: Var[LiteralCollisionAvoidance]
# How to... |
ar[bool]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu portal component."""
props["data-slot"] = "context-menu-portal"
cls.set_class_name(ClassNames.PORTAL, props)
return super().create(*children, **props)
class ContextMenuBack... |
# Determines how to handle collisions when positioning the popup.
collision_avoidance: Var[LiteralCollisionAvoidance]
# 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.
... | tag = "ContextMenu.Positioner" |
.
side: Var[LiteralSide]
# Distance between the anchor and the popup in pixels. Defaults to 0.
side_offset: Var[int]
# Minimum distance to maintain between the arrow and the edges of the popup. Defaults to 5.
arrow_padding: Var[int]
# Additional space to maintain from the edge of the collisio... |
class ContextMenuPopup(ContextMenuBaseComponent):
"""A container for the context menu items. Renders a <div> element."""
tag = "ContextMenu.Popup"
# Determines the element to focus when the context menu is closed. By default, focus returns to the trigger.
final_focus: Var[str]
# The render pro... | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu positioner component."""
props["data-slot"] = "context-menu-positioner"
cls.set_class_name(ClassNames.POSITIONER, props)
return super().create(*children, **props) |
[int]
# Minimum distance to maintain between the arrow and the edges of the popup. Defaults to 5.
arrow_padding: Var[int]
# Additional space to maintain from the edge of the collision boundary. Defaults to 5.
collision_padding: Var[int]
# An element or a rectangle that delimits the area that the ... |
cls.set_class_name(ClassNames.POSITIONER, props)
return super().create(*children, **props)
class ContextMenuPopup(ContextMenuBaseComponent):
"""A container for the context menu items. Renders a <div> element."""
tag = "ContextMenu.Popup"
# Determines the element to focus when the contex... | props["data-slot"] = "context-menu-positioner" |
o maintain from the edge of the collision boundary. Defaults to 5.
collision_padding: Var[int]
# An element or a rectangle that delimits the area that the popup is confined to. Defaults to "clipping-ancestors".
collision_boundary: Var[str]
# Whether to maintain the popup in the viewport after the anch... |
class ContextMenuArrow(ContextMenuBaseComponent):
"""Displays an element positioned against the context menu anchor. Renders a <div> element."""
tag = "ContextMenu.Arrow"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
... | class ContextMenuPopup(ContextMenuBaseComponent):
"""A container for the context menu items. Renders a <div> element."""
tag = "ContextMenu.Popup"
# Determines the element to focus when the context menu is closed. By default, focus returns to the trigger.
final_focus: Var[str]
# The render prop.
... |
e that delimits the area that the popup is confined to. Defaults to "clipping-ancestors".
collision_boundary: Var[str]
# Whether to maintain the popup in the viewport after the anchor element was scrolled out of view. Defaults to False.
sticky: Var[bool]
# Whether the popup tracks any layout shift of ... |
# Determines the element to focus when the context menu is closed. By default, focus returns to the trigger.
final_focus: Var[str]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu popup componen... | tag = "ContextMenu.Popup" |
alse.
sticky: Var[bool]
# Whether the popup tracks any layout shift of its positioning anchor. Defaults to True.
track_anchor: Var[bool]
# Determines which CSS position property to use. Defaults to "absolute".
position_method: Var[LiteralPositionMethod]
# The render prop.
render_: Var[Com... |
class ContextMenuArrow(ContextMenuBaseComponent):
"""Displays an element positioned against the context menu anchor. Renders a <div> element."""
tag = "ContextMenu.Arrow"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
... | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu popup component."""
props["data-slot"] = "context-menu-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props) |
e.
track_anchor: Var[bool]
# Determines which CSS position property to use. Defaults to "absolute".
position_method: Var[LiteralPositionMethod]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context men... |
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class ContextMenuArrow(ContextMenuBaseComponent):
"""Displays an element positioned against the context menu anchor. Renders a <div> element."""
tag = "ContextMenu.Arrow"
# The render prop.
render_... | props["data-slot"] = "context-menu-popup" |
ionMethod]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu positioner component."""
props["data-slot"] = "context-menu-positioner"
cls.set_class_name(ClassNames.POSITIONER, props)
... |
class ContextMenuItem(ContextMenuBaseComponent):
"""An individual interactive item in the context menu. Renders a <div> element."""
tag = "ContextMenu.Item"
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
# Whether to close the contex... | class ContextMenuArrow(ContextMenuBaseComponent):
"""Displays an element positioned against the context menu anchor. Renders a <div> element."""
tag = "ContextMenu.Arrow"
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
""... |
eate the context menu positioner component."""
props["data-slot"] = "context-menu-positioner"
cls.set_class_name(ClassNames.POSITIONER, props)
return super().create(*children, **props)
class ContextMenuPopup(ContextMenuBaseComponent):
"""A container for the context menu items. Renders a <d... |
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu arrow component."""
props["data-slot"] = "context-menu-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*c... | tag = "ContextMenu.Arrow" |
"
cls.set_class_name(ClassNames.POSITIONER, props)
return super().create(*children, **props)
class ContextMenuPopup(ContextMenuBaseComponent):
"""A container for the context menu items. Renders a <div> element."""
tag = "ContextMenu.Popup"
# Determines the element to focus when the conte... |
class ContextMenuItem(ContextMenuBaseComponent):
"""An individual interactive item in the context menu. Renders a <div> element."""
tag = "ContextMenu.Item"
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
# Whether to close the contex... | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu arrow component."""
props["data-slot"] = "context-menu-arrow"
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props) |
ntextMenuPopup(ContextMenuBaseComponent):
"""A container for the context menu items. Renders a <div> element."""
tag = "ContextMenu.Popup"
# Determines the element to focus when the context menu is closed. By default, focus returns to the trigger.
final_focus: Var[str]
# The render prop.
rend... |
cls.set_class_name(ClassNames.ARROW, props)
return super().create(*children, **props)
class ContextMenuItem(ContextMenuBaseComponent):
"""An individual interactive item in the context menu. Renders a <div> element."""
tag = "ContextMenu.Item"
# Overrides the text label to use when the i... | props["data-slot"] = "context-menu-arrow" |
"
# Determines the element to focus when the context menu is closed. By default, focus returns to the trigger.
final_focus: Var[str]
# The render prop.
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the context menu popup compone... |
class ContextMenuSeparator(ContextMenuBaseComponent):
"""A separator element accessible to screen readers. Renders a <div> element."""
tag = "ContextMenu.Separator"
# The orientation of the separator. Defaults to "horizontal".
orientation: Var[LiteralMenuOrientation]
# The render prop.
ren... | class ContextMenuItem(ContextMenuBaseComponent):
"""An individual interactive item in the context menu. Renders a <div> element."""
tag = "ContextMenu.Item"
# Overrides the text label to use when the item is matched during keyboard text navigation.
label: Var[str]
# Whether to close the context m... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.