instruction stringlengths 0 1k | input stringlengths 1 1k | output stringlengths 10 6.51k |
|---|---|---|
# Determines whether the dialog should close on outside clicks. Defaults to True.
dismissible: Var[bool]
# Determines if the dialog enters a modal state when open.
# - True: user interaction is limited to just the dialog: focus is trapped, document page scroll is locked, and pointer interactions on outside elements are disabled.
# - False: user interaction with the rest of the document is allowed.
# - 'trap-focus': focus is trapped inside the dialog, but document page scroll is not locked and pointer interactions outside of it remain enabled.
modal: Var[bool | Literal["trap-focus"]]
# Event handler called after any animations complete when the dialog is opened or closed.
on_open_change_complete: EventHandler[passthrough_event_spec(bool)]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog root component."""
props["data-slot"] = "dialog"
return super().create(*children, **props)
|
class DialogPortal(DialogBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "Dialog.Portal"
# A parent element to render the portal element into.
container: Var[str]
# Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False.
keep_mounted: Var[bool]
class DialogBackdrop(DialogBaseComponent):
"""An overlay displayed beneath the popup. Renders a <div> element."""
tag = "Dialog.Backdrop"
# Whether the backdrop is forced to render even when nested. Defaults to False.
force_render: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog backdrop component."""
props["data-slot"] = "dialog-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, | class DialogTrigger(DialogBaseComponent):
"""A button that opens the dialog. Renders a <button> element."""
tag = "Dialog.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 dialog trigger component."""
props["data-slot"] = "dialog-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props) |
Determines if the dialog enters a modal state when open.
# - True: user interaction is limited to just the dialog: focus is trapped, document page scroll is locked, and pointer interactions on outside elements are disabled.
# - False: user interaction with the rest of the document is allowed.
# - 'trap-focus': focus is trapped inside the dialog, but document page scroll is not locked and pointer interactions outside of it remain enabled.
modal: Var[bool | Literal["trap-focus"]]
# Event handler called after any animations complete when the dialog is opened or closed.
on_open_change_complete: EventHandler[passthrough_event_spec(bool)]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog root component."""
props["data-slot"] = "dialog"
return super().create(*children, **props)
class DialogTrigger(DialogBaseComponent):
"""A button that opens the dialog. 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 dialog trigger component."""
props["data-slot"] = "dialog-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class DialogPortal(DialogBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "Dialog.Portal"
# A parent element to render the portal element into.
container: Var[str]
# Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False.
keep_mounted: Var[bool]
class DialogBackdrop(DialogBaseCompon | tag = "Dialog.Trigger" |
trap-focus': focus is trapped inside the dialog, but document page scroll is not locked and pointer interactions outside of it remain enabled.
modal: Var[bool | Literal["trap-focus"]]
# Event handler called after any animations complete when the dialog is opened or closed.
on_open_change_complete: EventHandler[passthrough_event_spec(bool)]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog root component."""
props["data-slot"] = "dialog"
return super().create(*children, **props)
class DialogTrigger(DialogBaseComponent):
"""A button that opens the dialog. Renders a <button> element."""
tag = "Dialog.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 DialogPortal(DialogBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "Dialog.Portal"
# A parent element to render the portal element into.
container: Var[str]
# Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False.
keep_mounted: Var[bool]
class DialogBackdrop(DialogBaseComponent):
"""An overlay displayed beneath the popup. Renders a <div> element."""
tag = "Dialog.Backdrop"
# Whether the backdrop is forced to render even when nested. Defaults to False.
force_render: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog backdrop component."""
props["data-slot"] = "dialog-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "dialog-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props) |
tside of it remain enabled.
modal: Var[bool | Literal["trap-focus"]]
# Event handler called after any animations complete when the dialog is opened or closed.
on_open_change_complete: EventHandler[passthrough_event_spec(bool)]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog root component."""
props["data-slot"] = "dialog"
return super().create(*children, **props)
class DialogTrigger(DialogBaseComponent):
"""A button that opens the dialog. Renders a <button> element."""
tag = "Dialog.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 dialog trigger component."""
|
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class DialogPortal(DialogBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "Dialog.Portal"
# A parent element to render the portal element into.
container: Var[str]
# Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False.
keep_mounted: Var[bool]
class DialogBackdrop(DialogBaseComponent):
"""An overlay displayed beneath the popup. Renders a <div> element."""
tag = "Dialog.Backdrop"
# Whether the backdrop is forced to render even when nested. Defaults to False.
force_render: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog backdrop component."""
props["data-slot"] = "dialog-b | props["data-slot"] = "dialog-trigger" |
og is opened or closed.
on_open_change_complete: EventHandler[passthrough_event_spec(bool)]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog root component."""
props["data-slot"] = "dialog"
return super().create(*children, **props)
class DialogTrigger(DialogBaseComponent):
"""A button that opens the dialog. Renders a <button> element."""
tag = "Dialog.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 dialog trigger component."""
props["data-slot"] = "dialog-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
|
class DialogBackdrop(DialogBaseComponent):
"""An overlay displayed beneath the popup. Renders a <div> element."""
tag = "Dialog.Backdrop"
# Whether the backdrop is forced to render even when nested. Defaults to False.
force_render: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog backdrop component."""
props["data-slot"] = "dialog-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props)
class DialogPopup(DialogBaseComponent):
"""A container for the dialog contents. Renders a <div> element."""
tag = "Dialog.Popup"
# Determines the element to focus when the dialog is opened. By default, the first focusable element is focused.
initial_focus: Var[str]
# Determines the element to focus when the dialog is closed. By default, focus returns to the trigger.
final_ | class DialogPortal(DialogBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "Dialog.Portal"
# A parent element to render the portal element into.
container: Var[str]
# Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False.
keep_mounted: Var[bool] |
"""Create the dialog root component."""
props["data-slot"] = "dialog"
return super().create(*children, **props)
class DialogTrigger(DialogBaseComponent):
"""A button that opens the dialog. Renders a <button> element."""
tag = "Dialog.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 dialog trigger component."""
props["data-slot"] = "dialog-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class DialogPortal(DialogBaseComponent):
"""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.
container: Var[str]
# Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False.
keep_mounted: Var[bool]
class DialogBackdrop(DialogBaseComponent):
"""An overlay displayed beneath the popup. Renders a <div> element."""
tag = "Dialog.Backdrop"
# Whether the backdrop is forced to render even when nested. Defaults to False.
force_render: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog backdrop component."""
props["data-slot"] = "dialog-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props)
class DialogPopup(DialogBaseComponent):
"""A container for the dialog contents. Renders a <div> element."""
tag = "Dialog.Popup"
# Determines the element to focus when the dialog | tag = "Dialog.Portal" |
ement."""
tag = "Dialog.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 dialog trigger component."""
props["data-slot"] = "dialog-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class DialogPortal(DialogBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "Dialog.Portal"
# A parent element to render the portal element into.
container: Var[str]
# Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False.
keep_mounted: Var[bool]
|
class DialogPopup(DialogBaseComponent):
"""A container for the dialog contents. Renders a <div> element."""
tag = "Dialog.Popup"
# Determines the element to focus when the dialog is opened. By default, the first focusable element is focused.
initial_focus: Var[str]
# Determines the element to focus when the dialog 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 dialog popup component."""
props["data-slot"] = "dialog-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class DialogTitle(DialogBaseComponent):
"""A heading that labels the dialog. Renders an <h2> element."""
tag = "Dialog.Title"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUI | class DialogBackdrop(DialogBaseComponent):
"""An overlay displayed beneath the popup. Renders a <div> element."""
tag = "Dialog.Backdrop"
# Whether the backdrop is forced to render even when nested. Defaults to False.
force_render: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog backdrop component."""
props["data-slot"] = "dialog-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props) |
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 dialog trigger component."""
props["data-slot"] = "dialog-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class DialogPortal(DialogBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "Dialog.Portal"
# A parent element to render the portal element into.
container: Var[str]
# Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False.
keep_mounted: Var[bool]
class DialogBackdrop(DialogBaseComponent):
"""An overlay displayed beneath the popup. Renders a <div> element."""
|
# Whether the backdrop is forced to render even when nested. Defaults to False.
force_render: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog backdrop component."""
props["data-slot"] = "dialog-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props)
class DialogPopup(DialogBaseComponent):
"""A container for the dialog contents. Renders a <div> element."""
tag = "Dialog.Popup"
# Determines the element to focus when the dialog is opened. By default, the first focusable element is focused.
initial_focus: Var[str]
# Determines the element to focus when the dialog 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:
| tag = "Dialog.Backdrop" |
eate(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog trigger component."""
props["data-slot"] = "dialog-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class DialogPortal(DialogBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "Dialog.Portal"
# A parent element to render the portal element into.
container: Var[str]
# Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False.
keep_mounted: Var[bool]
class DialogBackdrop(DialogBaseComponent):
"""An overlay displayed beneath the popup. Renders a <div> element."""
tag = "Dialog.Backdrop"
# Whether the backdrop is forced to render even when nested. Defaults to False.
force_render: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
|
class DialogPopup(DialogBaseComponent):
"""A container for the dialog contents. Renders a <div> element."""
tag = "Dialog.Popup"
# Determines the element to focus when the dialog is opened. By default, the first focusable element is focused.
initial_focus: Var[str]
# Determines the element to focus when the dialog 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 dialog popup component."""
props["data-slot"] = "dialog-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class DialogTitle(DialogBaseComponent):
"""A heading that labels the dialog. Renders an <h2> element."""
tag = "Dialog.Title"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUI | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog backdrop component."""
props["data-slot"] = "dialog-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props) |
data-slot"] = "dialog-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class DialogPortal(DialogBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "Dialog.Portal"
# A parent element to render the portal element into.
container: Var[str]
# Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False.
keep_mounted: Var[bool]
class DialogBackdrop(DialogBaseComponent):
"""An overlay displayed beneath the popup. Renders a <div> element."""
tag = "Dialog.Backdrop"
# Whether the backdrop is forced to render even when nested. Defaults to False.
force_render: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog backdrop component."""
|
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props)
class DialogPopup(DialogBaseComponent):
"""A container for the dialog contents. Renders a <div> element."""
tag = "Dialog.Popup"
# Determines the element to focus when the dialog is opened. By default, the first focusable element is focused.
initial_focus: Var[str]
# Determines the element to focus when the dialog 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 dialog popup component."""
props["data-slot"] = "dialog-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class DialogTitle(DialogBaseComponent):
"""A heading that labels the dialog. Renders an <h2> element."""
tag = "Dialog.Title"
# The re | props["data-slot"] = "dialog-backdrop" |
logPortal(DialogBaseComponent):
"""A portal element that moves the popup to a different part of the DOM. By default, the portal element is appended to <body>."""
tag = "Dialog.Portal"
# A parent element to render the portal element into.
container: Var[str]
# Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False.
keep_mounted: Var[bool]
class DialogBackdrop(DialogBaseComponent):
"""An overlay displayed beneath the popup. Renders a <div> element."""
tag = "Dialog.Backdrop"
# Whether the backdrop is forced to render even when nested. Defaults to False.
force_render: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog backdrop component."""
props["data-slot"] = "dialog-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props)
|
class DialogTitle(DialogBaseComponent):
"""A heading that labels the dialog. Renders an <h2> element."""
tag = "Dialog.Title"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog title component."""
props["data-slot"] = "dialog-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DialogDescription(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element.."""
tag = "Dialog.Description"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog description component."""
props["data-slot"] = "dialog-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
class DialogClose(Dial | class DialogPopup(DialogBaseComponent):
"""A container for the dialog contents. Renders a <div> element."""
tag = "Dialog.Popup"
# Determines the element to focus when the dialog is opened. By default, the first focusable element is focused.
initial_focus: Var[str]
# Determines the element to focus when the dialog 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 dialog popup component."""
props["data-slot"] = "dialog-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props) |
lt, the portal element is appended to <body>."""
tag = "Dialog.Portal"
# A parent element to render the portal element into.
container: Var[str]
# Whether to keep the portal mounted in the DOM while the popup is hidden. Defaults to False.
keep_mounted: Var[bool]
class DialogBackdrop(DialogBaseComponent):
"""An overlay displayed beneath the popup. Renders a <div> element."""
tag = "Dialog.Backdrop"
# Whether the backdrop is forced to render even when nested. Defaults to False.
force_render: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog backdrop component."""
props["data-slot"] = "dialog-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props)
class DialogPopup(DialogBaseComponent):
"""A container for the dialog contents. Renders a <div> element."""
|
# Determines the element to focus when the dialog is opened. By default, the first focusable element is focused.
initial_focus: Var[str]
# Determines the element to focus when the dialog 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 dialog popup component."""
props["data-slot"] = "dialog-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class DialogTitle(DialogBaseComponent):
"""A heading that labels the dialog. Renders an <h2> element."""
tag = "Dialog.Title"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog title component."""
props["data-slot"] = "dialog-title"
cls.set_class_name(ClassName | tag = "Dialog.Popup" |
up. Renders a <div> element."""
tag = "Dialog.Backdrop"
# Whether the backdrop is forced to render even when nested. Defaults to False.
force_render: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog backdrop component."""
props["data-slot"] = "dialog-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props)
class DialogPopup(DialogBaseComponent):
"""A container for the dialog contents. Renders a <div> element."""
tag = "Dialog.Popup"
# Determines the element to focus when the dialog is opened. By default, the first focusable element is focused.
initial_focus: Var[str]
# Determines the element to focus when the dialog is closed. By default, focus returns to the trigger.
final_focus: Var[str]
# The render prop
render_: Var[Component]
@classmethod
|
class DialogTitle(DialogBaseComponent):
"""A heading that labels the dialog. Renders an <h2> element."""
tag = "Dialog.Title"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog title component."""
props["data-slot"] = "dialog-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DialogDescription(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element.."""
tag = "Dialog.Description"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog description component."""
props["data-slot"] = "dialog-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
class DialogClose(Dial | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog popup component."""
props["data-slot"] = "dialog-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props) |
when nested. Defaults to False.
force_render: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog backdrop component."""
props["data-slot"] = "dialog-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props)
class DialogPopup(DialogBaseComponent):
"""A container for the dialog contents. Renders a <div> element."""
tag = "Dialog.Popup"
# Determines the element to focus when the dialog is opened. By default, the first focusable element is focused.
initial_focus: Var[str]
# Determines the element to focus when the dialog 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 dialog popup component."""
|
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class DialogTitle(DialogBaseComponent):
"""A heading that labels the dialog. Renders an <h2> element."""
tag = "Dialog.Title"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog title component."""
props["data-slot"] = "dialog-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DialogDescription(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element.."""
tag = "Dialog.Description"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog description component."""
props["data-slot"] = "dialog-description"
cls.set_class_name(Cla | props["data-slot"] = "dialog-popup" |
eate(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog backdrop component."""
props["data-slot"] = "dialog-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props)
class DialogPopup(DialogBaseComponent):
"""A container for the dialog contents. Renders a <div> element."""
tag = "Dialog.Popup"
# Determines the element to focus when the dialog is opened. By default, the first focusable element is focused.
initial_focus: Var[str]
# Determines the element to focus when the dialog 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 dialog popup component."""
props["data-slot"] = "dialog-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
|
class DialogDescription(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element.."""
tag = "Dialog.Description"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog description component."""
props["data-slot"] = "dialog-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
class DialogClose(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element."""
tag = "Dialog.Close"
# 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) - | class DialogTitle(DialogBaseComponent):
"""A heading that labels the dialog. Renders an <h2> element."""
tag = "Dialog.Title"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog title component."""
props["data-slot"] = "dialog-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props) |
s["data-slot"] = "dialog-backdrop"
cls.set_class_name(ClassNames.BACKDROP, props)
return super().create(*children, **props)
class DialogPopup(DialogBaseComponent):
"""A container for the dialog contents. Renders a <div> element."""
tag = "Dialog.Popup"
# Determines the element to focus when the dialog is opened. By default, the first focusable element is focused.
initial_focus: Var[str]
# Determines the element to focus when the dialog 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 dialog popup component."""
props["data-slot"] = "dialog-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class DialogTitle(DialogBaseComponent):
"""A heading that labels the dialog. Renders an <h2> element."""
|
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog title component."""
props["data-slot"] = "dialog-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DialogDescription(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element.."""
tag = "Dialog.Description"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog description component."""
props["data-slot"] = "dialog-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
class DialogClose(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element."""
tag = "Dialog.Close"
| tag = "Dialog.Title" |
return super().create(*children, **props)
class DialogPopup(DialogBaseComponent):
"""A container for the dialog contents. Renders a <div> element."""
tag = "Dialog.Popup"
# Determines the element to focus when the dialog is opened. By default, the first focusable element is focused.
initial_focus: Var[str]
# Determines the element to focus when the dialog 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 dialog popup component."""
props["data-slot"] = "dialog-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class DialogTitle(DialogBaseComponent):
"""A heading that labels the dialog. Renders an <h2> element."""
tag = "Dialog.Title"
# The render prop
render_: Var[Component]
@classmethod
|
class DialogDescription(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element.."""
tag = "Dialog.Description"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog description component."""
props["data-slot"] = "dialog-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
class DialogClose(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element."""
tag = "Dialog.Close"
# 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) - | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog title component."""
props["data-slot"] = "dialog-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props) |
e dialog contents. Renders a <div> element."""
tag = "Dialog.Popup"
# Determines the element to focus when the dialog is opened. By default, the first focusable element is focused.
initial_focus: Var[str]
# Determines the element to focus when the dialog 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 dialog popup component."""
props["data-slot"] = "dialog-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class DialogTitle(DialogBaseComponent):
"""A heading that labels the dialog. Renders an <h2> element."""
tag = "Dialog.Title"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog title component."""
|
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DialogDescription(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element.."""
tag = "Dialog.Description"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog description component."""
props["data-slot"] = "dialog-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
class DialogClose(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element."""
tag = "Dialog.Close"
# 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]
# T | props["data-slot"] = "dialog-title" |
y default, the first focusable element is focused.
initial_focus: Var[str]
# Determines the element to focus when the dialog 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 dialog popup component."""
props["data-slot"] = "dialog-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class DialogTitle(DialogBaseComponent):
"""A heading that labels the dialog. Renders an <h2> element."""
tag = "Dialog.Title"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog title component."""
props["data-slot"] = "dialog-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
|
class DialogClose(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element."""
tag = "Dialog.Close"
# 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 dialog close component."""
props["data-slot"] = "dialog-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class HighLevelDialog(DialogRoot):
"""High level dialog component."""
# Dialog props
trigger: Var[Component | None]
content: Var[str | Component | None]
title: Var[str | Component | None]
description: Var[str | Component | None]
@classmethod
def create(cls, *child | class DialogDescription(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element.."""
tag = "Dialog.Description"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog description component."""
props["data-slot"] = "dialog-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props) |
. 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 dialog popup component."""
props["data-slot"] = "dialog-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class DialogTitle(DialogBaseComponent):
"""A heading that labels the dialog. Renders an <h2> element."""
tag = "Dialog.Title"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog title component."""
props["data-slot"] = "dialog-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DialogDescription(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element.."""
|
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog description component."""
props["data-slot"] = "dialog-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
class DialogClose(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element."""
tag = "Dialog.Close"
# 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 dialog close component."""
props["data-slot"] = "dialog-close"
cls.set_class_name(ClassNames.CLOSE, props)
| tag = "Dialog.Description" |
der_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog popup component."""
props["data-slot"] = "dialog-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class DialogTitle(DialogBaseComponent):
"""A heading that labels the dialog. Renders an <h2> element."""
tag = "Dialog.Title"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog title component."""
props["data-slot"] = "dialog-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DialogDescription(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element.."""
tag = "Dialog.Description"
# The render prop
render_: Var[Component]
@classmethod
|
class DialogClose(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element."""
tag = "Dialog.Close"
# 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 dialog close component."""
props["data-slot"] = "dialog-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class HighLevelDialog(DialogRoot):
"""High level dialog component."""
# Dialog props
trigger: Var[Component | None]
content: Var[str | Component | None]
title: Var[str | Component | None]
description: Var[str | Component | None]
@classmethod
def create(cls, *child | def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog description component."""
props["data-slot"] = "dialog-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props) |
e dialog popup component."""
props["data-slot"] = "dialog-popup"
cls.set_class_name(ClassNames.POPUP, props)
return super().create(*children, **props)
class DialogTitle(DialogBaseComponent):
"""A heading that labels the dialog. Renders an <h2> element."""
tag = "Dialog.Title"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog title component."""
props["data-slot"] = "dialog-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DialogDescription(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element.."""
tag = "Dialog.Description"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog description component."""
|
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
class DialogClose(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element."""
tag = "Dialog.Close"
# 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 dialog close component."""
props["data-slot"] = "dialog-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class HighLevelDialog(DialogRoot):
"""High level dialog component."""
# Dialog props
trigger: Var[Component | None]
content: Var[str | Component | None]
title: Var[str | | props["data-slot"] = "dialog-description" |
te(*children, **props)
class DialogTitle(DialogBaseComponent):
"""A heading that labels the dialog. Renders an <h2> element."""
tag = "Dialog.Title"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog title component."""
props["data-slot"] = "dialog-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DialogDescription(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element.."""
tag = "Dialog.Description"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog description component."""
props["data-slot"] = "dialog-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
|
class HighLevelDialog(DialogRoot):
"""High level dialog component."""
# Dialog props
trigger: Var[Component | None]
content: Var[str | Component | None]
title: Var[str | Component | None]
description: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog component."""
trigger = props.pop("trigger", None)
content = props.pop("content", None)
title = props.pop("title", None)
description = props.pop("description", None)
class_name = props.pop("class_name", "")
return DialogRoot.create(
DialogTrigger.create(render_=trigger) if trigger is not None else None,
DialogPortal.create(
DialogBackdrop.create(),
DialogPopup.create(
Div.create(
Div.create(
DialogTitle.create(title) if title is not None else None,
| class DialogClose(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element."""
tag = "Dialog.Close"
# 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 dialog close component."""
props["data-slot"] = "dialog-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props) |
tag = "Dialog.Title"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog title component."""
props["data-slot"] = "dialog-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DialogDescription(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element.."""
tag = "Dialog.Description"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog description component."""
props["data-slot"] = "dialog-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
class DialogClose(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> 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 dialog close component."""
props["data-slot"] = "dialog-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class HighLevelDialog(DialogRoot):
"""High level dialog component."""
# Dialog props
trigger: Var[Component | None]
content: Var[str | Component | None]
title: Var[str | Component | None]
description: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog component."""
trigger = props.pop("trigger", None)
content = props.pop("content" | tag = "Dialog.Close" |
rn super().create(*children, **props)
class DialogDescription(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element.."""
tag = "Dialog.Description"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog description component."""
props["data-slot"] = "dialog-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
class DialogClose(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element."""
tag = "Dialog.Close"
# 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 HighLevelDialog(DialogRoot):
"""High level dialog component."""
# Dialog props
trigger: Var[Component | None]
content: Var[str | Component | None]
title: Var[str | Component | None]
description: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog component."""
trigger = props.pop("trigger", None)
content = props.pop("content", None)
title = props.pop("title", None)
description = props.pop("description", None)
class_name = props.pop("class_name", "")
return DialogRoot.create(
DialogTrigger.create(render_=trigger) if trigger is not None else None,
DialogPortal.create(
DialogBackdrop.create(),
DialogPopup.create(
Div.create(
Div.create(
DialogTitle.create(title) if title is not None else None,
| def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog close component."""
props["data-slot"] = "dialog-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props) |
itional information about the dialog. Renders a <p> element.."""
tag = "Dialog.Description"
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog description component."""
props["data-slot"] = "dialog-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
class DialogClose(DialogBaseComponent):
"""A paragraph with additional information about the dialog. Renders a <p> element."""
tag = "Dialog.Close"
# 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 dialog close component."""
|
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class HighLevelDialog(DialogRoot):
"""High level dialog component."""
# Dialog props
trigger: Var[Component | None]
content: Var[str | Component | None]
title: Var[str | Component | None]
description: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog component."""
trigger = props.pop("trigger", None)
content = props.pop("content", None)
title = props.pop("title", None)
description = props.pop("description", None)
class_name = props.pop("class_name", "")
return DialogRoot.create(
DialogTrigger.create(render_=trigger) if trigger is not None else None,
DialogPortal.create(
DialogBackdrop.create(),
DialogPopup.create(
Div.create(
Di | props["data-slot"] = "dialog-close" |
tion about the dialog. Renders a <p> element."""
tag = "Dialog.Close"
# 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 dialog close component."""
props["data-slot"] = "dialog-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class HighLevelDialog(DialogRoot):
"""High level dialog component."""
# Dialog props
trigger: Var[Component | None]
content: Var[str | Component | None]
title: Var[str | Component | None]
description: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog component."""
|
content = props.pop("content", None)
title = props.pop("title", None)
description = props.pop("description", None)
class_name = props.pop("class_name", "")
return DialogRoot.create(
DialogTrigger.create(render_=trigger) if trigger is not None else None,
DialogPortal.create(
DialogBackdrop.create(),
DialogPopup.create(
Div.create(
Div.create(
DialogTitle.create(title) if title is not None else None,
DialogClose.create(
render_=button(
hi("Cancel01Icon"),
variant="ghost",
size="icon-sm",
class_name="text-secondary-11",
),
),
class_nam | trigger = props.pop("trigger", None) |
"""
tag = "Dialog.Close"
# 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 dialog close component."""
props["data-slot"] = "dialog-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class HighLevelDialog(DialogRoot):
"""High level dialog component."""
# Dialog props
trigger: Var[Component | None]
content: Var[str | Component | None]
title: Var[str | Component | None]
description: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog component."""
trigger = props.pop("trigger", None)
|
title = props.pop("title", None)
description = props.pop("description", None)
class_name = props.pop("class_name", "")
return DialogRoot.create(
DialogTrigger.create(render_=trigger) if trigger is not None else None,
DialogPortal.create(
DialogBackdrop.create(),
DialogPopup.create(
Div.create(
Div.create(
DialogTitle.create(title) if title is not None else None,
DialogClose.create(
render_=button(
hi("Cancel01Icon"),
variant="ghost",
size="icon-sm",
class_name="text-secondary-11",
),
),
class_name="flex flex-row justify-between items-baseli | content = props.pop("content", None) |
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 dialog close component."""
props["data-slot"] = "dialog-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class HighLevelDialog(DialogRoot):
"""High level dialog component."""
# Dialog props
trigger: Var[Component | None]
content: Var[str | Component | None]
title: Var[str | Component | None]
description: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog component."""
trigger = props.pop("trigger", None)
content = props.pop("content", None)
|
description = props.pop("description", None)
class_name = props.pop("class_name", "")
return DialogRoot.create(
DialogTrigger.create(render_=trigger) if trigger is not None else None,
DialogPortal.create(
DialogBackdrop.create(),
DialogPopup.create(
Div.create(
Div.create(
DialogTitle.create(title) if title is not None else None,
DialogClose.create(
render_=button(
hi("Cancel01Icon"),
variant="ghost",
size="icon-sm",
class_name="text-secondary-11",
),
),
class_name="flex flex-row justify-between items-baseline gap-1",
),
| title = props.pop("title", None) |
lement 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 dialog close component."""
props["data-slot"] = "dialog-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class HighLevelDialog(DialogRoot):
"""High level dialog component."""
# Dialog props
trigger: Var[Component | None]
content: Var[str | Component | None]
title: Var[str | Component | None]
description: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog component."""
trigger = props.pop("trigger", None)
content = props.pop("content", None)
title = props.pop("title", None)
|
class_name = props.pop("class_name", "")
return DialogRoot.create(
DialogTrigger.create(render_=trigger) if trigger is not None else None,
DialogPortal.create(
DialogBackdrop.create(),
DialogPopup.create(
Div.create(
Div.create(
DialogTitle.create(title) if title is not None else None,
DialogClose.create(
render_=button(
hi("Cancel01Icon"),
variant="ghost",
size="icon-sm",
class_name="text-secondary-11",
),
),
class_name="flex flex-row justify-between items-baseline gap-1",
),
(
Di | description = props.pop("description", None) |
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 dialog close component."""
props["data-slot"] = "dialog-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class HighLevelDialog(DialogRoot):
"""High level dialog component."""
# Dialog props
trigger: Var[Component | None]
content: Var[str | Component | None]
title: Var[str | Component | None]
description: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> BaseUIComponent:
"""Create the dialog component."""
trigger = props.pop("trigger", None)
content = props.pop("content", None)
title = props.pop("title", None)
description = props.pop("description", None)
|
return DialogRoot.create(
DialogTrigger.create(render_=trigger) if trigger is not None else None,
DialogPortal.create(
DialogBackdrop.create(),
DialogPopup.create(
Div.create(
Div.create(
DialogTitle.create(title) if title is not None else None,
DialogClose.create(
render_=button(
hi("Cancel01Icon"),
variant="ghost",
size="icon-sm",
class_name="text-secondary-11",
),
),
class_name="flex flex-row justify-between items-baseline gap-1",
),
(
DialogDescription.create(description)
| class_name = props.pop("class_name", "") |
riant="ghost",
size="icon-sm",
class_name="text-secondary-11",
),
),
class_name="flex flex-row justify-between items-baseline gap-1",
),
(
DialogDescription.create(description)
if description is not None
else None
),
data_slot="dialog-header",
class_name=ClassNames.HEADER,
),
Div.create(
content,
data_slot="dialog-content",
class_name=ClassNames.CONTENT,
),
*children,
class_name=class_name,
),
),
**props,
)
|
class Dialog(ComponentNamespace):
"""Namespace for Dialog components."""
root = staticmethod(DialogRoot.create)
trigger = staticmethod(DialogTrigger.create)
portal = staticmethod(DialogPortal.create)
backdrop = staticmethod(DialogBackdrop.create)
popup = staticmethod(DialogPopup.create)
title = staticmethod(DialogTitle.create)
description = staticmethod(DialogDescription.create)
close = staticmethod(DialogClose.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelDialog.create)
dialog = Dialog()
| def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
"title",
"description",
] |
ne gap-1",
),
(
DialogDescription.create(description)
if description is not None
else None
),
data_slot="dialog-header",
class_name=ClassNames.HEADER,
),
Div.create(
content,
data_slot="dialog-content",
class_name=ClassNames.CONTENT,
),
*children,
class_name=class_name,
),
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
"title",
"description",
]
class Dialog(ComponentNamespace):
"""Namespace for Dialog components."""
|
trigger = staticmethod(DialogTrigger.create)
portal = staticmethod(DialogPortal.create)
backdrop = staticmethod(DialogBackdrop.create)
popup = staticmethod(DialogPopup.create)
title = staticmethod(DialogTitle.create)
description = staticmethod(DialogDescription.create)
close = staticmethod(DialogClose.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelDialog.create)
dialog = Dialog()
| root = staticmethod(DialogRoot.create) |
(
DialogDescription.create(description)
if description is not None
else None
),
data_slot="dialog-header",
class_name=ClassNames.HEADER,
),
Div.create(
content,
data_slot="dialog-content",
class_name=ClassNames.CONTENT,
),
*children,
class_name=class_name,
),
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
"title",
"description",
]
class Dialog(ComponentNamespace):
"""Namespace for Dialog components."""
root = staticmethod(DialogRoot.create)
|
portal = staticmethod(DialogPortal.create)
backdrop = staticmethod(DialogBackdrop.create)
popup = staticmethod(DialogPopup.create)
title = staticmethod(DialogTitle.create)
description = staticmethod(DialogDescription.create)
close = staticmethod(DialogClose.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelDialog.create)
dialog = Dialog()
| trigger = staticmethod(DialogTrigger.create) |
DialogDescription.create(description)
if description is not None
else None
),
data_slot="dialog-header",
class_name=ClassNames.HEADER,
),
Div.create(
content,
data_slot="dialog-content",
class_name=ClassNames.CONTENT,
),
*children,
class_name=class_name,
),
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
"title",
"description",
]
class Dialog(ComponentNamespace):
"""Namespace for Dialog components."""
root = staticmethod(DialogRoot.create)
trigger = staticmethod(DialogTrigger.create)
|
backdrop = staticmethod(DialogBackdrop.create)
popup = staticmethod(DialogPopup.create)
title = staticmethod(DialogTitle.create)
description = staticmethod(DialogDescription.create)
close = staticmethod(DialogClose.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelDialog.create)
dialog = Dialog()
| portal = staticmethod(DialogPortal.create) |
if description is not None
else None
),
data_slot="dialog-header",
class_name=ClassNames.HEADER,
),
Div.create(
content,
data_slot="dialog-content",
class_name=ClassNames.CONTENT,
),
*children,
class_name=class_name,
),
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
"title",
"description",
]
class Dialog(ComponentNamespace):
"""Namespace for Dialog components."""
root = staticmethod(DialogRoot.create)
trigger = staticmethod(DialogTrigger.create)
portal = staticmethod(DialogPortal.create)
|
popup = staticmethod(DialogPopup.create)
title = staticmethod(DialogTitle.create)
description = staticmethod(DialogDescription.create)
close = staticmethod(DialogClose.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelDialog.create)
dialog = Dialog()
| backdrop = staticmethod(DialogBackdrop.create) |
else None
),
data_slot="dialog-header",
class_name=ClassNames.HEADER,
),
Div.create(
content,
data_slot="dialog-content",
class_name=ClassNames.CONTENT,
),
*children,
class_name=class_name,
),
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
"title",
"description",
]
class Dialog(ComponentNamespace):
"""Namespace for Dialog components."""
root = staticmethod(DialogRoot.create)
trigger = staticmethod(DialogTrigger.create)
portal = staticmethod(DialogPortal.create)
backdrop = staticmethod(DialogBackdrop.create)
|
title = staticmethod(DialogTitle.create)
description = staticmethod(DialogDescription.create)
close = staticmethod(DialogClose.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelDialog.create)
dialog = Dialog()
| popup = staticmethod(DialogPopup.create) |
),
data_slot="dialog-header",
class_name=ClassNames.HEADER,
),
Div.create(
content,
data_slot="dialog-content",
class_name=ClassNames.CONTENT,
),
*children,
class_name=class_name,
),
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
"title",
"description",
]
class Dialog(ComponentNamespace):
"""Namespace for Dialog components."""
root = staticmethod(DialogRoot.create)
trigger = staticmethod(DialogTrigger.create)
portal = staticmethod(DialogPortal.create)
backdrop = staticmethod(DialogBackdrop.create)
popup = staticmethod(DialogPopup.create)
|
description = staticmethod(DialogDescription.create)
close = staticmethod(DialogClose.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelDialog.create)
dialog = Dialog()
| title = staticmethod(DialogTitle.create) |
lot="dialog-header",
class_name=ClassNames.HEADER,
),
Div.create(
content,
data_slot="dialog-content",
class_name=ClassNames.CONTENT,
),
*children,
class_name=class_name,
),
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
"title",
"description",
]
class Dialog(ComponentNamespace):
"""Namespace for Dialog components."""
root = staticmethod(DialogRoot.create)
trigger = staticmethod(DialogTrigger.create)
portal = staticmethod(DialogPortal.create)
backdrop = staticmethod(DialogBackdrop.create)
popup = staticmethod(DialogPopup.create)
title = staticmethod(DialogTitle.create)
|
close = staticmethod(DialogClose.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelDialog.create)
dialog = Dialog()
| description = staticmethod(DialogDescription.create) |
lassNames.HEADER,
),
Div.create(
content,
data_slot="dialog-content",
class_name=ClassNames.CONTENT,
),
*children,
class_name=class_name,
),
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
"title",
"description",
]
class Dialog(ComponentNamespace):
"""Namespace for Dialog components."""
root = staticmethod(DialogRoot.create)
trigger = staticmethod(DialogTrigger.create)
portal = staticmethod(DialogPortal.create)
backdrop = staticmethod(DialogBackdrop.create)
popup = staticmethod(DialogPopup.create)
title = staticmethod(DialogTitle.create)
description = staticmethod(DialogDescription.create)
|
class_names = ClassNames
__call__ = staticmethod(HighLevelDialog.create)
dialog = Dialog()
| close = staticmethod(DialogClose.create) |
Div.create(
content,
data_slot="dialog-content",
class_name=ClassNames.CONTENT,
),
*children,
class_name=class_name,
),
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
"title",
"description",
]
class Dialog(ComponentNamespace):
"""Namespace for Dialog components."""
root = staticmethod(DialogRoot.create)
trigger = staticmethod(DialogTrigger.create)
portal = staticmethod(DialogPortal.create)
backdrop = staticmethod(DialogBackdrop.create)
popup = staticmethod(DialogPopup.create)
title = staticmethod(DialogTitle.create)
description = staticmethod(DialogDescription.create)
close = staticmethod(DialogClose.create)
|
__call__ = staticmethod(HighLevelDialog.create)
dialog = Dialog()
| class_names = ClassNames |
content,
data_slot="dialog-content",
class_name=ClassNames.CONTENT,
),
*children,
class_name=class_name,
),
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
"title",
"description",
]
class Dialog(ComponentNamespace):
"""Namespace for Dialog components."""
root = staticmethod(DialogRoot.create)
trigger = staticmethod(DialogTrigger.create)
portal = staticmethod(DialogPortal.create)
backdrop = staticmethod(DialogBackdrop.create)
popup = staticmethod(DialogPopup.create)
title = staticmethod(DialogTitle.create)
description = staticmethod(DialogDescription.create)
close = staticmethod(DialogClose.create)
class_names = ClassNames
|
dialog = Dialog()
| __call__ = staticmethod(HighLevelDialog.create) |
data_slot="dialog-content",
class_name=ClassNames.CONTENT,
),
*children,
class_name=class_name,
),
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
"title",
"description",
]
class Dialog(ComponentNamespace):
"""Namespace for Dialog components."""
root = staticmethod(DialogRoot.create)
trigger = staticmethod(DialogTrigger.create)
portal = staticmethod(DialogPortal.create)
backdrop = staticmethod(DialogBackdrop.create)
popup = staticmethod(DialogPopup.create)
title = staticmethod(DialogTitle.create)
description = staticmethod(DialogDescription.create)
close = staticmethod(DialogClose.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelDialog.create)
| dialog = Dialog() | |
"""Custom drawer component."""
|
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.vars.base import Var
from reflex_ui.components.component import CoreComponent
LiteralDirectionType = Literal["top", "bottom", "left", "right"]
class ClassNames:
"""Class names for the drawer component."""
ROOT = ""
TRIGGER = ""
PORTAL = ""
CONTENT = "fixed right-0 bottom-0 z-50 bg-secondary-1 max-w-96 border-l border-secondary-a4 size-full flex"
OVERLAY = "fixed inset-0 z-50 bg-black/50"
CLOSE = ""
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11"
HANDLE = ""
class DrawerBaseComponent(CoreComponent):
"""Base component for drawer components."""
library = "vaul-base@0.0.6"
class DrawerRoot(DrawerBaseComponent):
"""The Root component of a Drawer, contains all parts of a drawer."""
tag = "Drawer.Root"
# The | from collections.abc import Sequence |
"""Custom drawer component."""
from collections.abc import Sequence
|
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.component import CoreComponent
LiteralDirectionType = Literal["top", "bottom", "left", "right"]
class ClassNames:
"""Class names for the drawer component."""
ROOT = ""
TRIGGER = ""
PORTAL = ""
CONTENT = "fixed right-0 bottom-0 z-50 bg-secondary-1 max-w-96 border-l border-secondary-a4 size-full flex"
OVERLAY = "fixed inset-0 z-50 bg-black/50"
CLOSE = ""
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11"
HANDLE = ""
class DrawerBaseComponent(CoreComponent):
"""Base component for drawer components."""
library = "vaul-base@0.0.6"
class DrawerRoot(DrawerBaseComponent):
"""The Root component of a Drawer, contains all parts of a drawer."""
tag = "Drawer.Root"
# The open state of the drawer w | from typing import Literal |
"""Custom drawer component."""
from collections.abc import Sequence
from typing import Literal
|
from reflex.event import EventHandler, passthrough_event_spec
from reflex.vars.base import Var
from reflex_ui.components.component import CoreComponent
LiteralDirectionType = Literal["top", "bottom", "left", "right"]
class ClassNames:
"""Class names for the drawer component."""
ROOT = ""
TRIGGER = ""
PORTAL = ""
CONTENT = "fixed right-0 bottom-0 z-50 bg-secondary-1 max-w-96 border-l border-secondary-a4 size-full flex"
OVERLAY = "fixed inset-0 z-50 bg-black/50"
CLOSE = ""
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11"
HANDLE = ""
class DrawerBaseComponent(CoreComponent):
"""Base component for drawer components."""
library = "vaul-base@0.0.6"
class DrawerRoot(DrawerBaseComponent):
"""The Root component of a Drawer, contains all parts of a drawer."""
tag = "Drawer.Root"
# The open state of the drawer when it is initially rendered. Use when you do not need to control its o | from reflex.components.component import Component, ComponentNamespace |
"""Custom drawer component."""
from collections.abc import Sequence
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
|
from reflex.vars.base import Var
from reflex_ui.components.component import CoreComponent
LiteralDirectionType = Literal["top", "bottom", "left", "right"]
class ClassNames:
"""Class names for the drawer component."""
ROOT = ""
TRIGGER = ""
PORTAL = ""
CONTENT = "fixed right-0 bottom-0 z-50 bg-secondary-1 max-w-96 border-l border-secondary-a4 size-full flex"
OVERLAY = "fixed inset-0 z-50 bg-black/50"
CLOSE = ""
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11"
HANDLE = ""
class DrawerBaseComponent(CoreComponent):
"""Base component for drawer components."""
library = "vaul-base@0.0.6"
class DrawerRoot(DrawerBaseComponent):
"""The Root component of a Drawer, contains all parts of a drawer."""
tag = "Drawer.Root"
# The open state of the drawer when it is initially rendered. Use when you do not need to control its open state.
default_open: Var[bool]
# Whether the draw | from reflex.event import EventHandler, passthrough_event_spec |
"""Custom drawer component."""
from collections.abc import Sequence
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
|
from reflex_ui.components.component import CoreComponent
LiteralDirectionType = Literal["top", "bottom", "left", "right"]
class ClassNames:
"""Class names for the drawer component."""
ROOT = ""
TRIGGER = ""
PORTAL = ""
CONTENT = "fixed right-0 bottom-0 z-50 bg-secondary-1 max-w-96 border-l border-secondary-a4 size-full flex"
OVERLAY = "fixed inset-0 z-50 bg-black/50"
CLOSE = ""
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11"
HANDLE = ""
class DrawerBaseComponent(CoreComponent):
"""Base component for drawer components."""
library = "vaul-base@0.0.6"
class DrawerRoot(DrawerBaseComponent):
"""The Root component of a Drawer, contains all parts of a drawer."""
tag = "Drawer.Root"
# The open state of the drawer when it is initially rendered. Use when you do not need to control its open state.
default_open: Var[bool]
# Whether the drawer is open or not.
open: Var[ | from reflex.vars.base import Var |
"""Custom drawer component."""
from collections.abc import Sequence
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.vars.base import Var
|
LiteralDirectionType = Literal["top", "bottom", "left", "right"]
class ClassNames:
"""Class names for the drawer component."""
ROOT = ""
TRIGGER = ""
PORTAL = ""
CONTENT = "fixed right-0 bottom-0 z-50 bg-secondary-1 max-w-96 border-l border-secondary-a4 size-full flex"
OVERLAY = "fixed inset-0 z-50 bg-black/50"
CLOSE = ""
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11"
HANDLE = ""
class DrawerBaseComponent(CoreComponent):
"""Base component for drawer components."""
library = "vaul-base@0.0.6"
class DrawerRoot(DrawerBaseComponent):
"""The Root component of a Drawer, contains all parts of a drawer."""
tag = "Drawer.Root"
# The open state of the drawer when it is initially rendered. Use when you do not need to control its open state.
default_open: Var[bool]
# Whether the drawer is open or not.
open: Var[bool]
# Fires when the drawer is opened or closed.
| from reflex_ui.components.component import CoreComponent |
"""Custom drawer component."""
from collections.abc import Sequence
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.vars.base import Var
from reflex_ui.components.component import CoreComponent
|
class ClassNames:
"""Class names for the drawer component."""
ROOT = ""
TRIGGER = ""
PORTAL = ""
CONTENT = "fixed right-0 bottom-0 z-50 bg-secondary-1 max-w-96 border-l border-secondary-a4 size-full flex"
OVERLAY = "fixed inset-0 z-50 bg-black/50"
CLOSE = ""
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11"
HANDLE = ""
class DrawerBaseComponent(CoreComponent):
"""Base component for drawer components."""
library = "vaul-base@0.0.6"
class DrawerRoot(DrawerBaseComponent):
"""The Root component of a Drawer, contains all parts of a drawer."""
tag = "Drawer.Root"
# The open state of the drawer when it is initially rendered. Use when you do not need to control its open state.
default_open: Var[bool]
# Whether the drawer is open or not.
open: Var[bool]
# Fires when the drawer is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool)]
| LiteralDirectionType = Literal["top", "bottom", "left", "right"] |
"""Custom drawer component."""
from collections.abc import Sequence
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.vars.base import Var
from reflex_ui.components.component import CoreComponent
LiteralDirectionType = Literal["top", "bottom", "left", "right"]
|
class DrawerBaseComponent(CoreComponent):
"""Base component for drawer components."""
library = "vaul-base@0.0.6"
class DrawerRoot(DrawerBaseComponent):
"""The Root component of a Drawer, contains all parts of a drawer."""
tag = "Drawer.Root"
# The open state of the drawer when it is initially rendered. Use when you do not need to control its open state.
default_open: Var[bool]
# Whether the drawer is open or not.
open: Var[bool]
# Fires when the drawer is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool)]
# When False, it allows interaction with elements outside of the drawer without closing it. Defaults to True.
modal: Var[bool]
# Direction of the drawer. This adjusts the animations and the drag direction. Defaults to "bottom"
direction: Var[LiteralDirectionType]
# Gets triggered after the open or close animation ends, it receives an open argument with the open state of the drawer by th | class ClassNames:
"""Class names for the drawer component."""
ROOT = ""
TRIGGER = ""
PORTAL = ""
CONTENT = "fixed right-0 bottom-0 z-50 bg-secondary-1 max-w-96 border-l border-secondary-a4 size-full flex"
OVERLAY = "fixed inset-0 z-50 bg-black/50"
CLOSE = ""
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11"
HANDLE = "" |
"""Custom drawer component."""
from collections.abc import Sequence
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.vars.base import Var
from reflex_ui.components.component import CoreComponent
LiteralDirectionType = Literal["top", "bottom", "left", "right"]
class ClassNames:
"""Class names for the drawer component."""
ROOT = ""
|
PORTAL = ""
CONTENT = "fixed right-0 bottom-0 z-50 bg-secondary-1 max-w-96 border-l border-secondary-a4 size-full flex"
OVERLAY = "fixed inset-0 z-50 bg-black/50"
CLOSE = ""
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11"
HANDLE = ""
class DrawerBaseComponent(CoreComponent):
"""Base component for drawer components."""
library = "vaul-base@0.0.6"
class DrawerRoot(DrawerBaseComponent):
"""The Root component of a Drawer, contains all parts of a drawer."""
tag = "Drawer.Root"
# The open state of the drawer when it is initially rendered. Use when you do not need to control its open state.
default_open: Var[bool]
# Whether the drawer is open or not.
open: Var[bool]
# Fires when the drawer is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool)]
# When False, it allows interaction with elements outside of the drawer without closing it. Defaults | TRIGGER = "" |
"""Custom drawer component."""
from collections.abc import Sequence
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.vars.base import Var
from reflex_ui.components.component import CoreComponent
LiteralDirectionType = Literal["top", "bottom", "left", "right"]
class ClassNames:
"""Class names for the drawer component."""
ROOT = ""
TRIGGER = ""
|
CONTENT = "fixed right-0 bottom-0 z-50 bg-secondary-1 max-w-96 border-l border-secondary-a4 size-full flex"
OVERLAY = "fixed inset-0 z-50 bg-black/50"
CLOSE = ""
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11"
HANDLE = ""
class DrawerBaseComponent(CoreComponent):
"""Base component for drawer components."""
library = "vaul-base@0.0.6"
class DrawerRoot(DrawerBaseComponent):
"""The Root component of a Drawer, contains all parts of a drawer."""
tag = "Drawer.Root"
# The open state of the drawer when it is initially rendered. Use when you do not need to control its open state.
default_open: Var[bool]
# Whether the drawer is open or not.
open: Var[bool]
# Fires when the drawer is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool)]
# When False, it allows interaction with elements outside of the drawer without closing it. Defaults to True.
mo | PORTAL = "" |
"""Custom drawer component."""
from collections.abc import Sequence
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.vars.base import Var
from reflex_ui.components.component import CoreComponent
LiteralDirectionType = Literal["top", "bottom", "left", "right"]
class ClassNames:
"""Class names for the drawer component."""
ROOT = ""
TRIGGER = ""
PORTAL = ""
|
OVERLAY = "fixed inset-0 z-50 bg-black/50"
CLOSE = ""
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11"
HANDLE = ""
class DrawerBaseComponent(CoreComponent):
"""Base component for drawer components."""
library = "vaul-base@0.0.6"
class DrawerRoot(DrawerBaseComponent):
"""The Root component of a Drawer, contains all parts of a drawer."""
tag = "Drawer.Root"
# The open state of the drawer when it is initially rendered. Use when you do not need to control its open state.
default_open: Var[bool]
# Whether the drawer is open or not.
open: Var[bool]
# Fires when the drawer is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool)]
# When False, it allows interaction with elements outside of the drawer without closing it. Defaults to True.
modal: Var[bool]
# Direction of the drawer. This adjusts the animations and the drag direction. Defaults to " | CONTENT = "fixed right-0 bottom-0 z-50 bg-secondary-1 max-w-96 border-l border-secondary-a4 size-full flex" |
"""Custom drawer component."""
from collections.abc import Sequence
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.vars.base import Var
from reflex_ui.components.component import CoreComponent
LiteralDirectionType = Literal["top", "bottom", "left", "right"]
class ClassNames:
"""Class names for the drawer component."""
ROOT = ""
TRIGGER = ""
PORTAL = ""
CONTENT = "fixed right-0 bottom-0 z-50 bg-secondary-1 max-w-96 border-l border-secondary-a4 size-full flex"
|
CLOSE = ""
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11"
HANDLE = ""
class DrawerBaseComponent(CoreComponent):
"""Base component for drawer components."""
library = "vaul-base@0.0.6"
class DrawerRoot(DrawerBaseComponent):
"""The Root component of a Drawer, contains all parts of a drawer."""
tag = "Drawer.Root"
# The open state of the drawer when it is initially rendered. Use when you do not need to control its open state.
default_open: Var[bool]
# Whether the drawer is open or not.
open: Var[bool]
# Fires when the drawer is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool)]
# When False, it allows interaction with elements outside of the drawer without closing it. Defaults to True.
modal: Var[bool]
# Direction of the drawer. This adjusts the animations and the drag direction. Defaults to "bottom"
direction: Var[LiteralDirectionType | OVERLAY = "fixed inset-0 z-50 bg-black/50" |
"""Custom drawer component."""
from collections.abc import Sequence
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.vars.base import Var
from reflex_ui.components.component import CoreComponent
LiteralDirectionType = Literal["top", "bottom", "left", "right"]
class ClassNames:
"""Class names for the drawer component."""
ROOT = ""
TRIGGER = ""
PORTAL = ""
CONTENT = "fixed right-0 bottom-0 z-50 bg-secondary-1 max-w-96 border-l border-secondary-a4 size-full flex"
OVERLAY = "fixed inset-0 z-50 bg-black/50"
|
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11"
HANDLE = ""
class DrawerBaseComponent(CoreComponent):
"""Base component for drawer components."""
library = "vaul-base@0.0.6"
class DrawerRoot(DrawerBaseComponent):
"""The Root component of a Drawer, contains all parts of a drawer."""
tag = "Drawer.Root"
# The open state of the drawer when it is initially rendered. Use when you do not need to control its open state.
default_open: Var[bool]
# Whether the drawer is open or not.
open: Var[bool]
# Fires when the drawer is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool)]
# When False, it allows interaction with elements outside of the drawer without closing it. Defaults to True.
modal: Var[bool]
# Direction of the drawer. This adjusts the animations and the drag direction. Defaults to "bottom"
direction: Var[LiteralDirectionType]
# Gets t | CLOSE = "" |
"""Custom drawer component."""
from collections.abc import Sequence
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.vars.base import Var
from reflex_ui.components.component import CoreComponent
LiteralDirectionType = Literal["top", "bottom", "left", "right"]
class ClassNames:
"""Class names for the drawer component."""
ROOT = ""
TRIGGER = ""
PORTAL = ""
CONTENT = "fixed right-0 bottom-0 z-50 bg-secondary-1 max-w-96 border-l border-secondary-a4 size-full flex"
OVERLAY = "fixed inset-0 z-50 bg-black/50"
CLOSE = ""
|
DESCRIPTION = "text-sm text-secondary-11"
HANDLE = ""
class DrawerBaseComponent(CoreComponent):
"""Base component for drawer components."""
library = "vaul-base@0.0.6"
class DrawerRoot(DrawerBaseComponent):
"""The Root component of a Drawer, contains all parts of a drawer."""
tag = "Drawer.Root"
# The open state of the drawer when it is initially rendered. Use when you do not need to control its open state.
default_open: Var[bool]
# Whether the drawer is open or not.
open: Var[bool]
# Fires when the drawer is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool)]
# When False, it allows interaction with elements outside of the drawer without closing it. Defaults to True.
modal: Var[bool]
# Direction of the drawer. This adjusts the animations and the drag direction. Defaults to "bottom"
direction: Var[LiteralDirectionType]
# Gets triggered after the open or close animation ends, it rec | TITLE = "text-2xl font-semibold text-secondary-12" |
"""Custom drawer component."""
from collections.abc import Sequence
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.vars.base import Var
from reflex_ui.components.component import CoreComponent
LiteralDirectionType = Literal["top", "bottom", "left", "right"]
class ClassNames:
"""Class names for the drawer component."""
ROOT = ""
TRIGGER = ""
PORTAL = ""
CONTENT = "fixed right-0 bottom-0 z-50 bg-secondary-1 max-w-96 border-l border-secondary-a4 size-full flex"
OVERLAY = "fixed inset-0 z-50 bg-black/50"
CLOSE = ""
TITLE = "text-2xl font-semibold text-secondary-12"
|
HANDLE = ""
class DrawerBaseComponent(CoreComponent):
"""Base component for drawer components."""
library = "vaul-base@0.0.6"
class DrawerRoot(DrawerBaseComponent):
"""The Root component of a Drawer, contains all parts of a drawer."""
tag = "Drawer.Root"
# The open state of the drawer when it is initially rendered. Use when you do not need to control its open state.
default_open: Var[bool]
# Whether the drawer is open or not.
open: Var[bool]
# Fires when the drawer is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool)]
# When False, it allows interaction with elements outside of the drawer without closing it. Defaults to True.
modal: Var[bool]
# Direction of the drawer. This adjusts the animations and the drag direction. Defaults to "bottom"
direction: Var[LiteralDirectionType]
# Gets triggered after the open or close animation ends, it receives an open argument with the open state of | DESCRIPTION = "text-sm text-secondary-11" |
"""Custom drawer component."""
from collections.abc import Sequence
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.vars.base import Var
from reflex_ui.components.component import CoreComponent
LiteralDirectionType = Literal["top", "bottom", "left", "right"]
class ClassNames:
"""Class names for the drawer component."""
ROOT = ""
TRIGGER = ""
PORTAL = ""
CONTENT = "fixed right-0 bottom-0 z-50 bg-secondary-1 max-w-96 border-l border-secondary-a4 size-full flex"
OVERLAY = "fixed inset-0 z-50 bg-black/50"
CLOSE = ""
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11"
|
class DrawerBaseComponent(CoreComponent):
"""Base component for drawer components."""
library = "vaul-base@0.0.6"
class DrawerRoot(DrawerBaseComponent):
"""The Root component of a Drawer, contains all parts of a drawer."""
tag = "Drawer.Root"
# The open state of the drawer when it is initially rendered. Use when you do not need to control its open state.
default_open: Var[bool]
# Whether the drawer is open or not.
open: Var[bool]
# Fires when the drawer is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool)]
# When False, it allows interaction with elements outside of the drawer without closing it. Defaults to True.
modal: Var[bool]
# Direction of the drawer. This adjusts the animations and the drag direction. Defaults to "bottom"
direction: Var[LiteralDirectionType]
# Gets triggered after the open or close animation ends, it receives an open argument with the open state of the drawer by th | HANDLE = "" |
"""Custom drawer component."""
from collections.abc import Sequence
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.vars.base import Var
from reflex_ui.components.component import CoreComponent
LiteralDirectionType = Literal["top", "bottom", "left", "right"]
class ClassNames:
"""Class names for the drawer component."""
ROOT = ""
TRIGGER = ""
PORTAL = ""
CONTENT = "fixed right-0 bottom-0 z-50 bg-secondary-1 max-w-96 border-l border-secondary-a4 size-full flex"
OVERLAY = "fixed inset-0 z-50 bg-black/50"
CLOSE = ""
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11"
HANDLE = ""
|
class DrawerRoot(DrawerBaseComponent):
"""The Root component of a Drawer, contains all parts of a drawer."""
tag = "Drawer.Root"
# The open state of the drawer when it is initially rendered. Use when you do not need to control its open state.
default_open: Var[bool]
# Whether the drawer is open or not.
open: Var[bool]
# Fires when the drawer is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool)]
# When False, it allows interaction with elements outside of the drawer without closing it. Defaults to True.
modal: Var[bool]
# Direction of the drawer. This adjusts the animations and the drag direction. Defaults to "bottom"
direction: Var[LiteralDirectionType]
# Gets triggered after the open or close animation ends, it receives an open argument with the open state of the drawer by the time the function was triggered.
on_animation_end: EventHandler[passthrough_event_spec(bool)]
# When False, draggi | class DrawerBaseComponent(CoreComponent):
"""Base component for drawer components."""
library = "vaul-base@0.0.6" |
"""Custom drawer component."""
from collections.abc import Sequence
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.vars.base import Var
from reflex_ui.components.component import CoreComponent
LiteralDirectionType = Literal["top", "bottom", "left", "right"]
class ClassNames:
"""Class names for the drawer component."""
ROOT = ""
TRIGGER = ""
PORTAL = ""
CONTENT = "fixed right-0 bottom-0 z-50 bg-secondary-1 max-w-96 border-l border-secondary-a4 size-full flex"
OVERLAY = "fixed inset-0 z-50 bg-black/50"
CLOSE = ""
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11"
HANDLE = ""
class DrawerBaseComponent(CoreComponent):
"""Base component for drawer components."""
|
class DrawerRoot(DrawerBaseComponent):
"""The Root component of a Drawer, contains all parts of a drawer."""
tag = "Drawer.Root"
# The open state of the drawer when it is initially rendered. Use when you do not need to control its open state.
default_open: Var[bool]
# Whether the drawer is open or not.
open: Var[bool]
# Fires when the drawer is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool)]
# When False, it allows interaction with elements outside of the drawer without closing it. Defaults to True.
modal: Var[bool]
# Direction of the drawer. This adjusts the animations and the drag direction. Defaults to "bottom"
direction: Var[LiteralDirectionType]
# Gets triggered after the open or close animation ends, it receives an open argument with the open state of the drawer by the time the function was triggered.
on_animation_end: EventHandler[passthrough_event_spec(bool)]
# When False, draggi | library = "vaul-base@0.0.6" |
ollections.abc import Sequence
from typing import Literal
from reflex.components.component import Component, ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.vars.base import Var
from reflex_ui.components.component import CoreComponent
LiteralDirectionType = Literal["top", "bottom", "left", "right"]
class ClassNames:
"""Class names for the drawer component."""
ROOT = ""
TRIGGER = ""
PORTAL = ""
CONTENT = "fixed right-0 bottom-0 z-50 bg-secondary-1 max-w-96 border-l border-secondary-a4 size-full flex"
OVERLAY = "fixed inset-0 z-50 bg-black/50"
CLOSE = ""
TITLE = "text-2xl font-semibold text-secondary-12"
DESCRIPTION = "text-sm text-secondary-11"
HANDLE = ""
class DrawerBaseComponent(CoreComponent):
"""Base component for drawer components."""
library = "vaul-base@0.0.6"
class DrawerRoot(DrawerBaseComponent):
"""The Root component of a Drawer, contains all parts of a drawer."""
|
# The open state of the drawer when it is initially rendered. Use when you do not need to control its open state.
default_open: Var[bool]
# Whether the drawer is open or not.
open: Var[bool]
# Fires when the drawer is opened or closed.
on_open_change: EventHandler[passthrough_event_spec(bool)]
# When False, it allows interaction with elements outside of the drawer without closing it. Defaults to True.
modal: Var[bool]
# Direction of the drawer. This adjusts the animations and the drag direction. Defaults to "bottom"
direction: Var[LiteralDirectionType]
# Gets triggered after the open or close animation ends, it receives an open argument with the open state of the drawer by the time the function was triggered.
on_animation_end: EventHandler[passthrough_event_spec(bool)]
# When False, dragging, clicking outside, pressing esc, etc. will not close the drawer. Use this in combination with the open prop, otherwise you won't be able | tag = "Drawer.Root" |
e: Var[bool]
# When True, dragging will only be possible by the handle.
handle_only: Var[bool]
# Container element to render the portal into. Defaults to document.body.
container: Var[str]
# Whether to reposition inputs when the drawer opens. Defaults to True.
reposition_inputs: Var[bool]
# Array of numbers from 0 to 100 that corresponds to % of the screen a given snap point should take up. Should go from least visible. Also Accept px values, which doesn't take screen height into account.
snap_points: Sequence[str | float] | None
# Current active snap point.
active_snap_point: Var[bool]
# Function to set the active snap point.
set_active_snap_point: EventHandler[passthrough_event_spec(int)]
# Index of a snap point from which the overlay fade should be applied. Defaults to the last snap point.
fade_from_index: Var[int]
# Whether to snap to sequential points.
snap_to_sequential_point: Var[bool]
@classmethod
|
class DrawerTrigger(DrawerBaseComponent):
"""The button that opens the drawer."""
tag = "Drawer.Trigger"
# Render the trigger as a child. Defaults to False.
as_child: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer trigger component."""
props["data-slot"] = "drawer-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class DrawerPortal(DrawerBaseComponent):
"""Portals your drawer into the body."""
tag = "Drawer.Portal"
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer portal component."""
props["data-slot"] = "drawer-portal"
cls.set_class_name(ClassNames.PORTAL, props)
return super().create(*children, **props)
class DrawerContent(DrawerBaseComponent):
"""Content that should be rendered in the dra | def create(cls, *children, **props) -> Component:
"""Create the drawer root component."""
props["data-slot"] = "drawer-root"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props) |
# Container element to render the portal into. Defaults to document.body.
container: Var[str]
# Whether to reposition inputs when the drawer opens. Defaults to True.
reposition_inputs: Var[bool]
# Array of numbers from 0 to 100 that corresponds to % of the screen a given snap point should take up. Should go from least visible. Also Accept px values, which doesn't take screen height into account.
snap_points: Sequence[str | float] | None
# Current active snap point.
active_snap_point: Var[bool]
# Function to set the active snap point.
set_active_snap_point: EventHandler[passthrough_event_spec(int)]
# Index of a snap point from which the overlay fade should be applied. Defaults to the last snap point.
fade_from_index: Var[int]
# Whether to snap to sequential points.
snap_to_sequential_point: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer root component."""
|
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class DrawerTrigger(DrawerBaseComponent):
"""The button that opens the drawer."""
tag = "Drawer.Trigger"
# Render the trigger as a child. Defaults to False.
as_child: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer trigger component."""
props["data-slot"] = "drawer-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class DrawerPortal(DrawerBaseComponent):
"""Portals your drawer into the body."""
tag = "Drawer.Portal"
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer portal component."""
props["data-slot"] = "drawer-portal"
cls.set_class_name(ClassNames.PORTAL, props)
return super().create(*children, * | props["data-slot"] = "drawer-root" |
hen the drawer opens. Defaults to True.
reposition_inputs: Var[bool]
# Array of numbers from 0 to 100 that corresponds to % of the screen a given snap point should take up. Should go from least visible. Also Accept px values, which doesn't take screen height into account.
snap_points: Sequence[str | float] | None
# Current active snap point.
active_snap_point: Var[bool]
# Function to set the active snap point.
set_active_snap_point: EventHandler[passthrough_event_spec(int)]
# Index of a snap point from which the overlay fade should be applied. Defaults to the last snap point.
fade_from_index: Var[int]
# Whether to snap to sequential points.
snap_to_sequential_point: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer root component."""
props["data-slot"] = "drawer-root"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
|
class DrawerPortal(DrawerBaseComponent):
"""Portals your drawer into the body."""
tag = "Drawer.Portal"
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer portal component."""
props["data-slot"] = "drawer-portal"
cls.set_class_name(ClassNames.PORTAL, props)
return super().create(*children, **props)
class DrawerContent(DrawerBaseComponent):
"""Content that should be rendered in the drawer."""
tag = "Drawer.Content"
# Render the content as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer content component."""
props["data-slot"] = "drawer-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
class DrawerOverlay(DrawerBaseComponent):
"""A layer that covers the inert portion of the view when the drawer is open."""
| class DrawerTrigger(DrawerBaseComponent):
"""The button that opens the drawer."""
tag = "Drawer.Trigger"
# Render the trigger as a child. Defaults to False.
as_child: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer trigger component."""
props["data-slot"] = "drawer-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props) |
mbers from 0 to 100 that corresponds to % of the screen a given snap point should take up. Should go from least visible. Also Accept px values, which doesn't take screen height into account.
snap_points: Sequence[str | float] | None
# Current active snap point.
active_snap_point: Var[bool]
# Function to set the active snap point.
set_active_snap_point: EventHandler[passthrough_event_spec(int)]
# Index of a snap point from which the overlay fade should be applied. Defaults to the last snap point.
fade_from_index: Var[int]
# Whether to snap to sequential points.
snap_to_sequential_point: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer root component."""
props["data-slot"] = "drawer-root"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class DrawerTrigger(DrawerBaseComponent):
"""The button that opens the drawer."""
|
# Render the trigger as a child. Defaults to False.
as_child: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer trigger component."""
props["data-slot"] = "drawer-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class DrawerPortal(DrawerBaseComponent):
"""Portals your drawer into the body."""
tag = "Drawer.Portal"
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer portal component."""
props["data-slot"] = "drawer-portal"
cls.set_class_name(ClassNames.PORTAL, props)
return super().create(*children, **props)
class DrawerContent(DrawerBaseComponent):
"""Content that should be rendered in the drawer."""
tag = "Drawer.Content"
# Render the content as a child. Defaults to False.
as_child: Var[bool] | tag = "Drawer.Trigger" |
into account.
snap_points: Sequence[str | float] | None
# Current active snap point.
active_snap_point: Var[bool]
# Function to set the active snap point.
set_active_snap_point: EventHandler[passthrough_event_spec(int)]
# Index of a snap point from which the overlay fade should be applied. Defaults to the last snap point.
fade_from_index: Var[int]
# Whether to snap to sequential points.
snap_to_sequential_point: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer root component."""
props["data-slot"] = "drawer-root"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class DrawerTrigger(DrawerBaseComponent):
"""The button that opens the drawer."""
tag = "Drawer.Trigger"
# Render the trigger as a child. Defaults to False.
as_child: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
|
class DrawerPortal(DrawerBaseComponent):
"""Portals your drawer into the body."""
tag = "Drawer.Portal"
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer portal component."""
props["data-slot"] = "drawer-portal"
cls.set_class_name(ClassNames.PORTAL, props)
return super().create(*children, **props)
class DrawerContent(DrawerBaseComponent):
"""Content that should be rendered in the drawer."""
tag = "Drawer.Content"
# Render the content as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer content component."""
props["data-slot"] = "drawer-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
class DrawerOverlay(DrawerBaseComponent):
"""A layer that covers the inert portion of the view when the drawer is open."""
| def create(cls, *children, **props) -> Component:
"""Create the drawer trigger component."""
props["data-slot"] = "drawer-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props) |
_point: Var[bool]
# Function to set the active snap point.
set_active_snap_point: EventHandler[passthrough_event_spec(int)]
# Index of a snap point from which the overlay fade should be applied. Defaults to the last snap point.
fade_from_index: Var[int]
# Whether to snap to sequential points.
snap_to_sequential_point: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer root component."""
props["data-slot"] = "drawer-root"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class DrawerTrigger(DrawerBaseComponent):
"""The button that opens the drawer."""
tag = "Drawer.Trigger"
# Render the trigger as a child. Defaults to False.
as_child: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer trigger component."""
|
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class DrawerPortal(DrawerBaseComponent):
"""Portals your drawer into the body."""
tag = "Drawer.Portal"
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer portal component."""
props["data-slot"] = "drawer-portal"
cls.set_class_name(ClassNames.PORTAL, props)
return super().create(*children, **props)
class DrawerContent(DrawerBaseComponent):
"""Content that should be rendered in the drawer."""
tag = "Drawer.Content"
# Render the content as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer content component."""
props["data-slot"] = "drawer-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
class DrawerOverlay(Drawe | props["data-slot"] = "drawer-trigger" |
x of a snap point from which the overlay fade should be applied. Defaults to the last snap point.
fade_from_index: Var[int]
# Whether to snap to sequential points.
snap_to_sequential_point: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer root component."""
props["data-slot"] = "drawer-root"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class DrawerTrigger(DrawerBaseComponent):
"""The button that opens the drawer."""
tag = "Drawer.Trigger"
# Render the trigger as a child. Defaults to False.
as_child: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer trigger component."""
props["data-slot"] = "drawer-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
|
class DrawerContent(DrawerBaseComponent):
"""Content that should be rendered in the drawer."""
tag = "Drawer.Content"
# Render the content as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer content component."""
props["data-slot"] = "drawer-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
class DrawerOverlay(DrawerBaseComponent):
"""A layer that covers the inert portion of the view when the drawer is open."""
tag = "Drawer.Overlay"
# Render the overlay as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer overlay component."""
props["data-slot"] = "drawer-overlay"
cls.set_class_name(ClassNames.OVERLAY, props)
return super().create(*children, **props)
cla | class DrawerPortal(DrawerBaseComponent):
"""Portals your drawer into the body."""
tag = "Drawer.Portal"
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer portal component."""
props["data-slot"] = "drawer-portal"
cls.set_class_name(ClassNames.PORTAL, props)
return super().create(*children, **props) |
point.
fade_from_index: Var[int]
# Whether to snap to sequential points.
snap_to_sequential_point: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer root component."""
props["data-slot"] = "drawer-root"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class DrawerTrigger(DrawerBaseComponent):
"""The button that opens the drawer."""
tag = "Drawer.Trigger"
# Render the trigger as a child. Defaults to False.
as_child: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer trigger component."""
props["data-slot"] = "drawer-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class DrawerPortal(DrawerBaseComponent):
"""Portals your drawer into the body."""
|
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer portal component."""
props["data-slot"] = "drawer-portal"
cls.set_class_name(ClassNames.PORTAL, props)
return super().create(*children, **props)
class DrawerContent(DrawerBaseComponent):
"""Content that should be rendered in the drawer."""
tag = "Drawer.Content"
# Render the content as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer content component."""
props["data-slot"] = "drawer-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
class DrawerOverlay(DrawerBaseComponent):
"""A layer that covers the inert portion of the view when the drawer is open."""
tag = "Drawer.Overlay"
# Render the overlay as a child. Defaults to False.
as_child: Var[bool]
@cl | tag = "Drawer.Portal" |
Whether to snap to sequential points.
snap_to_sequential_point: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer root component."""
props["data-slot"] = "drawer-root"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class DrawerTrigger(DrawerBaseComponent):
"""The button that opens the drawer."""
tag = "Drawer.Trigger"
# Render the trigger as a child. Defaults to False.
as_child: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer trigger component."""
props["data-slot"] = "drawer-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class DrawerPortal(DrawerBaseComponent):
"""Portals your drawer into the body."""
tag = "Drawer.Portal"
@classmethod
|
class DrawerContent(DrawerBaseComponent):
"""Content that should be rendered in the drawer."""
tag = "Drawer.Content"
# Render the content as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer content component."""
props["data-slot"] = "drawer-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
class DrawerOverlay(DrawerBaseComponent):
"""A layer that covers the inert portion of the view when the drawer is open."""
tag = "Drawer.Overlay"
# Render the overlay as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer overlay component."""
props["data-slot"] = "drawer-overlay"
cls.set_class_name(ClassNames.OVERLAY, props)
return super().create(*children, **props)
cla | def create(cls, *children, **props) -> Component:
"""Create the drawer portal component."""
props["data-slot"] = "drawer-portal"
cls.set_class_name(ClassNames.PORTAL, props)
return super().create(*children, **props) |
te(cls, *children, **props) -> Component:
"""Create the drawer root component."""
props["data-slot"] = "drawer-root"
cls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class DrawerTrigger(DrawerBaseComponent):
"""The button that opens the drawer."""
tag = "Drawer.Trigger"
# Render the trigger as a child. Defaults to False.
as_child: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer trigger component."""
props["data-slot"] = "drawer-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class DrawerPortal(DrawerBaseComponent):
"""Portals your drawer into the body."""
tag = "Drawer.Portal"
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer portal component."""
|
cls.set_class_name(ClassNames.PORTAL, props)
return super().create(*children, **props)
class DrawerContent(DrawerBaseComponent):
"""Content that should be rendered in the drawer."""
tag = "Drawer.Content"
# Render the content as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer content component."""
props["data-slot"] = "drawer-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
class DrawerOverlay(DrawerBaseComponent):
"""A layer that covers the inert portion of the view when the drawer is open."""
tag = "Drawer.Overlay"
# Render the overlay as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer overlay component."""
props["data-slot"] = "drawer-overlay"
| props["data-slot"] = "drawer-portal" |
ls.set_class_name(ClassNames.ROOT, props)
return super().create(*children, **props)
class DrawerTrigger(DrawerBaseComponent):
"""The button that opens the drawer."""
tag = "Drawer.Trigger"
# Render the trigger as a child. Defaults to False.
as_child: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer trigger component."""
props["data-slot"] = "drawer-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class DrawerPortal(DrawerBaseComponent):
"""Portals your drawer into the body."""
tag = "Drawer.Portal"
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer portal component."""
props["data-slot"] = "drawer-portal"
cls.set_class_name(ClassNames.PORTAL, props)
return super().create(*children, **props)
|
class DrawerOverlay(DrawerBaseComponent):
"""A layer that covers the inert portion of the view when the drawer is open."""
tag = "Drawer.Overlay"
# Render the overlay as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer overlay component."""
props["data-slot"] = "drawer-overlay"
cls.set_class_name(ClassNames.OVERLAY, props)
return super().create(*children, **props)
class DrawerClose(DrawerBaseComponent):
"""A button that closes the drawer."""
tag = "Drawer.Close"
# Render the close button as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer close component."""
props["data-slot"] = "drawer-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class DrawerTitle(Draw | class DrawerContent(DrawerBaseComponent):
"""Content that should be rendered in the drawer."""
tag = "Drawer.Content"
# Render the content as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer content component."""
props["data-slot"] = "drawer-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props) |
erTrigger(DrawerBaseComponent):
"""The button that opens the drawer."""
tag = "Drawer.Trigger"
# Render the trigger as a child. Defaults to False.
as_child: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer trigger component."""
props["data-slot"] = "drawer-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class DrawerPortal(DrawerBaseComponent):
"""Portals your drawer into the body."""
tag = "Drawer.Portal"
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer portal component."""
props["data-slot"] = "drawer-portal"
cls.set_class_name(ClassNames.PORTAL, props)
return super().create(*children, **props)
class DrawerContent(DrawerBaseComponent):
"""Content that should be rendered in the drawer."""
|
# Render the content as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer content component."""
props["data-slot"] = "drawer-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
class DrawerOverlay(DrawerBaseComponent):
"""A layer that covers the inert portion of the view when the drawer is open."""
tag = "Drawer.Overlay"
# Render the overlay as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer overlay component."""
props["data-slot"] = "drawer-overlay"
cls.set_class_name(ClassNames.OVERLAY, props)
return super().create(*children, **props)
class DrawerClose(DrawerBaseComponent):
"""A button that closes the drawer."""
tag = "Drawer.Close"
# Render the close | tag = "Drawer.Content" |
ger as a child. Defaults to False.
as_child: Var[bool]
# The render prop
render_: Var[Component]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer trigger component."""
props["data-slot"] = "drawer-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class DrawerPortal(DrawerBaseComponent):
"""Portals your drawer into the body."""
tag = "Drawer.Portal"
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer portal component."""
props["data-slot"] = "drawer-portal"
cls.set_class_name(ClassNames.PORTAL, props)
return super().create(*children, **props)
class DrawerContent(DrawerBaseComponent):
"""Content that should be rendered in the drawer."""
tag = "Drawer.Content"
# Render the content as a child. Defaults to False.
as_child: Var[bool]
@classmethod
|
class DrawerOverlay(DrawerBaseComponent):
"""A layer that covers the inert portion of the view when the drawer is open."""
tag = "Drawer.Overlay"
# Render the overlay as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer overlay component."""
props["data-slot"] = "drawer-overlay"
cls.set_class_name(ClassNames.OVERLAY, props)
return super().create(*children, **props)
class DrawerClose(DrawerBaseComponent):
"""A button that closes the drawer."""
tag = "Drawer.Close"
# Render the close button as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer close component."""
props["data-slot"] = "drawer-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class DrawerTitle(Draw | def create(cls, *children, **props) -> Component:
"""Create the drawer content component."""
props["data-slot"] = "drawer-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props) |
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer trigger component."""
props["data-slot"] = "drawer-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class DrawerPortal(DrawerBaseComponent):
"""Portals your drawer into the body."""
tag = "Drawer.Portal"
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer portal component."""
props["data-slot"] = "drawer-portal"
cls.set_class_name(ClassNames.PORTAL, props)
return super().create(*children, **props)
class DrawerContent(DrawerBaseComponent):
"""Content that should be rendered in the drawer."""
tag = "Drawer.Content"
# Render the content as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer content component."""
|
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
class DrawerOverlay(DrawerBaseComponent):
"""A layer that covers the inert portion of the view when the drawer is open."""
tag = "Drawer.Overlay"
# Render the overlay as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer overlay component."""
props["data-slot"] = "drawer-overlay"
cls.set_class_name(ClassNames.OVERLAY, props)
return super().create(*children, **props)
class DrawerClose(DrawerBaseComponent):
"""A button that closes the drawer."""
tag = "Drawer.Close"
# Render the close button as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer close component."""
props["data-slot"] = "drawer-close"
cls.set_class_ | props["data-slot"] = "drawer-content" |
slot"] = "drawer-trigger"
cls.set_class_name(ClassNames.TRIGGER, props)
return super().create(*children, **props)
class DrawerPortal(DrawerBaseComponent):
"""Portals your drawer into the body."""
tag = "Drawer.Portal"
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer portal component."""
props["data-slot"] = "drawer-portal"
cls.set_class_name(ClassNames.PORTAL, props)
return super().create(*children, **props)
class DrawerContent(DrawerBaseComponent):
"""Content that should be rendered in the drawer."""
tag = "Drawer.Content"
# Render the content as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer content component."""
props["data-slot"] = "drawer-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
|
class DrawerClose(DrawerBaseComponent):
"""A button that closes the drawer."""
tag = "Drawer.Close"
# Render the close button as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer close component."""
props["data-slot"] = "drawer-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class DrawerTitle(DrawerBaseComponent):
"""An optional accessible title to be announced when the drawer is opened."""
tag = "Drawer.Title"
# Render the title as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer title component."""
props["data-slot"] = "drawer-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DrawerDescription(DrawerBaseCom | class DrawerOverlay(DrawerBaseComponent):
"""A layer that covers the inert portion of the view when the drawer is open."""
tag = "Drawer.Overlay"
# Render the overlay as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer overlay component."""
props["data-slot"] = "drawer-overlay"
cls.set_class_name(ClassNames.OVERLAY, props)
return super().create(*children, **props) |
class DrawerPortal(DrawerBaseComponent):
"""Portals your drawer into the body."""
tag = "Drawer.Portal"
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer portal component."""
props["data-slot"] = "drawer-portal"
cls.set_class_name(ClassNames.PORTAL, props)
return super().create(*children, **props)
class DrawerContent(DrawerBaseComponent):
"""Content that should be rendered in the drawer."""
tag = "Drawer.Content"
# Render the content as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer content component."""
props["data-slot"] = "drawer-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
class DrawerOverlay(DrawerBaseComponent):
"""A layer that covers the inert portion of the view when the drawer is open."""
|
# Render the overlay as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer overlay component."""
props["data-slot"] = "drawer-overlay"
cls.set_class_name(ClassNames.OVERLAY, props)
return super().create(*children, **props)
class DrawerClose(DrawerBaseComponent):
"""A button that closes the drawer."""
tag = "Drawer.Close"
# Render the close button as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer close component."""
props["data-slot"] = "drawer-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class DrawerTitle(DrawerBaseComponent):
"""An optional accessible title to be announced when the drawer is opened."""
tag = "Drawer.Title"
# Render the title as a ch | tag = "Drawer.Overlay" |
thod
def create(cls, *children, **props) -> Component:
"""Create the drawer portal component."""
props["data-slot"] = "drawer-portal"
cls.set_class_name(ClassNames.PORTAL, props)
return super().create(*children, **props)
class DrawerContent(DrawerBaseComponent):
"""Content that should be rendered in the drawer."""
tag = "Drawer.Content"
# Render the content as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer content component."""
props["data-slot"] = "drawer-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
class DrawerOverlay(DrawerBaseComponent):
"""A layer that covers the inert portion of the view when the drawer is open."""
tag = "Drawer.Overlay"
# Render the overlay as a child. Defaults to False.
as_child: Var[bool]
@classmethod
|
class DrawerClose(DrawerBaseComponent):
"""A button that closes the drawer."""
tag = "Drawer.Close"
# Render the close button as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer close component."""
props["data-slot"] = "drawer-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class DrawerTitle(DrawerBaseComponent):
"""An optional accessible title to be announced when the drawer is opened."""
tag = "Drawer.Title"
# Render the title as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer title component."""
props["data-slot"] = "drawer-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DrawerDescription(DrawerBaseCom | def create(cls, *children, **props) -> Component:
"""Create the drawer overlay component."""
props["data-slot"] = "drawer-overlay"
cls.set_class_name(ClassNames.OVERLAY, props)
return super().create(*children, **props) |
props["data-slot"] = "drawer-portal"
cls.set_class_name(ClassNames.PORTAL, props)
return super().create(*children, **props)
class DrawerContent(DrawerBaseComponent):
"""Content that should be rendered in the drawer."""
tag = "Drawer.Content"
# Render the content as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer content component."""
props["data-slot"] = "drawer-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
class DrawerOverlay(DrawerBaseComponent):
"""A layer that covers the inert portion of the view when the drawer is open."""
tag = "Drawer.Overlay"
# Render the overlay as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer overlay component."""
|
cls.set_class_name(ClassNames.OVERLAY, props)
return super().create(*children, **props)
class DrawerClose(DrawerBaseComponent):
"""A button that closes the drawer."""
tag = "Drawer.Close"
# Render the close button as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer close component."""
props["data-slot"] = "drawer-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class DrawerTitle(DrawerBaseComponent):
"""An optional accessible title to be announced when the drawer is opened."""
tag = "Drawer.Title"
# Render the title as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer title component."""
props["data-slot"] = "drawer-title"
cls.set_class_name(ClassNames | props["data-slot"] = "drawer-overlay" |
ps)
class DrawerContent(DrawerBaseComponent):
"""Content that should be rendered in the drawer."""
tag = "Drawer.Content"
# Render the content as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer content component."""
props["data-slot"] = "drawer-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
class DrawerOverlay(DrawerBaseComponent):
"""A layer that covers the inert portion of the view when the drawer is open."""
tag = "Drawer.Overlay"
# Render the overlay as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer overlay component."""
props["data-slot"] = "drawer-overlay"
cls.set_class_name(ClassNames.OVERLAY, props)
return super().create(*children, **props)
|
class DrawerTitle(DrawerBaseComponent):
"""An optional accessible title to be announced when the drawer is opened."""
tag = "Drawer.Title"
# Render the title as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer title component."""
props["data-slot"] = "drawer-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DrawerDescription(DrawerBaseComponent):
"""An optional accessible description to be announced when the drawer is opened."""
tag = "Drawer.Description"
# Render the description as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer description component."""
props["data-slot"] = "drawer-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return | class DrawerClose(DrawerBaseComponent):
"""A button that closes the drawer."""
tag = "Drawer.Close"
# Render the close button as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer close component."""
props["data-slot"] = "drawer-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props) |
n the drawer."""
tag = "Drawer.Content"
# Render the content as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer content component."""
props["data-slot"] = "drawer-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
class DrawerOverlay(DrawerBaseComponent):
"""A layer that covers the inert portion of the view when the drawer is open."""
tag = "Drawer.Overlay"
# Render the overlay as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer overlay component."""
props["data-slot"] = "drawer-overlay"
cls.set_class_name(ClassNames.OVERLAY, props)
return super().create(*children, **props)
class DrawerClose(DrawerBaseComponent):
"""A button that closes the drawer."""
|
# Render the close button as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer close component."""
props["data-slot"] = "drawer-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class DrawerTitle(DrawerBaseComponent):
"""An optional accessible title to be announced when the drawer is opened."""
tag = "Drawer.Title"
# Render the title as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer title component."""
props["data-slot"] = "drawer-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DrawerDescription(DrawerBaseComponent):
"""An optional accessible description to be announced when the drawer is opened."""
tag = "Dr | tag = "Drawer.Close" |
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer content component."""
props["data-slot"] = "drawer-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
class DrawerOverlay(DrawerBaseComponent):
"""A layer that covers the inert portion of the view when the drawer is open."""
tag = "Drawer.Overlay"
# Render the overlay as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer overlay component."""
props["data-slot"] = "drawer-overlay"
cls.set_class_name(ClassNames.OVERLAY, props)
return super().create(*children, **props)
class DrawerClose(DrawerBaseComponent):
"""A button that closes the drawer."""
tag = "Drawer.Close"
# Render the close button as a child. Defaults to False.
as_child: Var[bool]
@classmethod
|
class DrawerTitle(DrawerBaseComponent):
"""An optional accessible title to be announced when the drawer is opened."""
tag = "Drawer.Title"
# Render the title as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer title component."""
props["data-slot"] = "drawer-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DrawerDescription(DrawerBaseComponent):
"""An optional accessible description to be announced when the drawer is opened."""
tag = "Drawer.Description"
# Render the description as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer description component."""
props["data-slot"] = "drawer-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return | def create(cls, *children, **props) -> Component:
"""Create the drawer close component."""
props["data-slot"] = "drawer-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props) |
omponent."""
props["data-slot"] = "drawer-content"
cls.set_class_name(ClassNames.CONTENT, props)
return super().create(*children, **props)
class DrawerOverlay(DrawerBaseComponent):
"""A layer that covers the inert portion of the view when the drawer is open."""
tag = "Drawer.Overlay"
# Render the overlay as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer overlay component."""
props["data-slot"] = "drawer-overlay"
cls.set_class_name(ClassNames.OVERLAY, props)
return super().create(*children, **props)
class DrawerClose(DrawerBaseComponent):
"""A button that closes the drawer."""
tag = "Drawer.Close"
# Render the close button as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer close component."""
|
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class DrawerTitle(DrawerBaseComponent):
"""An optional accessible title to be announced when the drawer is opened."""
tag = "Drawer.Title"
# Render the title as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer title component."""
props["data-slot"] = "drawer-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DrawerDescription(DrawerBaseComponent):
"""An optional accessible description to be announced when the drawer is opened."""
tag = "Drawer.Description"
# Render the description as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer description component."""
props["data-s | props["data-slot"] = "drawer-close" |
te(*children, **props)
class DrawerOverlay(DrawerBaseComponent):
"""A layer that covers the inert portion of the view when the drawer is open."""
tag = "Drawer.Overlay"
# Render the overlay as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer overlay component."""
props["data-slot"] = "drawer-overlay"
cls.set_class_name(ClassNames.OVERLAY, props)
return super().create(*children, **props)
class DrawerClose(DrawerBaseComponent):
"""A button that closes the drawer."""
tag = "Drawer.Close"
# Render the close button as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer close component."""
props["data-slot"] = "drawer-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
|
class DrawerDescription(DrawerBaseComponent):
"""An optional accessible description to be announced when the drawer is opened."""
tag = "Drawer.Description"
# Render the description as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer description component."""
props["data-slot"] = "drawer-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
class DrawerHandle(DrawerBaseComponent):
"""An optional handle to drag the drawer."""
tag = "Drawer.Handle"
alias = "Vaul" + tag
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer handle component."""
props["data-slot"] = "drawer-handle"
cls.set_class_name(ClassNames.HANDLE, props)
return super().create(*children, **props)
class HighLevelDrawer(DrawerRoot):
"""Hi | class DrawerTitle(DrawerBaseComponent):
"""An optional accessible title to be announced when the drawer is opened."""
tag = "Drawer.Title"
# Render the title as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer title component."""
props["data-slot"] = "drawer-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props) |
n the drawer is open."""
tag = "Drawer.Overlay"
# Render the overlay as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer overlay component."""
props["data-slot"] = "drawer-overlay"
cls.set_class_name(ClassNames.OVERLAY, props)
return super().create(*children, **props)
class DrawerClose(DrawerBaseComponent):
"""A button that closes the drawer."""
tag = "Drawer.Close"
# Render the close button as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer close component."""
props["data-slot"] = "drawer-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class DrawerTitle(DrawerBaseComponent):
"""An optional accessible title to be announced when the drawer is opened."""
|
# Render the title as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer title component."""
props["data-slot"] = "drawer-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DrawerDescription(DrawerBaseComponent):
"""An optional accessible description to be announced when the drawer is opened."""
tag = "Drawer.Description"
# Render the description as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer description component."""
props["data-slot"] = "drawer-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
class DrawerHandle(DrawerBaseComponent):
"""An optional handle to drag the drawer."""
tag = "Drawer.Hand | tag = "Drawer.Title" |
: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer overlay component."""
props["data-slot"] = "drawer-overlay"
cls.set_class_name(ClassNames.OVERLAY, props)
return super().create(*children, **props)
class DrawerClose(DrawerBaseComponent):
"""A button that closes the drawer."""
tag = "Drawer.Close"
# Render the close button as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer close component."""
props["data-slot"] = "drawer-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class DrawerTitle(DrawerBaseComponent):
"""An optional accessible title to be announced when the drawer is opened."""
tag = "Drawer.Title"
# Render the title as a child. Defaults to False.
as_child: Var[bool]
@classmethod
|
class DrawerDescription(DrawerBaseComponent):
"""An optional accessible description to be announced when the drawer is opened."""
tag = "Drawer.Description"
# Render the description as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer description component."""
props["data-slot"] = "drawer-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
class DrawerHandle(DrawerBaseComponent):
"""An optional handle to drag the drawer."""
tag = "Drawer.Handle"
alias = "Vaul" + tag
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer handle component."""
props["data-slot"] = "drawer-handle"
cls.set_class_name(ClassNames.HANDLE, props)
return super().create(*children, **props)
class HighLevelDrawer(DrawerRoot):
"""Hi | def create(cls, *children, **props) -> Component:
"""Create the drawer title component."""
props["data-slot"] = "drawer-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props) |
rawer overlay component."""
props["data-slot"] = "drawer-overlay"
cls.set_class_name(ClassNames.OVERLAY, props)
return super().create(*children, **props)
class DrawerClose(DrawerBaseComponent):
"""A button that closes the drawer."""
tag = "Drawer.Close"
# Render the close button as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer close component."""
props["data-slot"] = "drawer-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class DrawerTitle(DrawerBaseComponent):
"""An optional accessible title to be announced when the drawer is opened."""
tag = "Drawer.Title"
# Render the title as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer title component."""
|
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DrawerDescription(DrawerBaseComponent):
"""An optional accessible description to be announced when the drawer is opened."""
tag = "Drawer.Description"
# Render the description as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer description component."""
props["data-slot"] = "drawer-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
class DrawerHandle(DrawerBaseComponent):
"""An optional handle to drag the drawer."""
tag = "Drawer.Handle"
alias = "Vaul" + tag
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer handle component."""
props["data-slot"] = "drawer-handle"
cls.set_class_name(ClassNames.HANDLE, p | props["data-slot"] = "drawer-title" |
rn super().create(*children, **props)
class DrawerClose(DrawerBaseComponent):
"""A button that closes the drawer."""
tag = "Drawer.Close"
# Render the close button as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer close component."""
props["data-slot"] = "drawer-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class DrawerTitle(DrawerBaseComponent):
"""An optional accessible title to be announced when the drawer is opened."""
tag = "Drawer.Title"
# Render the title as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer title component."""
props["data-slot"] = "drawer-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
|
class DrawerHandle(DrawerBaseComponent):
"""An optional handle to drag the drawer."""
tag = "Drawer.Handle"
alias = "Vaul" + tag
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer handle component."""
props["data-slot"] = "drawer-handle"
cls.set_class_name(ClassNames.HANDLE, props)
return super().create(*children, **props)
class HighLevelDrawer(DrawerRoot):
"""High level wrapper for the Drawer component."""
# Drawer props
trigger: Var[Component | None]
content: Var[str | Component | None]
title: Var[str | Component | None]
description: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the high level drawer component."""
trigger = props.pop("trigger", None)
content = props.pop("content", None)
title = props.pop("title", None)
description = props.pop("description", None)
| class DrawerDescription(DrawerBaseComponent):
"""An optional accessible description to be announced when the drawer is opened."""
tag = "Drawer.Description"
# Render the description as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer description component."""
props["data-slot"] = "drawer-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props) |
er.Close"
# Render the close button as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer close component."""
props["data-slot"] = "drawer-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class DrawerTitle(DrawerBaseComponent):
"""An optional accessible title to be announced when the drawer is opened."""
tag = "Drawer.Title"
# Render the title as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer title component."""
props["data-slot"] = "drawer-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DrawerDescription(DrawerBaseComponent):
"""An optional accessible description to be announced when the drawer is opened."""
|
# Render the description as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer description component."""
props["data-slot"] = "drawer-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
class DrawerHandle(DrawerBaseComponent):
"""An optional handle to drag the drawer."""
tag = "Drawer.Handle"
alias = "Vaul" + tag
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer handle component."""
props["data-slot"] = "drawer-handle"
cls.set_class_name(ClassNames.HANDLE, props)
return super().create(*children, **props)
class HighLevelDrawer(DrawerRoot):
"""High level wrapper for the Drawer component."""
# Drawer props
trigger: Var[Component | None]
content: Var[str | Component | None]
title: Var[str | Compo | tag = "Drawer.Description" |
*children, **props) -> Component:
"""Create the drawer close component."""
props["data-slot"] = "drawer-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class DrawerTitle(DrawerBaseComponent):
"""An optional accessible title to be announced when the drawer is opened."""
tag = "Drawer.Title"
# Render the title as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer title component."""
props["data-slot"] = "drawer-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DrawerDescription(DrawerBaseComponent):
"""An optional accessible description to be announced when the drawer is opened."""
tag = "Drawer.Description"
# Render the description as a child. Defaults to False.
as_child: Var[bool]
@classmethod
|
class DrawerHandle(DrawerBaseComponent):
"""An optional handle to drag the drawer."""
tag = "Drawer.Handle"
alias = "Vaul" + tag
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer handle component."""
props["data-slot"] = "drawer-handle"
cls.set_class_name(ClassNames.HANDLE, props)
return super().create(*children, **props)
class HighLevelDrawer(DrawerRoot):
"""High level wrapper for the Drawer component."""
# Drawer props
trigger: Var[Component | None]
content: Var[str | Component | None]
title: Var[str | Component | None]
description: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the high level drawer component."""
trigger = props.pop("trigger", None)
content = props.pop("content", None)
title = props.pop("title", None)
description = props.pop("description", None)
| def create(cls, *children, **props) -> Component:
"""Create the drawer description component."""
props["data-slot"] = "drawer-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props) |
drawer-close"
cls.set_class_name(ClassNames.CLOSE, props)
return super().create(*children, **props)
class DrawerTitle(DrawerBaseComponent):
"""An optional accessible title to be announced when the drawer is opened."""
tag = "Drawer.Title"
# Render the title as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer title component."""
props["data-slot"] = "drawer-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DrawerDescription(DrawerBaseComponent):
"""An optional accessible description to be announced when the drawer is opened."""
tag = "Drawer.Description"
# Render the description as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer description component."""
|
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
class DrawerHandle(DrawerBaseComponent):
"""An optional handle to drag the drawer."""
tag = "Drawer.Handle"
alias = "Vaul" + tag
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer handle component."""
props["data-slot"] = "drawer-handle"
cls.set_class_name(ClassNames.HANDLE, props)
return super().create(*children, **props)
class HighLevelDrawer(DrawerRoot):
"""High level wrapper for the Drawer component."""
# Drawer props
trigger: Var[Component | None]
content: Var[str | Component | None]
title: Var[str | Component | None]
description: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the high level drawer component."""
trigger = props.pop("trigger", None)
content = props.pop("cont | props["data-slot"] = "drawer-description" |
ent):
"""An optional accessible title to be announced when the drawer is opened."""
tag = "Drawer.Title"
# Render the title as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer title component."""
props["data-slot"] = "drawer-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DrawerDescription(DrawerBaseComponent):
"""An optional accessible description to be announced when the drawer is opened."""
tag = "Drawer.Description"
# Render the description as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer description component."""
props["data-slot"] = "drawer-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
|
class HighLevelDrawer(DrawerRoot):
"""High level wrapper for the Drawer component."""
# Drawer props
trigger: Var[Component | None]
content: Var[str | Component | None]
title: Var[str | Component | None]
description: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the high level drawer component."""
trigger = props.pop("trigger", None)
content = props.pop("content", None)
title = props.pop("title", None)
description = props.pop("description", None)
return super().create(
DrawerTrigger.create(render_=trigger) if trigger is not None else None,
DrawerPortal.create(
DrawerOverlay.create(),
DrawerContent.create(
DrawerTitle.create(title) if title is not None else None,
(
DrawerDescription.create(description)
if d | class DrawerHandle(DrawerBaseComponent):
"""An optional handle to drag the drawer."""
tag = "Drawer.Handle"
alias = "Vaul" + tag
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer handle component."""
props["data-slot"] = "drawer-handle"
cls.set_class_name(ClassNames.HANDLE, props)
return super().create(*children, **props) |
g = "Drawer.Title"
# Render the title as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer title component."""
props["data-slot"] = "drawer-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DrawerDescription(DrawerBaseComponent):
"""An optional accessible description to be announced when the drawer is opened."""
tag = "Drawer.Description"
# Render the description as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer description component."""
props["data-slot"] = "drawer-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
class DrawerHandle(DrawerBaseComponent):
"""An optional handle to drag the drawer."""
|
alias = "Vaul" + tag
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer handle component."""
props["data-slot"] = "drawer-handle"
cls.set_class_name(ClassNames.HANDLE, props)
return super().create(*children, **props)
class HighLevelDrawer(DrawerRoot):
"""High level wrapper for the Drawer component."""
# Drawer props
trigger: Var[Component | None]
content: Var[str | Component | None]
title: Var[str | Component | None]
description: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the high level drawer component."""
trigger = props.pop("trigger", None)
content = props.pop("content", None)
title = props.pop("title", None)
description = props.pop("description", None)
return super().create(
DrawerTrigger.create(render_=trigger) if trigger is not None else None,
| tag = "Drawer.Handle" |
ender the title as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer title component."""
props["data-slot"] = "drawer-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DrawerDescription(DrawerBaseComponent):
"""An optional accessible description to be announced when the drawer is opened."""
tag = "Drawer.Description"
# Render the description as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer description component."""
props["data-slot"] = "drawer-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
class DrawerHandle(DrawerBaseComponent):
"""An optional handle to drag the drawer."""
tag = "Drawer.Handle"
|
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer handle component."""
props["data-slot"] = "drawer-handle"
cls.set_class_name(ClassNames.HANDLE, props)
return super().create(*children, **props)
class HighLevelDrawer(DrawerRoot):
"""High level wrapper for the Drawer component."""
# Drawer props
trigger: Var[Component | None]
content: Var[str | Component | None]
title: Var[str | Component | None]
description: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the high level drawer component."""
trigger = props.pop("trigger", None)
content = props.pop("content", None)
title = props.pop("title", None)
description = props.pop("description", None)
return super().create(
DrawerTrigger.create(render_=trigger) if trigger is not None else None,
DrawerPortal.create | alias = "Vaul" + tag |
se.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer title component."""
props["data-slot"] = "drawer-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DrawerDescription(DrawerBaseComponent):
"""An optional accessible description to be announced when the drawer is opened."""
tag = "Drawer.Description"
# Render the description as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer description component."""
props["data-slot"] = "drawer-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
class DrawerHandle(DrawerBaseComponent):
"""An optional handle to drag the drawer."""
tag = "Drawer.Handle"
alias = "Vaul" + tag
@classmethod
|
class HighLevelDrawer(DrawerRoot):
"""High level wrapper for the Drawer component."""
# Drawer props
trigger: Var[Component | None]
content: Var[str | Component | None]
title: Var[str | Component | None]
description: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the high level drawer component."""
trigger = props.pop("trigger", None)
content = props.pop("content", None)
title = props.pop("title", None)
description = props.pop("description", None)
return super().create(
DrawerTrigger.create(render_=trigger) if trigger is not None else None,
DrawerPortal.create(
DrawerOverlay.create(),
DrawerContent.create(
DrawerTitle.create(title) if title is not None else None,
(
DrawerDescription.create(description)
if d | def create(cls, *children, **props) -> Component:
"""Create the drawer handle component."""
props["data-slot"] = "drawer-handle"
cls.set_class_name(ClassNames.HANDLE, props)
return super().create(*children, **props) |
"""Create the drawer title component."""
props["data-slot"] = "drawer-title"
cls.set_class_name(ClassNames.TITLE, props)
return super().create(*children, **props)
class DrawerDescription(DrawerBaseComponent):
"""An optional accessible description to be announced when the drawer is opened."""
tag = "Drawer.Description"
# Render the description as a child. Defaults to False.
as_child: Var[bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer description component."""
props["data-slot"] = "drawer-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
class DrawerHandle(DrawerBaseComponent):
"""An optional handle to drag the drawer."""
tag = "Drawer.Handle"
alias = "Vaul" + tag
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer handle component."""
|
cls.set_class_name(ClassNames.HANDLE, props)
return super().create(*children, **props)
class HighLevelDrawer(DrawerRoot):
"""High level wrapper for the Drawer component."""
# Drawer props
trigger: Var[Component | None]
content: Var[str | Component | None]
title: Var[str | Component | None]
description: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the high level drawer component."""
trigger = props.pop("trigger", None)
content = props.pop("content", None)
title = props.pop("title", None)
description = props.pop("description", None)
return super().create(
DrawerTrigger.create(render_=trigger) if trigger is not None else None,
DrawerPortal.create(
DrawerOverlay.create(),
DrawerContent.create(
DrawerTitle.create(title) if title is not None else None,
| props["data-slot"] = "drawer-handle" |
bool]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer description component."""
props["data-slot"] = "drawer-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
class DrawerHandle(DrawerBaseComponent):
"""An optional handle to drag the drawer."""
tag = "Drawer.Handle"
alias = "Vaul" + tag
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer handle component."""
props["data-slot"] = "drawer-handle"
cls.set_class_name(ClassNames.HANDLE, props)
return super().create(*children, **props)
class HighLevelDrawer(DrawerRoot):
"""High level wrapper for the Drawer component."""
# Drawer props
trigger: Var[Component | None]
content: Var[str | Component | None]
title: Var[str | Component | None]
description: Var[str | Component | None]
@classmethod
|
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
"title",
"description",
]
class Drawer(ComponentNamespace):
"""A namespace for Drawer components."""
root = staticmethod(DrawerRoot.create)
trigger = staticmethod(DrawerTrigger.create)
portal = staticmethod(DrawerPortal.create)
content = staticmethod(DrawerContent.create)
overlay = staticmethod(DrawerOverlay.create)
close = staticmethod(DrawerClose.create)
title = staticmethod(DrawerTitle.create)
description = staticmethod(DrawerDescription.create)
handle = staticmethod(DrawerHandle.create)
class_names = ClassNames
__call__ = staticmethod(HighLevelDrawer.create)
drawer = Drawer()
| def create(cls, *children, **props) -> Component:
"""Create the high level drawer component."""
trigger = props.pop("trigger", None)
content = props.pop("content", None)
title = props.pop("title", None)
description = props.pop("description", None)
return super().create(
DrawerTrigger.create(render_=trigger) if trigger is not None else None,
DrawerPortal.create(
DrawerOverlay.create(),
DrawerContent.create(
DrawerTitle.create(title) if title is not None else None,
(
DrawerDescription.create(description)
if description is not None
else None
),
content,
*children,
),
),
**props,
) |
iption component."""
props["data-slot"] = "drawer-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
class DrawerHandle(DrawerBaseComponent):
"""An optional handle to drag the drawer."""
tag = "Drawer.Handle"
alias = "Vaul" + tag
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer handle component."""
props["data-slot"] = "drawer-handle"
cls.set_class_name(ClassNames.HANDLE, props)
return super().create(*children, **props)
class HighLevelDrawer(DrawerRoot):
"""High level wrapper for the Drawer component."""
# Drawer props
trigger: Var[Component | None]
content: Var[str | Component | None]
title: Var[str | Component | None]
description: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the high level drawer component."""
|
content = props.pop("content", None)
title = props.pop("title", None)
description = props.pop("description", None)
return super().create(
DrawerTrigger.create(render_=trigger) if trigger is not None else None,
DrawerPortal.create(
DrawerOverlay.create(),
DrawerContent.create(
DrawerTitle.create(title) if title is not None else None,
(
DrawerDescription.create(description)
if description is not None
else None
),
content,
*children,
),
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
"title",
"description",
]
class Drawer(ComponentNamespace) | trigger = props.pop("trigger", None) |
"] = "drawer-description"
cls.set_class_name(ClassNames.DESCRIPTION, props)
return super().create(*children, **props)
class DrawerHandle(DrawerBaseComponent):
"""An optional handle to drag the drawer."""
tag = "Drawer.Handle"
alias = "Vaul" + tag
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the drawer handle component."""
props["data-slot"] = "drawer-handle"
cls.set_class_name(ClassNames.HANDLE, props)
return super().create(*children, **props)
class HighLevelDrawer(DrawerRoot):
"""High level wrapper for the Drawer component."""
# Drawer props
trigger: Var[Component | None]
content: Var[str | Component | None]
title: Var[str | Component | None]
description: Var[str | Component | None]
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the high level drawer component."""
trigger = props.pop("trigger", None)
|
title = props.pop("title", None)
description = props.pop("description", None)
return super().create(
DrawerTrigger.create(render_=trigger) if trigger is not None else None,
DrawerPortal.create(
DrawerOverlay.create(),
DrawerContent.create(
DrawerTitle.create(title) if title is not None else None,
(
DrawerDescription.create(description)
if description is not None
else None
),
content,
*children,
),
),
**props,
)
def _exclude_props(self) -> list[str]:
return [
*super()._exclude_props(),
"trigger",
"content",
"title",
"description",
]
class Drawer(ComponentNamespace):
"""A namespace for Drawer components."" | content = props.pop("content", None) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.