instruction
stringlengths
0
1k
input
stringlengths
1
1k
output
stringlengths
10
6.51k
"""Custom button component."""
from reflex.components.core.cond import cond from reflex.components.el import Button as BaseButton from reflex.vars.base import Var from reflex_ui.components.component import CoreComponent from reflex_ui.components.icons.others import spinner LiteralButtonVariant = Literal[ "primary", "destructive", "outline", ...
from typing import Literal
"""Custom button component.""" from typing import Literal
from reflex.components.el import Button as BaseButton from reflex.vars.base import Var from reflex_ui.components.component import CoreComponent from reflex_ui.components.icons.others import spinner LiteralButtonVariant = Literal[ "primary", "destructive", "outline", "secondary", "ghost", "link", "dark" ] Literal...
from reflex.components.core.cond import cond
"""Custom button component.""" from typing import Literal from reflex.components.core.cond import cond
from reflex.vars.base import Var from reflex_ui.components.component import CoreComponent from reflex_ui.components.icons.others import spinner LiteralButtonVariant = Literal[ "primary", "destructive", "outline", "secondary", "ghost", "link", "dark" ] LiteralButtonSize = Literal[ "xs", "sm", "md", "lg", "xl"...
from reflex.components.el import Button as BaseButton
"""Custom button component.""" from typing import Literal from reflex.components.core.cond import cond from reflex.components.el import Button as BaseButton
from reflex_ui.components.component import CoreComponent from reflex_ui.components.icons.others import spinner LiteralButtonVariant = Literal[ "primary", "destructive", "outline", "secondary", "ghost", "link", "dark" ] LiteralButtonSize = Literal[ "xs", "sm", "md", "lg", "xl", "icon-xs", "icon-sm", "icon-md"...
from reflex.vars.base import Var
"""Custom button component.""" from typing import Literal from reflex.components.core.cond import cond from reflex.components.el import Button as BaseButton from reflex.vars.base import Var
from reflex_ui.components.icons.others import spinner LiteralButtonVariant = Literal[ "primary", "destructive", "outline", "secondary", "ghost", "link", "dark" ] LiteralButtonSize = Literal[ "xs", "sm", "md", "lg", "xl", "icon-xs", "icon-sm", "icon-md", "icon-lg", "icon-xl" ] DEFAULT_CLASS_NAME = "inline-fle...
from reflex_ui.components.component import CoreComponent
"""Custom button component.""" from typing import Literal from reflex.components.core.cond import cond from reflex.components.el import Button as BaseButton from reflex.vars.base import Var from reflex_ui.components.component import CoreComponent
LiteralButtonVariant = Literal[ "primary", "destructive", "outline", "secondary", "ghost", "link", "dark" ] LiteralButtonSize = Literal[ "xs", "sm", "md", "lg", "xl", "icon-xs", "icon-sm", "icon-md", "icon-lg", "icon-xl" ] DEFAULT_CLASS_NAME = "inline-flex items-center justify-center whitespace-nowrap text-s...
from reflex_ui.components.icons.others import spinner
"""Custom button component.""" from typing import Literal from reflex.components.core.cond import cond from reflex.components.el import Button as BaseButton from reflex.vars.base import Var from reflex_ui.components.component import CoreComponent from reflex_ui.components.icons.others import spinner
LiteralButtonSize = Literal[ "xs", "sm", "md", "lg", "xl", "icon-xs", "icon-sm", "icon-md", "icon-lg", "icon-xl" ] DEFAULT_CLASS_NAME = "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:border disabled:border-secondary-4/80 disabl...
LiteralButtonVariant = Literal[ "primary", "destructive", "outline", "secondary", "ghost", "link", "dark" ]
"""Custom button component.""" from typing import Literal from reflex.components.core.cond import cond from reflex.components.el import Button as BaseButton from reflex.vars.base import Var from reflex_ui.components.component import CoreComponent from reflex_ui.components.icons.others import spinner LiteralButtonVa...
DEFAULT_CLASS_NAME = "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:border disabled:border-secondary-4/80 disabled:bg-secondary-3 disabled:text-secondary-8 shrink-0 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 text-m...
LiteralButtonSize = Literal[ "xs", "sm", "md", "lg", "xl", "icon-xs", "icon-sm", "icon-md", "icon-lg", "icon-xl" ]
"""Custom button component.""" from typing import Literal from reflex.components.core.cond import cond from reflex.components.el import Button as BaseButton from reflex.vars.base import Var from reflex_ui.components.component import CoreComponent from reflex_ui.components.icons.others import spinner LiteralButtonVa...
BUTTON_VARIANTS = { "variant": { "primary": "bg-primary-9 text-white hover:bg-primary-10", "destructive": "bg-destructive-9 hover:bg-destructive-10 text-white", "outline": "border border-secondary-a4 bg-secondary-1 hover:bg-secondary-3 text-secondary-12", "secondary": "bg-secondary...
DEFAULT_CLASS_NAME = "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-colors disabled:cursor-not-allowed disabled:border disabled:border-secondary-4/80 disabled:bg-secondary-3 disabled:text-secondary-8 shrink-0 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 text-med...
underline", "dark": "bg-secondary-12 text-secondary-1 hover:bg-secondary-12/80", }, "size": { "xs": "px-1.5 h-7 rounded-ui-xs gap-1.5", "sm": "px-2 h-8 rounded-ui-sm gap-2", "md": "px-2.5 h-9 rounded-ui-md gap-2", "lg": "px-3 h-10 rounded-ui-lg gap-2.5", "xl": "px...
cls.validate_variant(variant) size = props.pop("size", "md") cls.validate_size(size) loading = props.pop("loading", False) disabled = props.pop("disabled", False) button_classes = f"{DEFAULT_CLASS_NAME} {BUTTON_VARIANTS['variant'][variant]} {BUTTON_VARIANTS['size'][si...
variant = props.pop("variant", "primary")
}, "size": { "xs": "px-1.5 h-7 rounded-ui-xs gap-1.5", "sm": "px-2 h-8 rounded-ui-sm gap-2", "md": "px-2.5 h-9 rounded-ui-md gap-2", "lg": "px-3 h-10 rounded-ui-lg gap-2.5", "xl": "px-3.5 h-12 rounded-ui-xl gap-3", "icon-xs": "size-7 rounded-ui-xs", "icon-...
cls.validate_size(size) loading = props.pop("loading", False) disabled = props.pop("disabled", False) button_classes = f"{DEFAULT_CLASS_NAME} {BUTTON_VARIANTS['variant'][variant]} {BUTTON_VARIANTS['size'][size]}" cls.set_class_name(button_classes, props) children_lis...
size = props.pop("size", "md")
"sm": "px-2 h-8 rounded-ui-sm gap-2", "md": "px-2.5 h-9 rounded-ui-md gap-2", "lg": "px-3 h-10 rounded-ui-lg gap-2.5", "xl": "px-3.5 h-12 rounded-ui-xl gap-3", "icon-xs": "size-7 rounded-ui-xs", "icon-sm": "size-8 rounded-ui-sm", "icon-md": "size-9 rounded-ui-md", ...
disabled = props.pop("disabled", False) button_classes = f"{DEFAULT_CLASS_NAME} {BUTTON_VARIANTS['variant'][variant]} {BUTTON_VARIANTS['size'][size]}" cls.set_class_name(button_classes, props) children_list = list(children) if isinstance(loading, Var): props["dis...
loading = props.pop("loading", False)
"md": "px-2.5 h-9 rounded-ui-md gap-2", "lg": "px-3 h-10 rounded-ui-lg gap-2.5", "xl": "px-3.5 h-12 rounded-ui-xl gap-3", "icon-xs": "size-7 rounded-ui-xs", "icon-sm": "size-8 rounded-ui-sm", "icon-md": "size-9 rounded-ui-md", "icon-lg": "size-10 rounded-ui-lg", ...
button_classes = f"{DEFAULT_CLASS_NAME} {BUTTON_VARIANTS['variant'][variant]} {BUTTON_VARIANTS['size'][size]}" cls.set_class_name(button_classes, props) children_list = list(children) if isinstance(loading, Var): props["disabled"] = cond(loading, True, disabled) ...
disabled = props.pop("disabled", False)
"lg": "px-3 h-10 rounded-ui-lg gap-2.5", "xl": "px-3.5 h-12 rounded-ui-xl gap-3", "icon-xs": "size-7 rounded-ui-xs", "icon-sm": "size-8 rounded-ui-sm", "icon-md": "size-9 rounded-ui-md", "icon-lg": "size-10 rounded-ui-lg", "icon-xl": "size-12 rounded-ui-xl", }, ...
cls.set_class_name(button_classes, props) children_list = list(children) if isinstance(loading, Var): props["disabled"] = cond(loading, True, disabled) children_list.insert(0, cond(loading, spinner())) else: props["disabled"] = True if loading else...
button_classes = f"{DEFAULT_CLASS_NAME} {BUTTON_VARIANTS['variant'][variant]} {BUTTON_VARIANTS['size'][size]}"
ed-ui-sm", "icon-md": "size-9 rounded-ui-md", "icon-lg": "size-10 rounded-ui-lg", "icon-xl": "size-12 rounded-ui-xl", }, } class Button(BaseButton, CoreComponent): """A custom button component.""" # Button variant. Defaults to "primary". variant: Var[LiteralButtonVariant] ...
if isinstance(loading, Var): props["disabled"] = cond(loading, True, disabled) children_list.insert(0, cond(loading, spinner())) else: props["disabled"] = True if loading else disabled children_list.insert(0, spinner()) if loading else None retu...
children_list = list(children)
unded-ui-md", "icon-lg": "size-10 rounded-ui-lg", "icon-xl": "size-12 rounded-ui-xl", }, } class Button(BaseButton, CoreComponent): """A custom button component.""" # Button variant. Defaults to "primary". variant: Var[LiteralButtonVariant] # Button size. Defaults to "md". si...
return super().create(*children_list, **props) @staticmethod def validate_variant(variant: LiteralButtonVariant): """Validate the button variant.""" if variant not in BUTTON_VARIANTS["variant"]: available_variants = ", ".join(BUTTON_VARIANTS["variant"].keys()) ...
if isinstance(loading, Var): props["disabled"] = cond(loading, True, disabled) children_list.insert(0, cond(loading, spinner())) else: props["disabled"] = True if loading else disabled children_list.insert(0, spinner()) if loading else None
rounded-ui-lg", "icon-xl": "size-12 rounded-ui-xl", }, } class Button(BaseButton, CoreComponent): """A custom button component.""" # Button variant. Defaults to "primary". variant: Var[LiteralButtonVariant] # Button size. Defaults to "md". size: Var[LiteralButtonSize] # The loa...
children_list.insert(0, cond(loading, spinner())) else: props["disabled"] = True if loading else disabled children_list.insert(0, spinner()) if loading else None return super().create(*children_list, **props) @staticmethod def validate_variant(variant: Lite...
props["disabled"] = cond(loading, True, disabled)
mponent.""" # Button variant. Defaults to "primary". variant: Var[LiteralButtonVariant] # Button size. Defaults to "md". size: Var[LiteralButtonSize] # The loading state of the button loading: Var[bool] @classmethod def create(cls, *children, **props) -> BaseButton: """Create...
children_list.insert(0, spinner()) if loading else None return super().create(*children_list, **props) @staticmethod def validate_variant(variant: LiteralButtonVariant): """Validate the button variant.""" if variant not in BUTTON_VARIANTS["variant"]: available_...
props["disabled"] = True if loading else disabled
he button loading: Var[bool] @classmethod def create(cls, *children, **props) -> BaseButton: """Create the button component.""" variant = props.pop("variant", "primary") cls.validate_variant(variant) size = props.pop("size", "md") cls.validate_size(size) lo...
@staticmethod def validate_size(size: LiteralButtonSize): """Validate the button size.""" if size not in BUTTON_VARIANTS["size"]: available_sizes = ", ".join(BUTTON_VARIANTS["size"].keys()) message = f"Invalid size: {size}. Available sizes: {available_sizes}" ...
def validate_variant(variant: LiteralButtonVariant): """Validate the button variant.""" if variant not in BUTTON_VARIANTS["variant"]: available_variants = ", ".join(BUTTON_VARIANTS["variant"].keys()) message = ( f"Invalid variant: {variant}. Available variants: {a...
: """Create the button component.""" variant = props.pop("variant", "primary") cls.validate_variant(variant) size = props.pop("size", "md") cls.validate_size(size) loading = props.pop("loading", False) disabled = props.pop("disabled", False) button_clas...
@staticmethod def validate_size(size: LiteralButtonSize): """Validate the button size.""" if size not in BUTTON_VARIANTS["size"]: available_sizes = ", ".join(BUTTON_VARIANTS["size"].keys()) message = f"Invalid size: {size}. Available sizes: {available_sizes}" ...
if variant not in BUTTON_VARIANTS["variant"]: available_variants = ", ".join(BUTTON_VARIANTS["variant"].keys()) message = ( f"Invalid variant: {variant}. Available variants: {available_variants}" ) raise ValueError(message)
nt = props.pop("variant", "primary") cls.validate_variant(variant) size = props.pop("size", "md") cls.validate_size(size) loading = props.pop("loading", False) disabled = props.pop("disabled", False) button_classes = f"{DEFAULT_CLASS_NAME} {BUTTON_VARIANTS['variant'][v...
message = ( f"Invalid variant: {variant}. Available variants: {available_variants}" ) raise ValueError(message) @staticmethod def validate_size(size: LiteralButtonSize): """Validate the button size.""" if size not in BUTTON_VARIANTS["size"]: ...
available_variants = ", ".join(BUTTON_VARIANTS["variant"].keys())
tton_classes = f"{DEFAULT_CLASS_NAME} {BUTTON_VARIANTS['variant'][variant]} {BUTTON_VARIANTS['size'][size]}" cls.set_class_name(button_classes, props) children_list = list(children) if isinstance(loading, Var): props["disabled"] = cond(loading, True, disabled) children...
def _exclude_props(self) -> list[str]: return [ *super()._exclude_props(), "size", "variant", "loading", ] button = Button.create
def validate_size(size: LiteralButtonSize): """Validate the button size.""" if size not in BUTTON_VARIANTS["size"]: available_sizes = ", ".join(BUTTON_VARIANTS["size"].keys()) message = f"Invalid size: {size}. Available sizes: {available_sizes}" raise ValueError(messa...
['size'][size]}" cls.set_class_name(button_classes, props) children_list = list(children) if isinstance(loading, Var): props["disabled"] = cond(loading, True, disabled) children_list.insert(0, cond(loading, spinner())) else: props["disabled"] = True...
def _exclude_props(self) -> list[str]: return [ *super()._exclude_props(), "size", "variant", "loading", ] button = Button.create
if size not in BUTTON_VARIANTS["size"]: available_sizes = ", ".join(BUTTON_VARIANTS["size"].keys()) message = f"Invalid size: {size}. Available sizes: {available_sizes}" raise ValueError(message)
classes, props) children_list = list(children) if isinstance(loading, Var): props["disabled"] = cond(loading, True, disabled) children_list.insert(0, cond(loading, spinner())) else: props["disabled"] = True if loading else disabled children_list....
message = f"Invalid size: {size}. Available sizes: {available_sizes}" raise ValueError(message) def _exclude_props(self) -> list[str]: return [ *super()._exclude_props(), "size", "variant", "loading", ] button = Button.creat...
available_sizes = ", ".join(BUTTON_VARIANTS["size"].keys())
stance(loading, Var): props["disabled"] = cond(loading, True, disabled) children_list.insert(0, cond(loading, spinner())) else: props["disabled"] = True if loading else disabled children_list.insert(0, spinner()) if loading else None return super().create...
raise ValueError(message) def _exclude_props(self) -> list[str]: return [ *super()._exclude_props(), "size", "variant", "loading", ] button = Button.create
message = f"Invalid size: {size}. Available sizes: {available_sizes}"
ert(0, cond(loading, spinner())) else: props["disabled"] = True if loading else disabled children_list.insert(0, spinner()) if loading else None return super().create(*children_list, **props) @staticmethod def validate_variant(variant: LiteralButtonVariant): """...
button = Button.create
def _exclude_props(self) -> list[str]: return [ *super()._exclude_props(), "size", "variant", "loading", ]
one return super().create(*children_list, **props) @staticmethod def validate_variant(variant: LiteralButtonVariant): """Validate the button variant.""" if variant not in BUTTON_VARIANTS["variant"]: available_variants = ", ".join(BUTTON_VARIANTS["variant"].keys()) ...
button = Button.create
"""Custom card component."""
from reflex.components.el import Div from reflex.vars.base import Var from reflex_ui.components.component import CoreComponent class ClassNames: """Class names for the card component.""" ROOT = "rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-small" HEADER = "flex flex-col gap-2 p-6" ...
from reflex.components.component import Component, ComponentNamespace
"""Custom card component.""" from reflex.components.component import Component, ComponentNamespace
from reflex.vars.base import Var from reflex_ui.components.component import CoreComponent class ClassNames: """Class names for the card component.""" ROOT = "rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-small" HEADER = "flex flex-col gap-2 p-6" TITLE = "text-2xl font-semibold text...
from reflex.components.el import Div
"""Custom card component.""" from reflex.components.component import Component, ComponentNamespace from reflex.components.el import Div
from reflex_ui.components.component import CoreComponent class ClassNames: """Class names for the card component.""" ROOT = "rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-small" HEADER = "flex flex-col gap-2 p-6" TITLE = "text-2xl font-semibold text-secondary-12" DESCRIPTION = ...
from reflex.vars.base import Var
"""Custom card component.""" from reflex.components.component import Component, ComponentNamespace from reflex.components.el import Div from reflex.vars.base import Var
class ClassNames: """Class names for the card component.""" ROOT = "rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-small" HEADER = "flex flex-col gap-2 p-6" TITLE = "text-2xl font-semibold text-secondary-12" DESCRIPTION = "text-sm text-secondary-11 font-[450]" CONTENT = "flex...
from reflex_ui.components.component import CoreComponent
"""Custom card component.""" from reflex.components.component import Component, ComponentNamespace from reflex.components.el import Div from reflex.vars.base import Var from reflex_ui.components.component import CoreComponent
class CardComponent(Div, CoreComponent): """Base component for the card component.""" class CardRoot(CardComponent): """A card component that displays content in a card format.""" @classmethod def create(cls, *children, **props): """Create the card component.""" props["data-slot"] ...
class ClassNames: """Class names for the card component.""" ROOT = "rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-small" HEADER = "flex flex-col gap-2 p-6" TITLE = "text-2xl font-semibold text-secondary-12" DESCRIPTION = "text-sm text-secondary-11 font-[450]" CONTENT = "flex fl...
"""Custom card component.""" from reflex.components.component import Component, ComponentNamespace from reflex.components.el import Div from reflex.vars.base import Var from reflex_ui.components.component import CoreComponent class ClassNames: """Class names for the card component."""
HEADER = "flex flex-col gap-2 p-6" TITLE = "text-2xl font-semibold text-secondary-12" DESCRIPTION = "text-sm text-secondary-11 font-[450]" CONTENT = "flex flex-col gap-4 px-6 pb-6" FOOTER = "flex flex-row justify-between items-center px-6 pb-6" class CardComponent(Div, CoreComponent): """Base...
ROOT = "rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-small"
"""Custom card component.""" from reflex.components.component import Component, ComponentNamespace from reflex.components.el import Div from reflex.vars.base import Var from reflex_ui.components.component import CoreComponent class ClassNames: """Class names for the card component.""" ROOT = "rounded-ui-xl...
DESCRIPTION = "text-sm text-secondary-11 font-[450]" CONTENT = "flex flex-col gap-4 px-6 pb-6" FOOTER = "flex flex-row justify-between items-center px-6 pb-6" class CardComponent(Div, CoreComponent): """Base component for the card component.""" class CardRoot(CardComponent): """A card component...
TITLE = "text-2xl font-semibold text-secondary-12"
"""Custom card component.""" from reflex.components.component import Component, ComponentNamespace from reflex.components.el import Div from reflex.vars.base import Var from reflex_ui.components.component import CoreComponent class ClassNames: """Class names for the card component.""" ROOT = "rounded-ui-xl...
CONTENT = "flex flex-col gap-4 px-6 pb-6" FOOTER = "flex flex-row justify-between items-center px-6 pb-6" class CardComponent(Div, CoreComponent): """Base component for the card component.""" class CardRoot(CardComponent): """A card component that displays content in a card format.""" @classme...
DESCRIPTION = "text-sm text-secondary-11 font-[450]"
"""Custom card component.""" from reflex.components.component import Component, ComponentNamespace from reflex.components.el import Div from reflex.vars.base import Var from reflex_ui.components.component import CoreComponent class ClassNames: """Class names for the card component.""" ROOT = "rounded-ui-xl...
FOOTER = "flex flex-row justify-between items-center px-6 pb-6" class CardComponent(Div, CoreComponent): """Base component for the card component.""" class CardRoot(CardComponent): """A card component that displays content in a card format.""" @classmethod def create(cls, *children, **props): ...
CONTENT = "flex flex-col gap-4 px-6 pb-6"
"""Custom card component.""" from reflex.components.component import Component, ComponentNamespace from reflex.components.el import Div from reflex.vars.base import Var from reflex_ui.components.component import CoreComponent class ClassNames: """Class names for the card component.""" ROOT = "rounded-ui-xl...
class CardComponent(Div, CoreComponent): """Base component for the card component.""" class CardRoot(CardComponent): """A card component that displays content in a card format.""" @classmethod def create(cls, *children, **props): """Create the card component.""" props["data-slot"] ...
FOOTER = "flex flex-row justify-between items-center px-6 pb-6"
"""Custom card component.""" from reflex.components.component import Component, ComponentNamespace from reflex.components.el import Div from reflex.vars.base import Var from reflex_ui.components.component import CoreComponent class ClassNames: """Class names for the card component.""" ROOT = "rounded-ui-xl...
class CardRoot(CardComponent): """A card component that displays content in a card format.""" @classmethod def create(cls, *children, **props): """Create the card component.""" props["data-slot"] = "card" cls.set_class_name(ClassNames.ROOT, props) return super().create(*c...
class CardComponent(Div, CoreComponent): """Base component for the card component."""
"""Custom card component.""" from reflex.components.component import Component, ComponentNamespace from reflex.components.el import Div from reflex.vars.base import Var from reflex_ui.components.component import CoreComponent class ClassNames: """Class names for the card component.""" ROOT = "rounded-ui-xl...
class CardHeader(CardComponent): """A header component for the card.""" @classmethod def create(cls, *children, **props): """Create the card header component.""" props["data-slot"] = "card-header" cls.set_class_name(ClassNames.HEADER, props) return super().create(*childre...
class CardRoot(CardComponent): """A card component that displays content in a card format.""" @classmethod def create(cls, *children, **props): """Create the card component.""" props["data-slot"] = "card" cls.set_class_name(ClassNames.ROOT, props) return super().create(*chil...
"""Custom card component.""" from reflex.components.component import Component, ComponentNamespace from reflex.components.el import Div from reflex.vars.base import Var from reflex_ui.components.component import CoreComponent class ClassNames: """Class names for the card component.""" ROOT = "rounded-ui-xl...
class CardHeader(CardComponent): """A header component for the card.""" @classmethod def create(cls, *children, **props): """Create the card header component.""" props["data-slot"] = "card-header" cls.set_class_name(ClassNames.HEADER, props) return super().create(*childre...
def create(cls, *children, **props): """Create the card component.""" props["data-slot"] = "card" cls.set_class_name(ClassNames.ROOT, props) return super().create(*children, **props)
"""Custom card component.""" from reflex.components.component import Component, ComponentNamespace from reflex.components.el import Div from reflex.vars.base import Var from reflex_ui.components.component import CoreComponent class ClassNames: """Class names for the card component.""" ROOT = "rounded-ui-xl...
cls.set_class_name(ClassNames.ROOT, props) return super().create(*children, **props) class CardHeader(CardComponent): """A header component for the card.""" @classmethod def create(cls, *children, **props): """Create the card header component.""" props["data-slot"] = "car...
props["data-slot"] = "card"
ponent, ComponentNamespace from reflex.components.el import Div from reflex.vars.base import Var from reflex_ui.components.component import CoreComponent class ClassNames: """Class names for the card component.""" ROOT = "rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-small" HEADER = "fl...
class CardTitle(CardComponent): """A title component for the card.""" @classmethod def create(cls, *children, **props): """Create the card title component.""" props["data-slot"] = "card-title" cls.set_class_name(ClassNames.TITLE, props) return super().create(*children, **...
class CardHeader(CardComponent): """A header component for the card.""" @classmethod def create(cls, *children, **props): """Create the card header component.""" props["data-slot"] = "card-header" cls.set_class_name(ClassNames.HEADER, props) return super().create(*children, ...
from reflex_ui.components.component import CoreComponent class ClassNames: """Class names for the card component.""" ROOT = "rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-small" HEADER = "flex flex-col gap-2 p-6" TITLE = "text-2xl font-semibold text-secondary-12" DESCRIPTION = "t...
class CardTitle(CardComponent): """A title component for the card.""" @classmethod def create(cls, *children, **props): """Create the card title component.""" props["data-slot"] = "card-title" cls.set_class_name(ClassNames.TITLE, props) return super().create(*children, **...
def create(cls, *children, **props): """Create the card header component.""" props["data-slot"] = "card-header" cls.set_class_name(ClassNames.HEADER, props) return super().create(*children, **props)
es for the card component.""" ROOT = "rounded-ui-xl border border-secondary-a4 bg-secondary-1 shadow-small" HEADER = "flex flex-col gap-2 p-6" TITLE = "text-2xl font-semibold text-secondary-12" DESCRIPTION = "text-sm text-secondary-11 font-[450]" CONTENT = "flex flex-col gap-4 px-6 pb-6" FOOTER...
cls.set_class_name(ClassNames.HEADER, props) return super().create(*children, **props) class CardTitle(CardComponent): """A title component for the card.""" @classmethod def create(cls, *children, **props): """Create the card title component.""" props["data-slot"] = "card...
props["data-slot"] = "card-header"
gap-2 p-6" TITLE = "text-2xl font-semibold text-secondary-12" DESCRIPTION = "text-sm text-secondary-11 font-[450]" CONTENT = "flex flex-col gap-4 px-6 pb-6" FOOTER = "flex flex-row justify-between items-center px-6 pb-6" class CardComponent(Div, CoreComponent): """Base component for the card comp...
class CardDescription(CardComponent): """A description component for the card.""" @classmethod def create(cls, *children, **props): """Create the card description component.""" props["data-slot"] = "card-description" cls.set_class_name(ClassNames.DESCRIPTION, props) retur...
class CardTitle(CardComponent): """A title component for the card.""" @classmethod def create(cls, *children, **props): """Create the card title component.""" props["data-slot"] = "card-title" cls.set_class_name(ClassNames.TITLE, props) return super().create(*children, **pro...
xt-secondary-11 font-[450]" CONTENT = "flex flex-col gap-4 px-6 pb-6" FOOTER = "flex flex-row justify-between items-center px-6 pb-6" class CardComponent(Div, CoreComponent): """Base component for the card component.""" class CardRoot(CardComponent): """A card component that displays content in a ca...
class CardDescription(CardComponent): """A description component for the card.""" @classmethod def create(cls, *children, **props): """Create the card description component.""" props["data-slot"] = "card-description" cls.set_class_name(ClassNames.DESCRIPTION, props) retur...
def create(cls, *children, **props): """Create the card title component.""" props["data-slot"] = "card-title" cls.set_class_name(ClassNames.TITLE, props) return super().create(*children, **props)
flex-row justify-between items-center px-6 pb-6" class CardComponent(Div, CoreComponent): """Base component for the card component.""" class CardRoot(CardComponent): """A card component that displays content in a card format.""" @classmethod def create(cls, *children, **props): """Create t...
cls.set_class_name(ClassNames.TITLE, props) return super().create(*children, **props) class CardDescription(CardComponent): """A description component for the card.""" @classmethod def create(cls, *children, **props): """Create the card description component.""" props["da...
props["data-slot"] = "card-title"
""" class CardRoot(CardComponent): """A card component that displays content in a card format.""" @classmethod def create(cls, *children, **props): """Create the card component.""" props["data-slot"] = "card" cls.set_class_name(ClassNames.ROOT, props) return super().create...
class CardContent(CardComponent): """A content component for the card.""" @classmethod def create(cls, *children, **props): """Create the card content component.""" props["data-slot"] = "card-content" cls.set_class_name(ClassNames.CONTENT, props) return super().create(*ch...
class CardDescription(CardComponent): """A description component for the card.""" @classmethod def create(cls, *children, **props): """Create the card description component.""" props["data-slot"] = "card-description" cls.set_class_name(ClassNames.DESCRIPTION, props) return s...
@classmethod def create(cls, *children, **props): """Create the card component.""" props["data-slot"] = "card" cls.set_class_name(ClassNames.ROOT, props) return super().create(*children, **props) class CardHeader(CardComponent): """A header component for the card.""" @cla...
class CardContent(CardComponent): """A content component for the card.""" @classmethod def create(cls, *children, **props): """Create the card content component.""" props["data-slot"] = "card-content" cls.set_class_name(ClassNames.CONTENT, props) return super().create(*ch...
def create(cls, *children, **props): """Create the card description component.""" props["data-slot"] = "card-description" cls.set_class_name(ClassNames.DESCRIPTION, props) return super().create(*children, **props)
props["data-slot"] = "card" cls.set_class_name(ClassNames.ROOT, props) return super().create(*children, **props) class CardHeader(CardComponent): """A header component for the card.""" @classmethod def create(cls, *children, **props): """Create the card header component.""" ...
cls.set_class_name(ClassNames.DESCRIPTION, props) return super().create(*children, **props) class CardContent(CardComponent): """A content component for the card.""" @classmethod def create(cls, *children, **props): """Create the card content component.""" props["data-slo...
props["data-slot"] = "card-description"
der(CardComponent): """A header component for the card.""" @classmethod def create(cls, *children, **props): """Create the card header component.""" props["data-slot"] = "card-header" cls.set_class_name(ClassNames.HEADER, props) return super().create(*children, **props) cl...
class CardFooter(CardComponent): """A footer component for the card.""" @classmethod def create(cls, *children, **props): """Create the card footer component.""" props["data-slot"] = "card-footer" cls.set_class_name(ClassNames.FOOTER, props) return super().create(*childre...
class CardContent(CardComponent): """A content component for the card.""" @classmethod def create(cls, *children, **props): """Create the card content component.""" props["data-slot"] = "card-content" cls.set_class_name(ClassNames.CONTENT, props) return super().create(*child...
*children, **props): """Create the card header component.""" props["data-slot"] = "card-header" cls.set_class_name(ClassNames.HEADER, props) return super().create(*children, **props) class CardTitle(CardComponent): """A title component for the card.""" @classmethod def cr...
class CardFooter(CardComponent): """A footer component for the card.""" @classmethod def create(cls, *children, **props): """Create the card footer component.""" props["data-slot"] = "card-footer" cls.set_class_name(ClassNames.FOOTER, props) return super().create(*childre...
def create(cls, *children, **props): """Create the card content component.""" props["data-slot"] = "card-content" cls.set_class_name(ClassNames.CONTENT, props) return super().create(*children, **props)
"] = "card-header" cls.set_class_name(ClassNames.HEADER, props) return super().create(*children, **props) class CardTitle(CardComponent): """A title component for the card.""" @classmethod def create(cls, *children, **props): """Create the card title component.""" props["d...
cls.set_class_name(ClassNames.CONTENT, props) return super().create(*children, **props) class CardFooter(CardComponent): """A footer component for the card.""" @classmethod def create(cls, *children, **props): """Create the card footer component.""" props["data-slot"] = "...
props["data-slot"] = "card-content"
rdComponent): """A title component for the card.""" @classmethod def create(cls, *children, **props): """Create the card title component.""" props["data-slot"] = "card-title" cls.set_class_name(ClassNames.TITLE, props) return super().create(*children, **props) class CardDe...
class HighLevelCard(CardComponent): """A high level card component that displays content in a card format.""" # Card props title: Var[str | Component | None] description: Var[str | Component | None] content: Var[str | Component | None] footer: Var[str | Component | None] @classmethod ...
class CardFooter(CardComponent): """A footer component for the card.""" @classmethod def create(cls, *children, **props): """Create the card footer component.""" props["data-slot"] = "card-footer" cls.set_class_name(ClassNames.FOOTER, props) return super().create(*children, ...
ldren, **props): """Create the card title component.""" props["data-slot"] = "card-title" cls.set_class_name(ClassNames.TITLE, props) return super().create(*children, **props) class CardDescription(CardComponent): """A description component for the card.""" @classmethod de...
class HighLevelCard(CardComponent): """A high level card component that displays content in a card format.""" # Card props title: Var[str | Component | None] description: Var[str | Component | None] content: Var[str | Component | None] footer: Var[str | Component | None] @classmethod ...
def create(cls, *children, **props): """Create the card footer component.""" props["data-slot"] = "card-footer" cls.set_class_name(ClassNames.FOOTER, props) return super().create(*children, **props)
d.""" @classmethod def create(cls, *children, **props): """Create the card content component.""" props["data-slot"] = "card-content" cls.set_class_name(ClassNames.CONTENT, props) return super().create(*children, **props) class CardFooter(CardComponent): """A footer compone...
description = props.pop("description", "") content = props.pop("content", "") footer = props.pop("footer", "") return CardRoot.create( ( CardHeader.create( CardTitle.create(title) if title is not None else None, ( ...
title = props.pop("title", "")
cls, *children, **props): """Create the card content component.""" props["data-slot"] = "card-content" cls.set_class_name(ClassNames.CONTENT, props) return super().create(*children, **props) class CardFooter(CardComponent): """A footer component for the card.""" @classmethod ...
content = props.pop("content", "") footer = props.pop("footer", "") return CardRoot.create( ( CardHeader.create( CardTitle.create(title) if title is not None else None, ( CardDescription.create(descript...
description = props.pop("description", "")
d content component.""" props["data-slot"] = "card-content" cls.set_class_name(ClassNames.CONTENT, props) return super().create(*children, **props) class CardFooter(CardComponent): """A footer component for the card.""" @classmethod def create(cls, *children, **props): """...
footer = props.pop("footer", "") return CardRoot.create( ( CardHeader.create( CardTitle.create(title) if title is not None else None, ( CardDescription.create(description) if description...
content = props.pop("content", "")
-slot"] = "card-content" cls.set_class_name(ClassNames.CONTENT, props) return super().create(*children, **props) class CardFooter(CardComponent): """A footer component for the card.""" @classmethod def create(cls, *children, **props): """Create the card footer component.""" ...
return CardRoot.create( ( CardHeader.create( CardTitle.create(title) if title is not None else None, ( CardDescription.create(description) if description is not None else...
footer = props.pop("footer", "")
ntent: Var[str | Component | None] footer: Var[str | Component | None] @classmethod def create(cls, *children, **props): """Create the card component.""" title = props.pop("title", "") description = props.pop("description", "") content = props.pop("content", "") foot...
class Card(ComponentNamespace): """A card component that displays content in a card format.""" root = staticmethod(CardRoot.create) header = staticmethod(CardHeader.create) title = staticmethod(CardTitle.create) description = staticmethod(CardDescription.create) content = staticmethod(CardCo...
def _exclude_props(self) -> list[str]: return [ *super()._exclude_props(), "title", "description", "content", "footer", ]
("title", "") description = props.pop("description", "") content = props.pop("content", "") footer = props.pop("footer", "") return CardRoot.create( ( CardHeader.create( CardTitle.create(title) if title is not None else None, ...
card = Card()
class Card(ComponentNamespace): """A card component that displays content in a card format.""" root = staticmethod(CardRoot.create) header = staticmethod(CardHeader.create) title = staticmethod(CardTitle.create) description = staticmethod(CardDescription.create) content = staticmethod(CardConte...
"") footer = props.pop("footer", "") return CardRoot.create( ( CardHeader.create( CardTitle.create(title) if title is not None else None, ( CardDescription.create(description) if descript...
header = staticmethod(CardHeader.create) title = staticmethod(CardTitle.create) description = staticmethod(CardDescription.create) content = staticmethod(CardContent.create) footer = staticmethod(CardFooter.create) class_names = ClassNames __call__ = staticmethod(HighLevelCard.create) car...
root = staticmethod(CardRoot.create)
"") return CardRoot.create( ( CardHeader.create( CardTitle.create(title) if title is not None else None, ( CardDescription.create(description) if description is not None e...
title = staticmethod(CardTitle.create) description = staticmethod(CardDescription.create) content = staticmethod(CardContent.create) footer = staticmethod(CardFooter.create) class_names = ClassNames __call__ = staticmethod(HighLevelCard.create) card = Card()
header = staticmethod(CardHeader.create)
( CardHeader.create( CardTitle.create(title) if title is not None else None, ( CardDescription.create(description) if description is not None else None ), ...
description = staticmethod(CardDescription.create) content = staticmethod(CardContent.create) footer = staticmethod(CardFooter.create) class_names = ClassNames __call__ = staticmethod(HighLevelCard.create) card = Card()
title = staticmethod(CardTitle.create)
CardTitle.create(title) if title is not None else None, ( CardDescription.create(description) if description is not None else None ), ) if title or descriptio...
content = staticmethod(CardContent.create) footer = staticmethod(CardFooter.create) class_names = ClassNames __call__ = staticmethod(HighLevelCard.create) card = Card()
description = staticmethod(CardDescription.create)
ot None else None, ( CardDescription.create(description) if description is not None else None ), ) if title or description else None ), ...
footer = staticmethod(CardFooter.create) class_names = ClassNames __call__ = staticmethod(HighLevelCard.create) card = Card()
content = staticmethod(CardContent.create)
CardDescription.create(description) if description is not None else None ), ) if title or description else None ), CardContent.create(content) if content is not N...
class_names = ClassNames __call__ = staticmethod(HighLevelCard.create) card = Card()
footer = staticmethod(CardFooter.create)
ription) if description is not None else None ), ) if title or description else None ), CardContent.create(content) if content is not None else None, CardFooter.create(...
__call__ = staticmethod(HighLevelCard.create) card = Card()
class_names = ClassNames
if description is not None else None ), ) if title or description else None ), CardContent.create(content) if content is not None else None, CardFooter.create(footer) if footer is not None...
card = Card()
__call__ = staticmethod(HighLevelCard.create)
else None ), ) if title or description else None ), CardContent.create(content) if content is not None else None, CardFooter.create(footer) if footer is not None else None, *children, *...
card = Card()
"""Checkbox component from base-ui components."""
from reflex.components.el import Label from reflex.event import EventHandler, passthrough_event_spec from reflex.utils.imports import ImportVar from reflex.vars.base import Var from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent from reflex_ui.components.icons.hugeicon import hi from reflex_ui.util...
from reflex.components.component import ComponentNamespace
"""Checkbox component from base-ui components.""" from reflex.components.component import ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec from reflex.utils.imports import ImportVar from reflex.vars.base import Var from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent from reflex_ui.components.icons.hugeicon import hi from reflex_ui.utils.twmerge import cn class ClassNames:...
from reflex.components.el import Label
"""Checkbox component from base-ui components.""" from reflex.components.component import ComponentNamespace from reflex.components.el import Label
from reflex.utils.imports import ImportVar from reflex.vars.base import Var from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent from reflex_ui.components.icons.hugeicon import hi from reflex_ui.utils.twmerge import cn class ClassNames: """Class names for the checkbox component.""" ROOT =...
from reflex.event import EventHandler, passthrough_event_spec
"""Checkbox component from base-ui components.""" from reflex.components.component import ComponentNamespace from reflex.components.el import Label from reflex.event import EventHandler, passthrough_event_spec
from reflex.vars.base import Var from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent from reflex_ui.components.icons.hugeicon import hi from reflex_ui.utils.twmerge import cn class ClassNames: """Class names for the checkbox component.""" ROOT = "flex size-4 items-center justify-center r...
from reflex.utils.imports import ImportVar
"""Checkbox component from base-ui components.""" from reflex.components.component import ComponentNamespace from reflex.components.el import Label from reflex.event import EventHandler, passthrough_event_spec from reflex.utils.imports import ImportVar
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent from reflex_ui.components.icons.hugeicon import hi from reflex_ui.utils.twmerge import cn class ClassNames: """Class names for the checkbox component.""" ROOT = "flex size-4 items-center justify-center rounded-[4px] data-[checked]:bg-pr...
from reflex.vars.base import Var
"""Checkbox component from base-ui components.""" from reflex.components.component import ComponentNamespace from reflex.components.el import Label from reflex.event import EventHandler, passthrough_event_spec from reflex.utils.imports import ImportVar from reflex.vars.base import Var
from reflex_ui.components.icons.hugeicon import hi from reflex_ui.utils.twmerge import cn class ClassNames: """Class names for the checkbox component.""" ROOT = "flex size-4 items-center justify-center rounded-[4px] data-[checked]:bg-primary-9 data-[unchecked]:border data-[unchecked]:border-secondary-8 data...
from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent
"""Checkbox component from base-ui components.""" from reflex.components.component import ComponentNamespace from reflex.components.el import Label from reflex.event import EventHandler, passthrough_event_spec from reflex.utils.imports import ImportVar from reflex.vars.base import Var from reflex_ui.components.base_u...
from reflex_ui.utils.twmerge import cn class ClassNames: """Class names for the checkbox component.""" ROOT = "flex size-4 items-center justify-center rounded-[4px] data-[checked]:bg-primary-9 data-[unchecked]:border data-[unchecked]:border-secondary-8 data-[disabled]:cursor-not-allowed data-[disabled]:bord...
from reflex_ui.components.icons.hugeicon import hi
"""Checkbox component from base-ui components.""" from reflex.components.component import ComponentNamespace from reflex.components.el import Label from reflex.event import EventHandler, passthrough_event_spec from reflex.utils.imports import ImportVar from reflex.vars.base import Var from reflex_ui.components.base_u...
class ClassNames: """Class names for the checkbox component.""" ROOT = "flex size-4 items-center justify-center rounded-[4px] data-[checked]:bg-primary-9 data-[unchecked]:border data-[unchecked]:border-secondary-8 data-[disabled]:cursor-not-allowed data-[disabled]:border data-[disabled]:border-secondary-4 d...
from reflex_ui.utils.twmerge import cn
"""Checkbox component from base-ui components.""" from reflex.components.component import ComponentNamespace from reflex.components.el import Label from reflex.event import EventHandler, passthrough_event_spec from reflex.utils.imports import ImportVar from reflex.vars.base import Var from reflex_ui.components.base_u...
INDICATOR = ( "flex text-white data-[unchecked]:hidden data-[disabled]:text-secondary-8" ) LABEL = "text-sm text-secondary-12 font-medium flex items-center gap-2" CONTAINER = "flex flex-row items-center gap-2" class CheckboxBaseComponent(BaseUIComponent): """Base component for checkbox co...
ROOT = "flex size-4 items-center justify-center rounded-[4px] data-[checked]:bg-primary-9 data-[unchecked]:border data-[unchecked]:border-secondary-8 data-[disabled]:cursor-not-allowed data-[disabled]:border data-[disabled]:border-secondary-4 data-[disabled]:bg-secondary-3 hover:bg-secondary-3 transition-colors cursor-...
"""Checkbox component from base-ui components.""" from reflex.components.component import ComponentNamespace from reflex.components.el import Label from reflex.event import EventHandler, passthrough_event_spec from reflex.utils.imports import ImportVar from reflex.vars.base import Var from reflex_ui.components.base_u...
LABEL = "text-sm text-secondary-12 font-medium flex items-center gap-2" CONTAINER = "flex flex-row items-center gap-2" class CheckboxBaseComponent(BaseUIComponent): """Base component for checkbox components.""" library = f"{PACKAGE_NAME}/checkbox" @property def import_var(self): """...
INDICATOR = ( "flex text-white data-[unchecked]:hidden data-[disabled]:text-secondary-8" )
"""Checkbox component from base-ui components.""" from reflex.components.component import ComponentNamespace from reflex.components.el import Label from reflex.event import EventHandler, passthrough_event_spec from reflex.utils.imports import ImportVar from reflex.vars.base import Var from reflex_ui.components.base_u...
CONTAINER = "flex flex-row items-center gap-2" class CheckboxBaseComponent(BaseUIComponent): """Base component for checkbox components.""" library = f"{PACKAGE_NAME}/checkbox" @property def import_var(self): """Return the import variable for the checkbox component.""" return Imp...
LABEL = "text-sm text-secondary-12 font-medium flex items-center gap-2"
nents.""" from reflex.components.component import ComponentNamespace from reflex.components.el import Label from reflex.event import EventHandler, passthrough_event_spec from reflex.utils.imports import ImportVar from reflex.vars.base import Var from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent f...
class CheckboxBaseComponent(BaseUIComponent): """Base component for checkbox components.""" library = f"{PACKAGE_NAME}/checkbox" @property def import_var(self): """Return the import variable for the checkbox component.""" return ImportVar(tag="Checkbox", package_path="", install=Fal...
CONTAINER = "flex flex-row items-center gap-2"
t ComponentNamespace from reflex.components.el import Label from reflex.event import EventHandler, passthrough_event_spec from reflex.utils.imports import ImportVar from reflex.vars.base import Var from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent from reflex_ui.components.icons.hugeicon import hi...
class CheckboxRoot(CheckboxBaseComponent): """The root checkbox component.""" tag = "Checkbox.Root" # Whether the checkbox is initially ticked. To render a controlled checkbox, use the checked prop instead. Defaults to False. default_checked: Var[bool] # Whether the checkbox is currently ticke...
class CheckboxBaseComponent(BaseUIComponent): """Base component for checkbox components.""" library = f"{PACKAGE_NAME}/checkbox" @property def import_var(self): """Return the import variable for the checkbox component.""" return ImportVar(tag="Checkbox", package_path="", install=False)
ssthrough_event_spec from reflex.utils.imports import ImportVar from reflex.vars.base import Var from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent from reflex_ui.components.icons.hugeicon import hi from reflex_ui.utils.twmerge import cn class ClassNames: """Class names for the checkbox compo...
@property def import_var(self): """Return the import variable for the checkbox component.""" return ImportVar(tag="Checkbox", package_path="", install=False) class CheckboxRoot(CheckboxBaseComponent): """The root checkbox component.""" tag = "Checkbox.Root" # Whether the checkb...
library = f"{PACKAGE_NAME}/checkbox"
portVar from reflex.vars.base import Var from reflex_ui.components.base_ui import PACKAGE_NAME, BaseUIComponent from reflex_ui.components.icons.hugeicon import hi from reflex_ui.utils.twmerge import cn class ClassNames: """Class names for the checkbox component.""" ROOT = "flex size-4 items-center justify-c...
class CheckboxRoot(CheckboxBaseComponent): """The root checkbox component.""" tag = "Checkbox.Root" # Whether the checkbox is initially ticked. To render a controlled checkbox, use the checked prop instead. Defaults to False. default_checked: Var[bool] # Whether the checkbox is currently ticke...
def import_var(self): """Return the import variable for the checkbox component.""" return ImportVar(tag="Checkbox", package_path="", install=False)
ckbox component.""" ROOT = "flex size-4 items-center justify-center rounded-[4px] data-[checked]:bg-primary-9 data-[unchecked]:border data-[unchecked]:border-secondary-8 data-[disabled]:cursor-not-allowed data-[disabled]:border data-[disabled]:border-secondary-4 data-[disabled]:bg-secondary-3 hover:bg-secondary-3 ...
# Whether the checkbox is initially ticked. To render a controlled checkbox, use the checked prop instead. Defaults to False. default_checked: Var[bool] # Whether the checkbox is currently ticked. To render an uncontrolled checkbox, use the default_checked prop instead. checked: Var[bool] # Even...
tag = "Checkbox.Root"
ge: EventHandler[passthrough_event_spec(bool, dict)] # Whether the checkbox is in a mixed state: neither ticked, nor unticked. Defaults to False. indeterminate: Var[bool] # Whether the component should ignore user interaction. Defaults to False. disabled: Var[bool] # Whether the checkbox is requi...
class CheckboxIndicator(CheckboxBaseComponent): """The indicator that shows whether the checkbox is checked.""" tag = "Checkbox.Indicator" @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the checkbox indicator component.""" if len(children) == 0: ...
def create(cls, *children, **props) -> BaseUIComponent: """Create the checkbox root component.""" props["data-slot"] = "checkbox" cls.set_class_name(ClassNames.ROOT, props) return super().create(*children, **props)
ed, nor unticked. Defaults to False. indeterminate: Var[bool] # Whether the component should ignore user interaction. Defaults to False. disabled: Var[bool] # Whether the checkbox is required. Defaults to False. required: Var[bool] # Identifies the field when a form is submitted. name: Va...
cls.set_class_name(ClassNames.ROOT, props) return super().create(*children, **props) class CheckboxIndicator(CheckboxBaseComponent): """The indicator that shows whether the checkbox is checked.""" tag = "Checkbox.Indicator" @classmethod def create(cls, *children, **props) -> BaseUIC...
props["data-slot"] = "checkbox"
# Identifies the field when a form is submitted. name: Var[str] # The value of the selected checkbox. value: Var[str] # 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....
@classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the checkbox indicator component.""" if len(children) == 0: children = (hi("Tick02Icon", size=14),) props["data-slot"] = "checkbox-indicator" cls.set_class_name(ClassNames.INDICATOR, prop...
tag = "Checkbox.Indicator"
d. name: Var[str] # The value of the selected checkbox. value: Var[str] # 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] # Whether the ...
class HighLevelCheckbox(CheckboxRoot): """High level wrapper for the Checkbox component.""" @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create a high level checkbox component. Args: *children: The content of the checkbox. **props: Addi...
def create(cls, *children, **props) -> BaseUIComponent: """Create the checkbox indicator component.""" if len(children) == 0: children = (hi("Tick02Icon", size=14),) props["data-slot"] = "checkbox-indicator" cls.set_class_name(ClassNames.INDICATOR, props) return super...
rs 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] # Whether the checkbox controls a group of child checkboxes. Must be used in a Checkbox Group. Defaults to False. parent: Var[boo...
props["data-slot"] = "checkbox-indicator" cls.set_class_name(ClassNames.INDICATOR, props) return super().create(*children, **props) class HighLevelCheckbox(CheckboxRoot): """High level wrapper for the Checkbox component.""" @classmethod def create(cls, *children, **props) -> Base...
if len(children) == 0: children = (hi("Tick02Icon", size=14),)
eplacing 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] # Whether the checkbox controls a group of child checkboxes. Must be used in a Checkbox Group. Defaults to False. parent: Var[bool] # Whether the user should b...
props["data-slot"] = "checkbox-indicator" cls.set_class_name(ClassNames.INDICATOR, props) return super().create(*children, **props) class HighLevelCheckbox(CheckboxRoot): """High level wrapper for the Checkbox component.""" @classmethod def create(cls, *children, **props) -> Base...
children = (hi("Tick02Icon", size=14),)
the rendered element is not a button (e.g. <div>). Defaults to True. native_button: Var[bool] # Whether the checkbox controls a group of child checkboxes. Must be used in a Checkbox Group. Defaults to False. parent: Var[bool] # Whether the user should be unable to tick or untick the checkbox. Default...
cls.set_class_name(ClassNames.INDICATOR, props) return super().create(*children, **props) class HighLevelCheckbox(CheckboxRoot): """High level wrapper for the Checkbox component.""" @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create a high level checkb...
props["data-slot"] = "checkbox-indicator"
en, **props) class CheckboxIndicator(CheckboxBaseComponent): """The indicator that shows whether the checkbox is checked.""" tag = "Checkbox.Indicator" @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the checkbox indicator component.""" if len(children)...
if label := props.pop("label", None): return Label.create( # pyright: ignore[reportReturnType] CheckboxRoot.create( CheckboxIndicator.create(), *children, **props, ), label, ...
class_name = props.pop("class_name", "")
seComponent): """The indicator that shows whether the checkbox is checked.""" tag = "Checkbox.Indicator" @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create the checkbox indicator component.""" if len(children) == 0: children = (hi("Tick02Icon", s...
return CheckboxRoot.create( CheckboxIndicator.create(), *children, **props, class_name=class_name, ) class CheckboxNamespace(ComponentNamespace): """Namespace for Checkbox components.""" root = staticmethod(CheckboxRoot.create) indicator = ...
if label := props.pop("label", None): return Label.create( # pyright: ignore[reportReturnType] CheckboxRoot.create( CheckboxIndicator.create(), *children, **props, ), label, class_nam...
h level wrapper for the Checkbox component.""" @classmethod def create(cls, *children, **props) -> BaseUIComponent: """Create a high level checkbox component. Args: *children: The content of the checkbox. **props: Additional properties to apply to the checkbox component...
checkbox = CheckboxNamespace()
class CheckboxNamespace(ComponentNamespace): """Namespace for Checkbox components.""" root = staticmethod(CheckboxRoot.create) indicator = staticmethod(CheckboxIndicator.create) high_level = staticmethod(HighLevelCheckbox.create) class_names = ClassNames __call__ = staticmethod(HighLevelCheckbo...
**props) -> BaseUIComponent: """Create a high level checkbox component. Args: *children: The content of the checkbox. **props: Additional properties to apply to the checkbox component. Returns: The checkbox component and its indicator. """ c...
indicator = staticmethod(CheckboxIndicator.create) high_level = staticmethod(HighLevelCheckbox.create) class_names = ClassNames __call__ = staticmethod(HighLevelCheckbox.create) checkbox = CheckboxNamespace()
root = staticmethod(CheckboxRoot.create)
te a high level checkbox component. Args: *children: The content of the checkbox. **props: Additional properties to apply to the checkbox component. Returns: The checkbox component and its indicator. """ class_name = props.pop("class_name", "") ...
high_level = staticmethod(HighLevelCheckbox.create) class_names = ClassNames __call__ = staticmethod(HighLevelCheckbox.create) checkbox = CheckboxNamespace()
indicator = staticmethod(CheckboxIndicator.create)
*children: The content of the checkbox. **props: Additional properties to apply to the checkbox component. Returns: The checkbox component and its indicator. """ class_name = props.pop("class_name", "") if label := props.pop("label", None): re...
class_names = ClassNames __call__ = staticmethod(HighLevelCheckbox.create) checkbox = CheckboxNamespace()
high_level = staticmethod(HighLevelCheckbox.create)
**props: Additional properties to apply to the checkbox component. Returns: The checkbox component and its indicator. """ class_name = props.pop("class_name", "") if label := props.pop("label", None): return Label.create( # pyright: ignore[reportReturnType] ...
__call__ = staticmethod(HighLevelCheckbox.create) checkbox = CheckboxNamespace()
class_names = ClassNames