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.create( CheckboxIndicator.create(), *children, **props, ), label, class_name=cn(ClassNames.LABEL, class_name), ) return CheckboxRoot.create( CheckboxIndicator.create(), *children, **props, class_name=class_name, ) class CheckboxNamespace(ComponentNamespace): """Namespace for Checkbox components.""" root = staticmethod(CheckboxRoot.create) indicator = staticmethod(CheckboxIndicator.create) high_level = staticmethod(HighLevelCheckbox.create) class_names = ClassNames
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(), *children, **props, ), label, class_name=cn(ClassNames.LABEL, class_name), ) return CheckboxRoot.create( CheckboxIndicator.create(), *children, **props, class_name=class_name, ) class CheckboxNamespace(ComponentNamespace): """Namespace for Checkbox components.""" root = staticmethod(CheckboxRoot.create) indicator = staticmethod(CheckboxIndicator.create) high_level = staticmethod(HighLevelCheckbox.create) class_names = ClassNames __call__ = staticmethod(HighLevelCheckbox.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-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-0 data-[starting-style]:h-0" 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="", install=False) class CollapsibleRoot(CollapsibleBaseComponent): """Groups all parts of the collapsible. Rende
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 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.""" library = 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. Renders a <div> element.""" tag = "Collapsible.Root" # Wh
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(--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}/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. Renders a <div> element.""" tag = "Collapsible.Root" # Whether the collapsible panel is initially op
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-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}/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. Renders a <div> element.""" tag = "Collapsible.Root" # Whether the collapsible panel is initially open. To render a controlled collap
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]:h-0 data-[starting-style]:h-0" 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="", 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 render a controlled collapsible, use the `open` prop instead. Defaults to False. default_open:
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="", 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 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 when the panel is opened or closed. on_open_change: EventHandler[passthrough_event_spec(bool)] # Whether the component should ignore user interaction.
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-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 class ClassNames: """Class names for collapsible components."""
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.""" library = 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. 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] # Whether the collapsible panel is currently open. To render an uncontrolled collapsible, use the `default_open` pr
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 class ClassNames: """Class names for collapsible components.""" ROOT = "flex flex-col justify-center text-secondary-12"
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}/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. 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] # Whether the collapsible panel is currently open. To render an uncontrolled collapsible, use the `default_open` prop instead. open: Var[bool] # Event h
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 class ClassNames: """Class names for collapsible components.""" ROOT = "flex flex-col justify-center text-secondary-12" TRIGGER = "group flex items-center gap-2"
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="", 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 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 when the panel is opened or closed. on_open_change: EventHandler[passthrough_event_spec(bool)] # Whether the component should ignore user interaction.
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 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-0 data-[starting-style]:h-0"
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] # Whether the collapsible panel is currently open. To render an uncontrolled collapsible, use the `default_open` prop instead. open: Var[bool] # Event handler called when the 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) -> BaseUIComponent: """Create the collapsible root component.""" props["data-slot"] = "collapsible" cls.set_class_name(ClassNames.ROOT, props) return sup
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="", install=False)
"""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 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-0 data-[starting-style]:h-0" class CollapsibleBaseComponent(BaseUIComponent): """Base component for collapsible components."""
@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.""" 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] # Whether the collapsible panel is currently open. To render an uncontrolled collapsible, use the `default_open` prop instead. open: Var[bool] # Event handler called when the 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, **pro
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 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-0 data-[starting-style]:h-0" class CollapsibleBaseComponent(BaseUIComponent): """Base component for collapsible components.""" library = f"{PACKAGE_NAME}/collapsible" @property
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] # Whether the collapsible panel is currently open. To render an uncontrolled collapsible, use the `default_open` prop instead. open: Var[bool] # Event handler called when the 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) -> BaseUIComponent: """Create the collapsible root component.""" props["data-slot"] = "collapsible" cls.set_class_name(ClassNames.ROOT, props) return sup
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" 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.""" library = 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. Renders a <div> element."""
# 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] # Event handler called when the 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) -> BaseUIComponent: """Create the collapsible root component.""" props["data-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. Render
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. 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] # Whether the collapsible panel is currently open. To render an uncontrolled collapsible, use the `default_open` prop instead. open: Var[bool] # Event handler called when the 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
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 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, *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) 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
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 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 when the 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) -> BaseUIComponent: """Create the collapsible root component."""
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 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, *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) class CollapsiblePanel(CollapsibleBaseComponent): """A panel with the collapsible contents. Renders a <div> element.""" tag = "Collapsible.Pane
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 when the 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) -> BaseUIComponent: """Create the collapsible root component.""" props["data-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."""
# 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, *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) 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 the element without removing it from the DOM. Defaults to False. hidden_until_found: Var[bool] # Whether t
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) -> BaseUIComponent: """Create the collapsible root component.""" props["data-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 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
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 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 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 render. render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the collapsible panel component.""" props["data-slot"] = "collapsible-panel"
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_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 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, *children, **props) -> BaseUIComponent: """Create the collapsible trigger component."""
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 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 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 render. render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent:
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 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, *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) class CollapsiblePanel(CollapsibleBaseComponent): """A panel with the collapsible contents. Renders a <div> element."""
# 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 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 render. render_: 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 HighLevelCollapsible(CollapsibleRoot): """High
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" # 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 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 render. render_: Var[Component] @classmethod
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: """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, CollapsiblePanel.create( content, *children, ), **props, ) def _exclude_props(self) -> list[str]: return [ *super()._exclude_props(), "trigger", "content", ] class Collapsible(ComponentNamespace): """Namespace for Collapsible components.""" root = staticmethod(CollapsibleRoot.create) trigge
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` 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 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 render. render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the collapsible panel component."""
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 | 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( CollapsibleTrigger.create(render_=trigger) if trigger else None, CollapsiblePanel.create( content, *children, ), **props, ) def _exclude_props(self) -> list[str]: return [ *super()._exclude_props(), "trigger", "content", ] class Collapsible(ComponentNamespace): "
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 different tag, or compose it with another component. Accepts a `ReactElement` or a function that returns the element to render. render_: 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 HighLevelCollapsible(CollapsibleRoot): """High level collapsible component.""" # The trigger component. trigger: Var[Component | None] # The content component. content: Var[str | Component | None] @classmethod
def _exclude_props(self) -> list[str]: return [ *super()._exclude_props(), "trigger", "content", ] 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.create) collapsible = Collapsible()
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, CollapsiblePanel.create( content, *children, ), **props, )
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 render. render_: 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 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: """Create the collapsible component."""
content = props.pop("content", None) return CollapsibleRoot.create( CollapsibleTrigger.create(render_=trigger) if trigger else None, CollapsiblePanel.create( content, *children, ), **props, ) def _exclude_props(self) -> list[str]: return [ *super()._exclude_props(), "trigger", "content", ] 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.create) collapsible = Collapsible()
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] @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 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: """Create the collapsible component.""" trigger = props.pop("trigger", None)
return CollapsibleRoot.create( CollapsibleTrigger.create(render_=trigger) if trigger else None, CollapsiblePanel.create( content, *children, ), **props, ) def _exclude_props(self) -> list[str]: return [ *super()._exclude_props(), "trigger", "content", ] 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.create) collapsible = Collapsible()
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 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: """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, CollapsiblePanel.create( content, *children, ), **props, )
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.create) collapsible = Collapsible()
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 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) return CollapsibleRoot.create( CollapsibleTrigger.create(render_=trigger) if trigger else None, CollapsiblePanel.create( content, *children, ), **props, ) def _exclude_props(self) -> list[str]: return [ *super()._exclude_props(), "trigger", "content", ]
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.create)
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, *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, CollapsiblePanel.create( content, *children, ), **props, ) def _exclude_props(self) -> list[str]: return [ *super()._exclude_props(), "trigger", "content", ] class Collapsible(ComponentNamespace): """Namespace for Collapsible components."""
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: """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, CollapsiblePanel.create( content, *children, ), **props, ) def _exclude_props(self) -> list[str]: return [ *super()._exclude_props(), "trigger", "content", ] class Collapsible(ComponentNamespace): """Namespace for Collapsible components.""" root = staticmethod(CollapsibleRoot.create)
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.""" trigger = props.pop("trigger", None) content = props.pop("content", None) return CollapsibleRoot.create( CollapsibleTrigger.create(render_=trigger) if trigger else None, CollapsiblePanel.create( content, *children, ), **props, ) def _exclude_props(self) -> list[str]: return [ *super()._exclude_props(), "trigger", "content", ] class Collapsible(ComponentNamespace): """Namespace for Collapsible components.""" root = staticmethod(CollapsibleRoot.create) trigger = staticmethod(CollapsibleTrigger.create)
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 = props.pop("content", None) return CollapsibleRoot.create( CollapsibleTrigger.create(render_=trigger) if trigger else None, CollapsiblePanel.create( content, *children, ), **props, ) def _exclude_props(self) -> list[str]: return [ *super()._exclude_props(), "trigger", "content", ] class Collapsible(ComponentNamespace): """Namespace for Collapsible components.""" root = staticmethod(CollapsibleRoot.create) trigger = staticmethod(CollapsibleTrigger.create) panel = staticmethod(CollapsiblePanel.create)
__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) return CollapsibleRoot.create( CollapsibleTrigger.create(render_=trigger) if trigger else None, CollapsiblePanel.create( content, *children, ), **props, ) def _exclude_props(self) -> list[str]: return [ *super()._exclude_props(), "trigger", "content", ] class Collapsible(ComponentNamespace): """Namespace for Collapsible components.""" root = staticmethod(CollapsibleRoot.create) trigger = staticmethod(CollapsibleTrigger.create) panel = staticmethod(CollapsiblePanel.create) class_names = ClassNames
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( CollapsibleTrigger.create(render_=trigger) if trigger else None, CollapsiblePanel.create( content, *children, ), **props, ) def _exclude_props(self) -> list[str]: return [ *super()._exclude_props(), "trigger", "content", ] 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.create)
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 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", "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", "lg", "xl"] class ClassNames: """Class names for context menu components."""
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 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"] 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-context-menu" PORTAL = "relative" BACKDROP =
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 LiteralOpenChangeReason = Literal[ "arrowKey", "escapeKey", "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"] 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
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", "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"] 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.25rem] overflow-y-auto origin-(--transform-origin) p-1 border
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", "dismiss", "typeahead", "tab", ] 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", "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 border-secondary-a4 bg-secondary-1 shadow-
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", "tab", ] 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", "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 border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale
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 Var
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", "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", "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 border-secondary-a4 bg-secondary-1 shadow-large transition-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting
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 Var from reflex_ui.components.base.button import button
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"] 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-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-[transform,scale,opacity] data-[ending-style]:scale-95 data-[starting-style]:scale-95 data-[ending-style]:opacity-0 data-[starting-style]:op
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 Var from reflex_ui.components.base.button import button from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
LiteralOpenChangeReason = Literal[ "arrowKey", "escapeKey", "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"] 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.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 scrollbar-thin scr
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 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
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", "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 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-transparent min-w-36" ITEM = "grid w-full items-center gap-2 text-sm select-none font-medium text-secondary-12 cursor-poin
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 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", "dismiss", "typeahead", "tab", ]
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 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-[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-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
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 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", "dismiss", "typeahead", "tab", ] LiteralMenuOrientation = Literal["vertical", "horizontal"]
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-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-[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-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-
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 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", "dismiss", "typeahead", "tab", ] LiteralMenuOrientation = Literal["vertical", "horizontal"] LiteralSide = Literal["top", "right", "bottom", "left"]
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 = "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 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-start" ITEM_INDICATOR = "text-current" ITEM_TEXT = "text-start" SEPARAT
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 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", "dismiss", "typeahead", "tab", ] LiteralMenuOrientation = Literal["vertical", "horizontal"] LiteralSide = Literal["top", "right", "bottom", "left"] LiteralAlign = Literal["start", "center", "end"]
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.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 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" ITEM_TEXT = "text-start" SEPARATOR = "-mx-1 my-1 h-[0.5px] bg-secondary-a4" ARROW
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 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", "dismiss", "typeahead", "tab", ] LiteralMenuOrientation = Literal["vertical", "horizontal"] LiteralSide = Literal["top", "right", "bottom", "left"] LiteralAlign = Literal["start", "center", "end"] LiteralPositionMethod = Literal["absolute", "fixed"]
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 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-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" 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-[-13
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 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", "dismiss", "typeahead", "tab", ] LiteralMenuOrientation = Literal["vertical", "horizontal"] LiteralSide = Literal["top", "right", "bottom", "left"] LiteralAlign = Literal["start", "center", "end"] LiteralPositionMethod = Literal["absolute", "fixed"] LiteralCollisionAvoidance = Literal["flip", "shift", "auto"]
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-[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-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" 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-[-
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 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", "dismiss", "typeahead", "tab", ] 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", "lg", "xl"]
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="", install=False) 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[bool] # Whether the context menu is currently open. open: Var[bool] # Event handler called when the context menu is opened or closed. on_open_change: EventHandler[passthrough_event_spec(bool, dict)] # A ref to imperative actions. When specified, the context menu will not be unmounted when closed. Instead, the un
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-[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-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" 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 = "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" 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 = "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"
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 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", "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", "lg", "xl"] class ClassNames: """Class names for context menu components."""
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]:opacity-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-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]:bottom-[-8px] data-[side=top]:rotate-180" POSITIONER
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 PACKAGE_NAME, BaseUIComponent 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"] 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-context-menu"
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-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-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]:bottom-[-8px] data-[side=top]:rotate-180" POSITIONER = "outline-none" GRO
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, BaseUIComponent 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"] 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-context-menu" PORTAL = "relative"
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 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" 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 = "outline-none" GROUP = "p-1" GROUP_LABEL = "p
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.twmerge import cn LiteralOpenChangeReason = Literal[ "arrowKey", "escapeKey", "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"] 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"
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" 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-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-current" CHECKBOX_ITEM = "grid min-w-(--anchor-width) grid-cols-[1fr_auto] items-center gap-2 tex
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 scrollbar-thin scrollbar-thumb-secondary-9 scrollbar-track-transparent min-w-36"
", "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"] 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.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 scrollbar-thin scrollbar-thumb-secondary-9 scrollbar-track-transparent min-w-36"
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-[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) 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] 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
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.""" 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-[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-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_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 = "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" 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 = "grid min-w-(--anchor-width) grid-cols-[1
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" 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]:opacity-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-start" ITEM_INDICATOR = "text-current"
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 = "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_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 = "grid min-w-(--anchor-width) grid-cols-[1fr_auto] items-center gap-2 t
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" 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-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-start" ITEM_INDICATOR = "text-current" ITEM_TEXT = "text-start"
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-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-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 = "grid min-w-(--anchor-width) grid-cols-[1fr_auto] items-center gap-2 text-sm select-none font-[450] text-secondary-11 cursor-
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.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 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" ITEM_TEXT = "text-start" SEPARATOR = "-mx-1 my-1 h-[0.5px] bg-secondary-a4"
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-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-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-[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.""" library = f"{PACKAGE_NAME}/context-menu"
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-[ending-style]:opacity-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-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]:bottom-[-8px] data-[side=top]:rotate-180"
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_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 = "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.""" library = f"{PACKAGE_NAME}/context-menu" @property def import_var
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-[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-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]:bottom-[-8px] data-[side=top]:rotate-180" POSITIONER = "outline-none"
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-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 = "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.""" library = f"{PACKAGE_NAME}/context-menu" @property def import_var(self): ""
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 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-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]:bottom-[-8px] data-[side=top]:rotate-180" POSITIONER = "outline-none" GROUP = "p-1"
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) 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-[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.""" library = f"{PACKAGE_NAME}/context-menu" @property def import_var(self): """Return the import variable for the context menu compo
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-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" 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 = "outline-none" GROUP = "p-1" GROUP_LABEL = "px-2 py-1.5 text-sm font-semibold"
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] 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-[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.""" library = f"{PACKAGE_NAME}/context-menu" @property def import_var(self): """Return the import variable for the context menu component.""" retu
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-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" 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 = "outline-none" GROUP = "p-1" GROUP_LABEL = "px-2 py-1.5 text-sm font-semibold" RADIO_GROUP = ""
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 = "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.""" 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="", install=False) class ContextMenuRoot(ContextMenuBaseComponent): """Groups all parts of the context menu. Doesn't render its own HTML element.""" tag
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-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]: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) 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 = "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-[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.""" 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="", install=False) class ContextMenuRoot(ContextMenuBaseComponent): """Groups all parts of the context menu. Doesn't render its own HTML element.""" tag = "ContextMenu.Root" # Whether the co
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" 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 = "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" RADIO_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): """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="", install=False) 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[bool] # Whether the context menu is currently open. open: Var[bool]
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] 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) 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] 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"
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.""" 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="", install=False) 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[bool] # Whether the context menu is currently open. open: Var[bool] # Event handler called when the context
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]: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) 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] 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"
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="", install=False) 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[bool] # Whether the context menu is currently open. open: Var[bool] # Event handler called when the context menu is opened or closed. on_open_change: EventHandler[passthrough_event_spec(bool, dict)] # A ref to imperative actions. When specified, the context menu will not be unmounted when closed. Instead, the un
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) 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] 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-[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: 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_change: EventHandler[passthrough_event_spec(bool, dict)] # A ref to imperative actions. When specified, the context menu 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 only the current child menu. Defaults to True. close_parent_on_esc:
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="", install=False)
"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" 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 = "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.""" library = f"{PACKAGE_NAME}/context-menu" @property
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[bool] # Whether the context menu is currently open. open: Var[bool] # Event handler called when the context menu is opened or closed. on_open_change: EventHandler[passthrough_event_spec(bool, dict)] # A ref to imperative actions. When specified, the context menu 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 only the current child menu. Defaults to True. close_parent_on_esc:
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-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-[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.""" 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="", install=False)
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. 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_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.Portal" # A parent element to render the portal element into. Defaults to document.body. container: Var[str] # Whether to keep the portal m
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[bool] # Whether the context menu is currently open. open: Var[bool] # Event handler called when the context menu is opened or closed. on_open_change: EventHandler[passthrough_event_spec(bool, dict)] # A ref to imperative actions. When specified, the context menu 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 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: EventHandler[passthrough_event_spec(bool)] # 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/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" return super().create(*children, **props)
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_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.""" 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="", install=False) class ContextMenuRoot(ContextMenuBaseComponent): """Groups all parts of the context menu. Doesn't render its own HTML element."""
# 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_change: EventHandler[passthrough_event_spec(bool, dict)] # A ref to imperative actions. When specified, the context menu 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 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: EventHandler[passthrough_event_spec(
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 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: EventHandler[passthrough_event_spec(bool)] # 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/right arrow keys. Defaults to "vertical". orientation: Var[LiteralMenuOrientation] @classmethod
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. 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_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.Portal" # A parent element to render the portal element into. Defaults to document.body. container: Var[str] # Whether to keep the portal m
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 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 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/right arrow keys. Defaults to "vertical". orientation: Var[LiteralMenuOrientation] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the context menu root component."""
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. 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_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.Portal" # A parent element to render the portal element into. Defaults to document.body. conta
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: EventHandler[passthrough_event_spec(bool)] # 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/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" 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 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: """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 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[Componen
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. 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_name(ClassNames.TRIGGER, props) return super().create(*children, **props)
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 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/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" 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."""
# 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"] = "context-menu-trigger" 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.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] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create
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/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" 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. disabled: Var[bool] # The render prop. render_: Var[Component] @classmethod
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: 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"] = "context-menu-portal" 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 render prop. render_: Var[Componen
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, *children, **props) -> 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> 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: """Create the context menu trigger component."""
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.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] @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 ContextMenuBackdrop(ContextMenuBaseComponent): """A backdrop element that covers the entire viewport when the context menu is open. Renders
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" 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. 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_name(ClassNames.TRIGGER, 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 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().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 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
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: 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"] = "context-menu-portal" cls.set_class_name(ClassNames.PORTAL, props) return super().create(*children, **props)
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> 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: """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 portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
# 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: """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 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) -> BaseUIComponent: """Create the context menu backdrop component.""" props["data-slot"] = "context-menu-backdrop" cls.set_class_name(
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: """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 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 to keep the portal mounted in the DOM while the popup is hidden. Defaults to False. keep_mounted: Var[bool] @classmethod
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) -> 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) 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 align the popup relative to the specified side. Defaults to "center". align: Var[LiteralAlign] # Additional offset
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_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.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] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the context menu portal component."""
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 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().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 collisions when positioning the popup. collision_avoidance: Var[LiteralCollisionAvoidance] # How to align the popup relat
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 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 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"] = "context-menu-portal" cls.set_class_name(ClassNames.PORTAL, 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 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. align_offset: Var[int] # Which side of the anchor element to align the popup against. May automatically change to avoid collisions. Defaults to "bottom". 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 collision boundary. Defaults
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) -> 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)
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 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: """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 ContextMenuBackdrop(ContextMenuBaseComponent): """A backdrop element that covers the entire viewport when the context menu is open. Renders a <div> element."""
# 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().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 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. align_offset: Var[int] # Which side of the anchor element to align the popup against. May automatically change to avoid collisions. Defaults to "b
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 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"] = "context-menu-portal" 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 render prop. render_: Var[Component] @classmethod
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 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 collisions. Defaults to "bottom". 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 collision boundary. Defaults
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] @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 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) -> BaseUIComponent: """Create the context menu backdrop component."""
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 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. align_offset: Var[int] # Which side of the anchor element to align the popup against. May automatically change to avoid collisions. Defaults to "bottom". 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. arro
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"] = "context-menu-portal" 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 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().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 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 component.""" props["data-slot"] = "context-menu-popup" 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_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the context menu arrow component."
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 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 collisions. Defaults to "bottom". 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 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 anchor element was scrolled out of view. Defaults to False. 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[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) return super().create(*children, **props)
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 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) -> 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) class ContextMenuPositioner(ContextMenuBaseComponent): """Positions the context menu popup against the trigger. Renders a <div> element."""
# 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. align_offset: Var[int] # Which side of the anchor element to align the popup against. May automatically change to avoid collisions. Defaults to "bottom". 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 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
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 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 anchor element was scrolled out of view. Defaults to False. 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[Component] @classmethod
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. render_: Var[Component] @classmethod 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) 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: """Create the context menu arrow component."
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 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 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[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the context menu positioner component."""
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 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 component.""" props["data-slot"] = "context-menu-popup" 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_: Var[Component] @classmethod d
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 anchor element was scrolled out of view. Defaults to False. 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[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) 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_: 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(*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 item is matched during keyboard text navigation. label: Var[str] # Whether to close the context menu when the item is clicked. Defaults to True. close_on_click: Var[bool] # Whether the component renders a native button element when replacing it v
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. render_: Var[Component] @classmethod 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 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 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[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) return super().create(*children, **props) class ContextMenuPopup(ContextMenuBaseComponent): """A container for the context menu items. Renders a <div> element."""
# 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 component.""" props["data-slot"] = "context-menu-popup" 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_: 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(*children, **props) c
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[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) 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 context menu is closed. By default, focus returns to the trigger. final_focus: Var[str] # The render prop. render_: Var[Component] @classmethod
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: """Create the context menu arrow component.""" props["data-slot"] = "context-menu-arrow" 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 item is matched during keyboard text navigation. label: Var[str] # Whether to close the context menu when the item is clicked. Defaults to True. close_on_click: Var[bool] # Whether the component renders a native button element when replacing it v
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 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 <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. render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the context menu popup component."""
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_: 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(*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 item is matched during keyboard text navigation. label: Var[str] # Whether to close the context menu when the item is clicked. Defaults to True. clos
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) 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 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 component.""" props["data-slot"] = "context-menu-popup" cls.set_class_name(ClassNames.POPUP, 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 item is matched during keyboard text navigation. label: Var[str] # Whether to close the context menu when the item is clicked. Defaults to True. close_on_click: Var[bool] # Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False. native_button: Var[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) -> BaseUIComponent: """Create the context menu item component.""" props["data-slot"] = "context-menu-item" cls.set_class_name(ClassNames.ITEM, props)
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: """Create the context menu arrow component.""" props["data-slot"] = "context-menu-arrow" cls.set_class_name(ClassNames.ARROW, props) return super().create(*children, **props)
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 <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. render_: Var[Component] @classmethod 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) class ContextMenuArrow(ContextMenuBaseComponent): """Displays an element positioned against the context menu anchor. Renders a <div> element."""
# 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(*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 item is matched during keyboard text navigation. label: Var[str] # Whether to close the context menu when the item is clicked. Defaults to True. close_on_click: Var[bool] # Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False. native_button: Var[bool] # Whether the component should ignore user interactio
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 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 component.""" props["data-slot"] = "context-menu-popup" 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_: Var[Component] @classmethod
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 menu when the item is clicked. Defaults to True. close_on_click: Var[bool] # Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False. native_button: Var[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) -> BaseUIComponent: """Create the context menu item component.""" props["data-slot"] = "context-menu-item" cls.set_class_name(ClassNames.ITEM, props)
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. render_: Var[Component] @classmethod 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) 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: """Create the context menu arrow component."""
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 item is matched during keyboard text navigation. label: Var[str] # Whether to close the context menu when the item is clicked. Defaults to True. close_on_click: Var[bool] # Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False. native_button: Var[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) -> BaseUIComponent: """Create the context menu item component."""
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 component.""" props["data-slot"] = "context-menu-popup" 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_: 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(*children, **props)
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. render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the context menu separator component.""" props["data-slot"] = "context-menu-separator" cls.set_class_name(ClassNames.SEPARATOR, props) return super().create(*children, **props) class ContextMenuGroup(ContextMenuBaseComponent): """Groups related context menu items with the corresponding label. Renders a <div> element.""" tag = "ContextMenu.Group" # The render prop. render_: Var[Component] @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the context menu group component
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 menu when the item is clicked. Defaults to True. close_on_click: Var[bool] # Whether the component renders a native button element when replacing it via the render prop. Set to true if the rendered element is a native button. Defaults to False. native_button: Var[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) -> BaseUIComponent: """Create the context menu item component.""" props["data-slot"] = "context-menu-item" cls.set_class_name(ClassNames.ITEM, props) return super().create(*children, **props)