instruction stringlengths 0 1k | input stringlengths 1 1k | output stringlengths 10 6.51k |
|---|---|---|
from typing import Any, Dict, Literal, Optional
import reflex as rx
from pcweb.components.utils.twmerge import cn
LiteralButtonVariant = Literal[
"primary", "secondary", "transparent", "destructive", "outline"
]
|
DEFAULT_CLASS_NAME = "text-sm cursor-pointer inline-flex items-center justify-center relative transition-bg shrink-0 font-sans disabled:cursor-not-allowed disabled:border disabled:border-slate-5 disabled:!bg-slate-3 disabled:!text-slate-8 transition-bg"
def get_variant_bg_cn(variant: str) -> str:
"""Get the bac... | LiteralButtonSize = Literal[
"sm", "md", "lg", "xl", "icon-sm", "icon-md", "icon-lg", "icon-xl"
] |
from typing import Any, Dict, Literal, Optional
import reflex as rx
from pcweb.components.utils.twmerge import cn
LiteralButtonVariant = Literal[
"primary", "secondary", "transparent", "destructive", "outline"
]
LiteralButtonSize = Literal[
"sm", "md", "lg", "xl", "icon-sm", "icon-md", "icon-lg", "icon-xl"
]... |
def get_variant_bg_cn(variant: str) -> str:
"""Get the background color class name for a button variant.
Args:
variant (str): The variant of the button.
Returns:
str: The background color class name.
"""
return f"enabled:bg-gradient-to-b from-(--{variant}-9) to-(--{variant}-10)... | DEFAULT_CLASS_NAME = "text-sm cursor-pointer inline-flex items-center justify-center relative transition-bg shrink-0 font-sans disabled:cursor-not-allowed disabled:border disabled:border-slate-5 disabled:!bg-slate-3 disabled:!text-slate-8 transition-bg" |
riant: LiteralButtonVariant = "primary",
size: LiteralButtonSize = "sm",
style: Dict[str, Any] | None = None,
class_name: str = "",
icon: Optional[rx.Component] = None,
**props,
) -> rx.Component:
"""Create a button component.
Args:
text (str): The text to display on the button.
... |
variant_class = BUTTON_STYLES["variant"][variant]
variant_class = variant_class() if callable(variant_class) else variant_class
classes = [
DEFAULT_CLASS_NAME,
BUTTON_STYLES["size"][size],
variant_class,
class_name,
]
content = [icon, text] if icon else [text]
... | style = {} |
uttonVariant = "primary",
size: LiteralButtonSize = "sm",
style: Dict[str, Any] | None = None,
class_name: str = "",
icon: Optional[rx.Component] = None,
**props,
) -> rx.Component:
"""Create a button component.
Args:
text (str): The text to display on the button.
variant (L... |
variant_class = variant_class() if callable(variant_class) else variant_class
classes = [
DEFAULT_CLASS_NAME,
BUTTON_STYLES["size"][size],
variant_class,
class_name,
]
content = [icon, text] if icon else [text]
return rx.el.button(
*content,
style=... | variant_class = BUTTON_STYLES["variant"][variant] |
= "sm",
style: Dict[str, Any] | None = None,
class_name: str = "",
icon: Optional[rx.Component] = None,
**props,
) -> rx.Component:
"""Create a button component.
Args:
text (str): The text to display on the button.
variant (LiteralButtonVariant, optional): The button variant. De... |
classes = [
DEFAULT_CLASS_NAME,
BUTTON_STYLES["size"][size],
variant_class,
class_name,
]
content = [icon, text] if icon else [text]
return rx.el.button(
*content,
style=style,
class_name=cn(*classes),
**props,
)
| variant_class = variant_class() if callable(variant_class) else variant_class |
: Optional[rx.Component] = None,
**props,
) -> rx.Component:
"""Create a button component.
Args:
text (str): The text to display on the button.
variant (LiteralButtonVariant, optional): The button variant. Defaults to "primary".
size (LiteralButtonSize, optional): The button size. D... |
content = [icon, text] if icon else [text]
return rx.el.button(
*content,
style=style,
class_name=cn(*classes),
**props,
)
| classes = [
DEFAULT_CLASS_NAME,
BUTTON_STYLES["size"][size],
variant_class,
class_name,
] |
he text to display on the button.
variant (LiteralButtonVariant, optional): The button variant. Defaults to "primary".
size (LiteralButtonSize, optional): The button size. Defaults to "sm".
style (Dict[str, Any], optional): Additional styles to apply to the button. Defaults to {}.
class_... |
return rx.el.button(
*content,
style=style,
class_name=cn(*classes),
**props,
)
| content = [icon, text] if icon else [text] |
import reflex_ui as ui
def _ellipses(side: str, reverse_animation: bool = False) -> rx.Component:
"""Create animated ellipses for the pattern effect."""
direction = "right" if side == "right" else "left"
animation_class = "[animation-direction:reverse]" if reverse_animation else ""
common_class = (
... | import reflex as rx | |
import reflex as rx
|
def _ellipses(side: str, reverse_animation: bool = False) -> rx.Component:
"""Create animated ellipses for the pattern effect."""
direction = "right" if side == "right" else "left"
animation_class = "[animation-direction:reverse]" if reverse_animation else ""
common_class = (
f"absolute bg-vi... | import reflex_ui as ui |
import reflex as rx
import reflex_ui as ui
def _ellipses(side: str, reverse_animation: bool = False) -> rx.Component:
"""Create animated ellipses for the pattern effect."""
|
animation_class = "[animation-direction:reverse]" if reverse_animation else ""
common_class = (
f"absolute bg-violet-11 dark:bg-[#534a87] blur-[10px] {animation_class}"
)
return rx.el.div(
rx.el.div(
class_name=f"w-[32px] h-[88px] {direction}-[0.5rem] {common_class} animate... | direction = "right" if side == "right" else "left" |
import reflex as rx
import reflex_ui as ui
def _ellipses(side: str, reverse_animation: bool = False) -> rx.Component:
"""Create animated ellipses for the pattern effect."""
direction = "right" if side == "right" else "left"
|
common_class = (
f"absolute bg-violet-11 dark:bg-[#534a87] blur-[10px] {animation_class}"
)
return rx.el.div(
rx.el.div(
class_name=f"w-[32px] h-[88px] {direction}-[0.5rem] {common_class} animate-ellipse-1"
),
rx.el.div(
class_name=f"w-[32px] h-[178p... | animation_class = "[animation-direction:reverse]" if reverse_animation else "" |
import reflex as rx
import reflex_ui as ui
def _ellipses(side: str, reverse_animation: bool = False) -> rx.Component:
"""Create animated ellipses for the pattern effect."""
direction = "right" if side == "right" else "left"
animation_class = "[animation-direction:reverse]" if reverse_animation else ""
... |
return rx.el.div(
rx.el.div(
class_name=f"w-[32px] h-[88px] {direction}-[0.5rem] {common_class} animate-ellipse-1"
),
rx.el.div(
class_name=f"w-[32px] h-[178px] {direction}-[9.5rem] {common_class} animate-ellipse-2"
),
rx.el.div(
class_na... | common_class = (
f"absolute bg-violet-11 dark:bg-[#534a87] blur-[10px] {animation_class}"
) |
] blur-[10px] {animation_class}"
)
return rx.el.div(
rx.el.div(
class_name=f"w-[32px] h-[88px] {direction}-[0.5rem] {common_class} animate-ellipse-1"
),
rx.el.div(
class_name=f"w-[32px] h-[178px] {direction}-[9.5rem] {common_class} animate-ellipse-2"
),
... |
light_dark_path = rx.color_mode_cond("light", "dark")
src = f"landing/patterns/{light_dark_path}/numbers-pattern.webp"
# Determine if we need to flip: right side XOR reverse
# - right side normally flips
# - reverse inverts the flip behavior
is_flipped = (side == "right") != reverse
# Ba... | position_class = "left-0" if side == "left" else "right-0" |
rx.el.div(
class_name=f"w-[32px] h-[88px] {direction}-[0.5rem] {common_class} animate-ellipse-1"
),
rx.el.div(
class_name=f"w-[32px] h-[178px] {direction}-[9.5rem] {common_class} animate-ellipse-2"
),
rx.el.div(
class_name=f"w-[16px] h-[42px] {d... |
src = f"landing/patterns/{light_dark_path}/numbers-pattern.webp"
# Determine if we need to flip: right side XOR reverse
# - right side normally flips
# - reverse inverts the flip behavior
is_flipped = (side == "right") != reverse
# Background image style
image_style = {"opacity": rx.colo... | light_dark_path = rx.color_mode_cond("light", "dark") |
] {direction}-[0.5rem] {common_class} animate-ellipse-1"
),
rx.el.div(
class_name=f"w-[32px] h-[178px] {direction}-[9.5rem] {common_class} animate-ellipse-2"
),
rx.el.div(
class_name=f"w-[16px] h-[42px] {direction}-[4.19rem] {common_class} animate-ellipse-3"
... |
# Determine if we need to flip: right side XOR reverse
# - right side normally flips
# - reverse inverts the flip behavior
is_flipped = (side == "right") != reverse
# Background image style
image_style = {"opacity": rx.color_mode_cond("1", "0.3")}
if is_flipped:
image_style |= {"t... | src = f"landing/patterns/{light_dark_path}/numbers-pattern.webp" |
rx.el.div(
class_name=f"w-[16px] h-[42px] {direction}-[4.19rem] {common_class} animate-ellipse-3"
),
rx.el.div(
class_name=f"w-[32px] h-[48px] {direction}-[0.44rem] {common_class} animate-ellipse-4"
),
)
def numbers_pattern(
side: str = "left", reverse: bool = F... |
# Background image style
image_style = {"opacity": rx.color_mode_cond("1", "0.3")}
if is_flipped:
image_style |= {"transform": "scaleX(-1)"}
# Gradient masks
vertical_gradient = "linear-gradient(360deg, rgba(0, 0, 0, 0) 0%, #000000 12%, #000000 88%, rgba(0, 0, 0, 0) 100%)"
# Angled gr... | is_flipped = (side == "right") != reverse |
{common_class} animate-ellipse-3"
),
rx.el.div(
class_name=f"w-[32px] h-[48px] {direction}-[0.44rem] {common_class} animate-ellipse-4"
),
)
def numbers_pattern(
side: str = "left", reverse: bool = False, class_name: str = ""
) -> rx.Component:
"""Numbers pattern with st... |
if is_flipped:
image_style |= {"transform": "scaleX(-1)"}
# Gradient masks
vertical_gradient = "linear-gradient(360deg, rgba(0, 0, 0, 0) 0%, #000000 12%, #000000 88%, rgba(0, 0, 0, 0) 100%)"
# Angled gradient - angle changes based on reverse
gradient_angle = "105deg" if reverse else "280de... | image_style = {"opacity": rx.color_mode_cond("1", "0.3")} |
(
class_name=f"w-[32px] h-[48px] {direction}-[0.44rem] {common_class} animate-ellipse-4"
),
)
def numbers_pattern(
side: str = "left", reverse: bool = False, class_name: str = ""
) -> rx.Component:
"""Numbers pattern with static background and masked animated ellipses.
Matches Fig... |
# Gradient masks
vertical_gradient = "linear-gradient(360deg, rgba(0, 0, 0, 0) 0%, #000000 12%, #000000 88%, rgba(0, 0, 0, 0) 100%)"
# Angled gradient - angle changes based on reverse
gradient_angle = "105deg" if reverse else "280deg"
angled_gradient = f"linear-gradient({gradient_angle}, rgba(0, 0... | if is_flipped:
image_style |= {"transform": "scaleX(-1)"} |
lipse-4"
),
)
def numbers_pattern(
side: str = "left", reverse: bool = False, class_name: str = ""
) -> rx.Component:
"""Numbers pattern with static background and masked animated ellipses.
Matches Figma design structure with layered gradients.
Args:
side: Position side ("left" o... |
# Angled gradient - angle changes based on reverse
gradient_angle = "105deg" if reverse else "280deg"
angled_gradient = f"linear-gradient({gradient_angle}, rgba(0, 0, 0, 0) 18.13%, rgba(0, 0, 0, 0.88) 66.72%, rgba(0, 0, 0, 0) 85.62%)"
# Container mask combining both gradients
container_mask_style ... | vertical_gradient = "linear-gradient(360deg, rgba(0, 0, 0, 0) 0%, #000000 12%, #000000 88%, rgba(0, 0, 0, 0) 100%)" |
ground and masked animated ellipses.
Matches Figma design structure with layered gradients.
Args:
side: Position side ("left" or "right")
reverse: Reverse the ellipse animation direction
class_name: Additional CSS classes
"""
position_class = "left-0" if side == "left" else "ri... |
angled_gradient = f"linear-gradient({gradient_angle}, rgba(0, 0, 0, 0) 18.13%, rgba(0, 0, 0, 0.88) 66.72%, rgba(0, 0, 0, 0) 85.62%)"
# Container mask combining both gradients
container_mask_style = {
"mask_image": f"{angled_gradient}, {vertical_gradient}",
"webkit_mask_image": f"{angled_gr... | gradient_angle = "105deg" if reverse else "280deg" |
design structure with layered gradients.
Args:
side: Position side ("left" or "right")
reverse: Reverse the ellipse animation direction
class_name: Additional CSS classes
"""
position_class = "left-0" if side == "left" else "right-0"
light_dark_path = rx.color_mode_cond("light"... |
# Container mask combining both gradients
container_mask_style = {
"mask_image": f"{angled_gradient}, {vertical_gradient}",
"webkit_mask_image": f"{angled_gradient}, {vertical_gradient}",
"mask_composite": "intersect",
"webkit_mask_composite": "intersect",
}
if is_flipp... | angled_gradient = f"linear-gradient({gradient_angle}, rgba(0, 0, 0, 0) 18.13%, rgba(0, 0, 0, 0.88) 66.72%, rgba(0, 0, 0, 0) 85.62%)" |
onal CSS classes
"""
position_class = "left-0" if side == "left" else "right-0"
light_dark_path = rx.color_mode_cond("light", "dark")
src = f"landing/patterns/{light_dark_path}/numbers-pattern.webp"
# Determine if we need to flip: right side XOR reverse
# - right side normally flips
# - re... |
if is_flipped:
container_mask_style["transform"] = "scaleX(-1)"
# Image mask style for the ellipses layer
ellipses_mask_style = {
"mask_image": f"url({src})",
"mask_size": "cover",
"mask_repeat": "no-repeat",
"mask_position": "center",
"webkit_mask_image": f... | container_mask_style = {
"mask_image": f"{angled_gradient}, {vertical_gradient}",
"webkit_mask_image": f"{angled_gradient}, {vertical_gradient}",
"mask_composite": "intersect",
"webkit_mask_composite": "intersect",
} |
t side XOR reverse
# - right side normally flips
# - reverse inverts the flip behavior
is_flipped = (side == "right") != reverse
# Background image style
image_style = {"opacity": rx.color_mode_cond("1", "0.3")}
if is_flipped:
image_style |= {"transform": "scaleX(-1)"}
# Gradient m... |
# Image mask style for the ellipses layer
ellipses_mask_style = {
"mask_image": f"url({src})",
"mask_size": "cover",
"mask_repeat": "no-repeat",
"mask_position": "center",
"webkit_mask_image": f"url({src})",
"webkit_mask_size": "cover",
"webkit_mask_repe... | if is_flipped:
container_mask_style["transform"] = "scaleX(-1)" |
# - right side normally flips
# - reverse inverts the flip behavior
is_flipped = (side == "right") != reverse
# Background image style
image_style = {"opacity": rx.color_mode_cond("1", "0.3")}
if is_flipped:
image_style |= {"transform": "scaleX(-1)"}
# Gradient masks
vertical_gradi... |
# Image mask style for the ellipses layer
ellipses_mask_style = {
"mask_image": f"url({src})",
"mask_size": "cover",
"mask_repeat": "no-repeat",
"mask_position": "center",
"webkit_mask_image": f"url({src})",
"webkit_mask_size": "cover",
"webkit_mask_repe... | container_mask_style["transform"] = "scaleX(-1)" |
ight") != reverse
# Background image style
image_style = {"opacity": rx.color_mode_cond("1", "0.3")}
if is_flipped:
image_style |= {"transform": "scaleX(-1)"}
# Gradient masks
vertical_gradient = "linear-gradient(360deg, rgba(0, 0, 0, 0) 0%, #000000 12%, #000000 88%, rgba(0, 0, 0, 0) 100%)... |
if is_flipped:
ellipses_mask_style["transform"] = "scaleX(-1)"
return rx.el.div(
# Layer 1: Background pattern image
rx.image(
src=src,
class_name="pointer-events-none w-full h-full absolute inset-0 object-cover",
style=image_style,
),
... | ellipses_mask_style = {
"mask_image": f"url({src})",
"mask_size": "cover",
"mask_repeat": "no-repeat",
"mask_position": "center",
"webkit_mask_image": f"url({src})",
"webkit_mask_size": "cover",
"webkit_mask_repeat": "no-repeat",
"webkit_mask_position": "c... |
dient - angle changes based on reverse
gradient_angle = "105deg" if reverse else "280deg"
angled_gradient = f"linear-gradient({gradient_angle}, rgba(0, 0, 0, 0) 18.13%, rgba(0, 0, 0, 0.88) 66.72%, rgba(0, 0, 0, 0) 85.62%)"
# Container mask combining both gradients
container_mask_style = {
"mask... |
return rx.el.div(
# Layer 1: Background pattern image
rx.image(
src=src,
class_name="pointer-events-none w-full h-full absolute inset-0 object-cover",
style=image_style,
),
# Layer 2: Masked animated ellipses
rx.el.div(
_ellip... | if is_flipped:
ellipses_mask_style["transform"] = "scaleX(-1)" |
ased on reverse
gradient_angle = "105deg" if reverse else "280deg"
angled_gradient = f"linear-gradient({gradient_angle}, rgba(0, 0, 0, 0) 18.13%, rgba(0, 0, 0, 0.88) 66.72%, rgba(0, 0, 0, 0) 85.62%)"
# Container mask combining both gradients
container_mask_style = {
"mask_image": f"{angled_grad... |
return rx.el.div(
# Layer 1: Background pattern image
rx.image(
src=src,
class_name="pointer-events-none w-full h-full absolute inset-0 object-cover",
style=image_style,
),
# Layer 2: Masked animated ellipses
rx.el.div(
_ellip... | ellipses_mask_style["transform"] = "scaleX(-1)" |
class NumberFlow(rx.Component):
library = "@number-flow/react"
tag = "NumberFlow"
is_default = True
# The numeric value to display and animate
# NumberFlow will automatically transition when this prop changes
value: rx.Var[int | str | float]
# The locale(s) for number formatting (e.g.... | import reflex as rx | |
import reflex as rx
class NumberFlow(rx.Component):
|
tag = "NumberFlow"
is_default = True
# The numeric value to display and animate
# NumberFlow will automatically transition when this prop changes
value: rx.Var[int | str | float]
# The locale(s) for number formatting (e.g., "en-US", "de-DE")
# Accepts Intl.LocalesArgument format
# D... | library = "@number-flow/react" |
import reflex as rx
class NumberFlow(rx.Component):
library = "@number-flow/react"
|
is_default = True
# The numeric value to display and animate
# NumberFlow will automatically transition when this prop changes
value: rx.Var[int | str | float]
# The locale(s) for number formatting (e.g., "en-US", "de-DE")
# Accepts Intl.LocalesArgument format
# Default: "en-US"
loca... | tag = "NumberFlow" |
import reflex as rx
class NumberFlow(rx.Component):
library = "@number-flow/react"
tag = "NumberFlow"
|
# The numeric value to display and animate
# NumberFlow will automatically transition when this prop changes
value: rx.Var[int | str | float]
# The locale(s) for number formatting (e.g., "en-US", "de-DE")
# Accepts Intl.LocalesArgument format
# Default: "en-US"
locales: rx.Var[str] = rx.V... | is_default = True |
as no effect when inside NumberFlowGroup.
# Default: false
isolate: rx.Var[bool]
# Controls whether animations are enabled
# Can be set to false to disable all animations and finish current ones
# Useful for scenarios like input fields where you want instant updates
# Default: true
animated... | number_flow = NumberFlow.create | |
import reflex as rx
class ProgressiveBlur(rx.Component):
"""ProgressiveBlur component."""
library = "progressive-blur"
tag = "LinearBlur"
steps: rx.Var[int] = rx.Var.create(8)
strength: rx.Var[int] = rx.Var.create(64)
falloff_percentage: rx.Var[int] = rx.Var.create(100)
tint: rx.Var[st... | from typing import Literal | |
from typing import Literal
|
class ProgressiveBlur(rx.Component):
"""ProgressiveBlur component."""
library = "progressive-blur"
tag = "LinearBlur"
steps: rx.Var[int] = rx.Var.create(8)
strength: rx.Var[int] = rx.Var.create(64)
falloff_percentage: rx.Var[int] = rx.Var.create(100)
tint: rx.Var[str] = rx.Var.create(""... | import reflex as rx |
from typing import Literal
import reflex as rx
class ProgressiveBlur(rx.Component):
"""ProgressiveBlur component."""
|
tag = "LinearBlur"
steps: rx.Var[int] = rx.Var.create(8)
strength: rx.Var[int] = rx.Var.create(64)
falloff_percentage: rx.Var[int] = rx.Var.create(100)
tint: rx.Var[str] = rx.Var.create("")
side: rx.Var[Literal["top", "bottom", "left", "right"]] = rx.Var.create("bottom")
progressive_blur = P... | library = "progressive-blur" |
from typing import Literal
import reflex as rx
class ProgressiveBlur(rx.Component):
"""ProgressiveBlur component."""
library = "progressive-blur"
|
steps: rx.Var[int] = rx.Var.create(8)
strength: rx.Var[int] = rx.Var.create(64)
falloff_percentage: rx.Var[int] = rx.Var.create(100)
tint: rx.Var[str] = rx.Var.create("")
side: rx.Var[Literal["top", "bottom", "left", "right"]] = rx.Var.create("bottom")
progressive_blur = ProgressiveBlur.create
| tag = "LinearBlur" |
from typing import Literal
import reflex as rx
class ProgressiveBlur(rx.Component):
"""ProgressiveBlur component."""
library = "progressive-blur"
tag = "LinearBlur"
steps: rx.Var[int] = rx.Var.create(8)
strength: rx.Var[int] = rx.Var.create(64)
falloff_percentage: rx.Var[int] = rx.Var.creat... | progressive_blur = ProgressiveBlur.create | |
loading_style = {
"rect": {
"opacity": "0",
"animation": "fadeInStayOut 6s linear infinite",
},
"@keyframes fadeInStayOut": {
"0%": {"opacity": "0"},
"5%": {"opacity": "1"},
"50%": {"opacity": "1"},
"55%": {"opacity": "0"},
"100%": {"opacity": "0"},
... | import reflex as rx | |
import reflex as rx
|
for i in range(1, 14):
loading_style[f"rect:nth-child({i})"] = {"animation_delay": f"{(i - 1) * 0.2}s"}
def svg_loading():
return rx.box(
rx.html(
"""<svg width="88" height="88" viewBox="0 0 88 88" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="32" y="41" width=... | loading_style = {
"rect": {
"opacity": "0",
"animation": "fadeInStayOut 6s linear infinite",
},
"@keyframes fadeInStayOut": {
"0%": {"opacity": "0"},
"5%": {"opacity": "1"},
"50%": {"opacity": "1"},
"55%": {"opacity": "0"},
"100%": {"opacity": "0"},
... |
import reflex as rx
loading_style = {
"rect": {
"opacity": "0",
"animation": "fadeInStayOut 6s linear infinite",
},
"@keyframes fadeInStayOut": {
"0%": {"opacity": "0"},
"5%": {"opacity": "1"},
"50%": {"opacity": "1"},
"55%": {"opacity": "0"},
"100%":... |
def svg_loading():
return rx.box(
rx.html(
"""<svg width="88" height="88" viewBox="0 0 88 88" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="32" y="41" width="6" height="6" fill="#6E56CF"/>
<rect x="38" y="29" width="6" height="6" fill="#6E56CF"/>
... | for i in range(1, 14):
loading_style[f"rect:nth-child({i})"] = {"animation_delay": f"{(i - 1) * 0.2}s"} |
import reflex as rx
loading_style = {
"rect": {
"opacity": "0",
"animation": "fadeInStayOut 6s linear infinite",
},
"@keyframes fadeInStayOut": {
"0%": {"opacity": "0"},
"5%": {"opacity": "1"},
"50%": {"opacity": "1"},
"55%": {"opacity": "0"},
"100%":... |
def svg_loading():
return rx.box(
rx.html(
"""<svg width="88" height="88" viewBox="0 0 88 88" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="32" y="41" width="6" height="6" fill="#6E56CF"/>
<rect x="38" y="29" width="6" height="6" fill="#6E56CF"/>
... | loading_style[f"rect:nth-child({i})"] = {"animation_delay": f"{(i - 1) * 0.2}s"} |
ht": "0", "transform": "translateY(0)"},
"100%": {"height": "0", "transform": "translateY(0)"},
},
}
def spinner_svg(mask_name: str):
return rx.box(
rx.html(
f"""<svg width="88" height="88" viewBox="0 0 88 88" fill="none" xmlns="http://www.w3.org/2000/svg">
<mask id... | def r_svg_loader():
return rx.fragment(
spinner_svg(mask_name="mask"),
svg_loading(),
) | |
from reflex.vars import Var
from pcweb.constants import SPLINE_RUNTIME_VERSION, SPLINE_SCENE_URL
class Spline(rx.Component):
"""Spline component."""
library = "@splinetool/react-spline"
tag = "Spline"
scene: Var[str] = SPLINE_SCENE_URL
is_default = True
lib_dependencies: list[str] = [f"@sp... | import reflex as rx | |
import reflex as rx
|
from pcweb.constants import SPLINE_RUNTIME_VERSION, SPLINE_SCENE_URL
class Spline(rx.Component):
"""Spline component."""
library = "@splinetool/react-spline"
tag = "Spline"
scene: Var[str] = SPLINE_SCENE_URL
is_default = True
lib_dependencies: list[str] = [f"@splinetool/runtime@{SPLINE_RUN... | from reflex.vars import Var |
import reflex as rx
from reflex.vars import Var
from pcweb.constants import SPLINE_RUNTIME_VERSION, SPLINE_SCENE_URL
class Spline(rx.Component):
"""Spline component."""
|
tag = "Spline"
scene: Var[str] = SPLINE_SCENE_URL
is_default = True
lib_dependencies: list[str] = [f"@splinetool/runtime@{SPLINE_RUNTIME_VERSION}"]
spline = Spline.create
| library = "@splinetool/react-spline" |
import reflex as rx
from reflex.vars import Var
from pcweb.constants import SPLINE_RUNTIME_VERSION, SPLINE_SCENE_URL
class Spline(rx.Component):
"""Spline component."""
library = "@splinetool/react-spline"
|
scene: Var[str] = SPLINE_SCENE_URL
is_default = True
lib_dependencies: list[str] = [f"@splinetool/runtime@{SPLINE_RUNTIME_VERSION}"]
spline = Spline.create
| tag = "Spline" |
import reflex as rx
from reflex.vars import Var
from pcweb.constants import SPLINE_RUNTIME_VERSION, SPLINE_SCENE_URL
class Spline(rx.Component):
"""Spline component."""
library = "@splinetool/react-spline"
tag = "Spline"
scene: Var[str] = SPLINE_SCENE_URL
|
lib_dependencies: list[str] = [f"@splinetool/runtime@{SPLINE_RUNTIME_VERSION}"]
spline = Spline.create
| is_default = True |
import reflex as rx
from reflex.vars import Var
from pcweb.constants import SPLINE_RUNTIME_VERSION, SPLINE_SCENE_URL
class Spline(rx.Component):
"""Spline component."""
library = "@splinetool/react-spline"
tag = "Spline"
scene: Var[str] = SPLINE_SCENE_URL
is_default = True
lib_dependencies:... | spline = Spline.create | |
"""Interactive tab components for Base UI."""
|
from typing import Any, Literal
from reflex import Component
from reflex.components.component import ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars import Var
from pcweb.components.utils.twmerge import cn
class BaseUICom... | from __future__ import annotations |
"""Interactive tab components for Base UI."""
from __future__ import annotations
|
from reflex import Component
from reflex.components.component import ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars import Var
from pcweb.components.utils.twmerge import cn
class BaseUIComponent(Component):
"""Set of ... | from typing import Any, Literal |
"""Interactive tab components for Base UI."""
from __future__ import annotations
from typing import Any, Literal
|
from reflex.components.component import ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars import Var
from pcweb.components.utils.twmerge import cn
class BaseUIComponent(Component):
"""Set of content sections to be display... | from reflex import Component |
"""Interactive tab components for Base UI."""
from __future__ import annotations
from typing import Any, Literal
from reflex import Component
|
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars import Var
from pcweb.components.utils.twmerge import cn
class BaseUIComponent(Component):
"""Set of content sections to be displayed one at a time."""
lib_dependencies: list[str] = ["@... | from reflex.components.component import ComponentNamespace |
"""Interactive tab components for Base UI."""
from __future__ import annotations
from typing import Any, Literal
from reflex import Component
from reflex.components.component import ComponentNamespace
|
from reflex.utils.imports import ImportVar
from reflex.vars import Var
from pcweb.components.utils.twmerge import cn
class BaseUIComponent(Component):
"""Set of content sections to be displayed one at a time."""
lib_dependencies: list[str] = ["@base-ui-components/react@^1.0.0-alpha.8"]
# Default class na... | from reflex.event import EventHandler, passthrough_event_spec |
"""Interactive tab components for Base UI."""
from __future__ import annotations
from typing import Any, Literal
from reflex import Component
from reflex.components.component import ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
|
from reflex.vars import Var
from pcweb.components.utils.twmerge import cn
class BaseUIComponent(Component):
"""Set of content sections to be displayed one at a time."""
lib_dependencies: list[str] = ["@base-ui-components/react@^1.0.0-alpha.8"]
# Default class names for each component
TABS_LIST_CLASS_NAME... | from reflex.utils.imports import ImportVar |
"""Interactive tab components for Base UI."""
from __future__ import annotations
from typing import Any, Literal
from reflex import Component
from reflex.components.component import ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
|
from pcweb.components.utils.twmerge import cn
class BaseUIComponent(Component):
"""Set of content sections to be displayed one at a time."""
lib_dependencies: list[str] = ["@base-ui-components/react@^1.0.0-alpha.8"]
# Default class names for each component
TABS_LIST_CLASS_NAME = "bg-slate-3 inline-flex g... | from reflex.vars import Var |
"""Interactive tab components for Base UI."""
from __future__ import annotations
from typing import Any, Literal
from reflex import Component
from reflex.components.component import ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex... |
class BaseUIComponent(Component):
"""Set of content sections to be displayed one at a time."""
lib_dependencies: list[str] = ["@base-ui-components/react@^1.0.0-alpha.8"]
# Default class names for each component
TABS_LIST_CLASS_NAME = "bg-slate-3 inline-flex gap-1 p-1 items-center justify-start rounded-[10... | from pcweb.components.utils.twmerge import cn |
"""Interactive tab components for Base UI."""
from __future__ import annotations
from typing import Any, Literal
from reflex import Component
from reflex.components.component import ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex... |
# Default class names for each component
TABS_LIST_CLASS_NAME = "bg-slate-3 inline-flex gap-1 p-1 items-center justify-start rounded-[10px] relative z-0"
TABS_TAB_CLASS_NAME = "h-7 px-1.5 rounded-md justify-center items-center gap-1.5 inline-flex text-sm font-medium text-slate-9 cursor-pointer z-[1] hover:text-slat... | class BaseUIComponent(Component):
"""Set of content sections to be displayed one at a time."""
lib_dependencies: list[str] = ["@base-ui-components/react@^1.0.0-alpha.8"] |
"""Interactive tab components for Base UI."""
from __future__ import annotations
from typing import Any, Literal
from reflex import Component
from reflex.components.component import ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex... |
TABS_TAB_CLASS_NAME = "h-7 px-1.5 rounded-md justify-center items-center gap-1.5 inline-flex text-sm font-medium text-slate-9 cursor-pointer z-[1] hover:text-slate-12 transition-color text-nowrap data-[selected]:text-slate-12"
TABS_INDICATOR_CLASS_NAME = "absolute top-1/2 left-0 -z-1 h-7 w-[var(--active-tab-width)] ... | TABS_LIST_CLASS_NAME = "bg-slate-3 inline-flex gap-1 p-1 items-center justify-start rounded-[10px] relative z-0" |
"""Interactive tab components for Base UI."""
from __future__ import annotations
from typing import Any, Literal
from reflex import Component
from reflex.components.component import ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex... |
TABS_INDICATOR_CLASS_NAME = "absolute top-1/2 left-0 -z-1 h-7 w-[var(--active-tab-width)] -translate-y-1/2 translate-x-[var(--active-tab-left)] rounded-md bg-slate-1 shadow-small transition-all duration-200 ease-in-out"
class TabsBaseUIComponent(BaseUIComponent):
library = "@base-ui-components/react/tabs"
... | TABS_TAB_CLASS_NAME = "h-7 px-1.5 rounded-md justify-center items-center gap-1.5 inline-flex text-sm font-medium text-slate-9 cursor-pointer z-[1] hover:text-slate-12 transition-color text-nowrap data-[selected]:text-slate-12" |
"""Interactive tab components for Base UI."""
from __future__ import annotations
from typing import Any, Literal
from reflex import Component
from reflex.components.component import ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex... |
class TabsBaseUIComponent(BaseUIComponent):
library = "@base-ui-components/react/tabs"
@property
def import_var(self):
return ImportVar(
tag="Tabs",
package_path="",
install=False,
)
class TabsRoot(TabsBaseUIComponent):
"""Groups the tabs and the... | TABS_INDICATOR_CLASS_NAME = "absolute top-1/2 left-0 -z-1 h-7 w-[var(--active-tab-width)] -translate-y-1/2 translate-x-[var(--active-tab-left)] rounded-md bg-slate-1 shadow-small transition-all duration-200 ease-in-out" |
onent import ComponentNamespace
from reflex.event import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars import Var
from pcweb.components.utils.twmerge import cn
class BaseUIComponent(Component):
"""Set of content sections to be displayed one at a time."""
li... |
class TabsRoot(TabsBaseUIComponent):
"""Groups the tabs and the corresponding panels."""
tag = "Tabs.Root"
# The value of the tab that should be active when initially rendered
default_value: Var[Any] = 0
# The controlled value of the tab that should be active
value: Var[Any]
# Event h... | class TabsBaseUIComponent(BaseUIComponent):
library = "@base-ui-components/react/tabs"
@property
def import_var(self):
return ImportVar(
tag="Tabs",
package_path="",
install=False,
) |
t import EventHandler, passthrough_event_spec
from reflex.utils.imports import ImportVar
from reflex.vars import Var
from pcweb.components.utils.twmerge import cn
class BaseUIComponent(Component):
"""Set of content sections to be displayed one at a time."""
lib_dependencies: list[str] = ["@base-ui-component... |
@property
def import_var(self):
return ImportVar(
tag="Tabs",
package_path="",
install=False,
)
class TabsRoot(TabsBaseUIComponent):
"""Groups the tabs and the corresponding panels."""
tag = "Tabs.Root"
# The value of the tab that should be a... | library = "@base-ui-components/react/tabs" |
s.imports import ImportVar
from reflex.vars import Var
from pcweb.components.utils.twmerge import cn
class BaseUIComponent(Component):
"""Set of content sections to be displayed one at a time."""
lib_dependencies: list[str] = ["@base-ui-components/react@^1.0.0-alpha.8"]
# Default class names for each comp... |
class TabsRoot(TabsBaseUIComponent):
"""Groups the tabs and the corresponding panels."""
tag = "Tabs.Root"
# The value of the tab that should be active when initially rendered
default_value: Var[Any] = 0
# The controlled value of the tab that should be active
value: Var[Any]
# Event h... | def import_var(self):
return ImportVar(
tag="Tabs",
package_path="",
install=False,
) |
["@base-ui-components/react@^1.0.0-alpha.8"]
# Default class names for each component
TABS_LIST_CLASS_NAME = "bg-slate-3 inline-flex gap-1 p-1 items-center justify-start rounded-[10px] relative z-0"
TABS_TAB_CLASS_NAME = "h-7 px-1.5 rounded-md justify-center items-center gap-1.5 inline-flex text-sm font-medium text-... |
# The value of the tab that should be active when initially rendered
default_value: Var[Any] = 0
# The controlled value of the tab that should be active
value: Var[Any]
# Event handler called when the value changes
on_value_change: EventHandler[passthrough_event_spec(str)]
# The orienta... | tag = "Tabs.Root" |
ounded-md bg-slate-1 shadow-small transition-all duration-200 ease-in-out"
class TabsBaseUIComponent(BaseUIComponent):
library = "@base-ui-components/react/tabs"
@property
def import_var(self):
return ImportVar(
tag="Tabs",
package_path="",
install=False,
... |
# Whether to activate tabs on focus
activate_on_focus: Var[bool] = True
# Whether to loop through tabs
loop: Var[bool] = True
# Class name
class_name: Var[str] | str | None = TABS_LIST_CLASS_NAME
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the ta... | tag = "Tabs.List" |
package_path="",
install=False,
)
class TabsRoot(TabsBaseUIComponent):
"""Groups the tabs and the corresponding panels."""
tag = "Tabs.Root"
# The value of the tab that should be active when initially rendered
default_value: Var[Any] = 0
# The controlled value of the... |
class TabsTab(TabsBaseUIComponent):
"""An individual interactive tab button."""
tag = "Tabs.Tab"
# The value of the tab
value: Var[Any]
# Optional icon component
icon: Component | None = None
# Class name
class_name: Var[str] | str | None = TABS_TAB_CLASS_NAME
@classmethod
... | def create(cls, *children, **props) -> Component:
"""Create the tabs list component."""
if "class_name" in props:
props["class_name"] = cn(TABS_LIST_CLASS_NAME, props["class_name"])
return super().create(*children, **props) |
"""Groups the tabs and the corresponding panels."""
tag = "Tabs.Root"
# The value of the tab that should be active when initially rendered
default_value: Var[Any] = 0
# The controlled value of the tab that should be active
value: Var[Any]
# Event handler called when the value changes
on... |
return super().create(*children, **props)
class TabsTab(TabsBaseUIComponent):
"""An individual interactive tab button."""
tag = "Tabs.Tab"
# The value of the tab
value: Var[Any]
# Optional icon component
icon: Component | None = None
# Class name
class_name: Var[str] | str... | if "class_name" in props:
props["class_name"] = cn(TABS_LIST_CLASS_NAME, props["class_name"]) |
ing panels."""
tag = "Tabs.Root"
# The value of the tab that should be active when initially rendered
default_value: Var[Any] = 0
# The controlled value of the tab that should be active
value: Var[Any]
# Event handler called when the value changes
on_value_change: EventHandler[passthroug... |
return super().create(*children, **props)
class TabsTab(TabsBaseUIComponent):
"""An individual interactive tab button."""
tag = "Tabs.Tab"
# The value of the tab
value: Var[Any]
# Optional icon component
icon: Component | None = None
# Class name
class_name: Var[str] | str... | props["class_name"] = cn(TABS_LIST_CLASS_NAME, props["class_name"]) |
value: Var[Any]
# Event handler called when the value changes
on_value_change: EventHandler[passthrough_event_spec(str)]
# The orientation of the component
orientation: Var[Literal["horizontal", "vertical"]] = "horizontal"
# Class name
class_name: Var[str] | str | None
class TabsList(TabsBa... |
# The value of the tab
value: Var[Any]
# Optional icon component
icon: Component | None = None
# Class name
class_name: Var[str] | str | None = TABS_TAB_CLASS_NAME
@classmethod
def create(cls, *children, icon: Component | None = None, **props) -> Component:
"""Create the tab... | tag = "Tabs.Tab" |
orizontal"
# Class name
class_name: Var[str] | str | None
class TabsList(TabsBaseUIComponent):
"""Groups the individual tab buttons."""
tag = "Tabs.List"
# Whether to activate tabs on focus
activate_on_focus: Var[bool] = True
# Whether to loop through tabs
loop: Var[bool] = True
... |
class TabsIndicator(TabsBaseUIComponent):
"""Visual indicator for the active tab."""
tag = "Tabs.Indicator"
# Whether to render before hydration
render_before_hydration: Var[bool] = False
# Class name
class_name: Var[str] | str | None = TABS_INDICATOR_CLASS_NAME
@classmethod
def c... | def create(cls, *children, icon: Component | None = None, **props) -> Component:
"""Create the tab component with optional icon."""
if "class_name" in props:
props["class_name"] = cn(TABS_TAB_CLASS_NAME, props["class_name"])
if icon is not None:
children = (icon, *childre... |
""
tag = "Tabs.List"
# Whether to activate tabs on focus
activate_on_focus: Var[bool] = True
# Whether to loop through tabs
loop: Var[bool] = True
# Class name
class_name: Var[str] | str | None = TABS_LIST_CLASS_NAME
@classmethod
def create(cls, *children, **props) -> Component:... |
if icon is not None:
children = (icon, *children)
return super().create(*children, **props)
class TabsIndicator(TabsBaseUIComponent):
"""Visual indicator for the active tab."""
tag = "Tabs.Indicator"
# Whether to render before hydration
render_before_hydration: Var[bool]... | if "class_name" in props:
props["class_name"] = cn(TABS_TAB_CLASS_NAME, props["class_name"]) |
er to activate tabs on focus
activate_on_focus: Var[bool] = True
# Whether to loop through tabs
loop: Var[bool] = True
# Class name
class_name: Var[str] | str | None = TABS_LIST_CLASS_NAME
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the tabs list compo... |
if icon is not None:
children = (icon, *children)
return super().create(*children, **props)
class TabsIndicator(TabsBaseUIComponent):
"""Visual indicator for the active tab."""
tag = "Tabs.Indicator"
# Whether to render before hydration
render_before_hydration: Var[bool]... | props["class_name"] = cn(TABS_TAB_CLASS_NAME, props["class_name"]) |
Whether to loop through tabs
loop: Var[bool] = True
# Class name
class_name: Var[str] | str | None = TABS_LIST_CLASS_NAME
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the tabs list component."""
if "class_name" in props:
props["class_name"] ... |
return super().create(*children, **props)
class TabsIndicator(TabsBaseUIComponent):
"""Visual indicator for the active tab."""
tag = "Tabs.Indicator"
# Whether to render before hydration
render_before_hydration: Var[bool] = False
# Class name
class_name: Var[str] | str | None = TAB... | if icon is not None:
children = (icon, *children) |
loop: Var[bool] = True
# Class name
class_name: Var[str] | str | None = TABS_LIST_CLASS_NAME
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the tabs list component."""
if "class_name" in props:
props["class_name"] = cn(TABS_LIST_CLASS_NAME, props[... |
return super().create(*children, **props)
class TabsIndicator(TabsBaseUIComponent):
"""Visual indicator for the active tab."""
tag = "Tabs.Indicator"
# Whether to render before hydration
render_before_hydration: Var[bool] = False
# Class name
class_name: Var[str] | str | None = TAB... | children = (icon, *children) |
"""Create the tabs list component."""
if "class_name" in props:
props["class_name"] = cn(TABS_LIST_CLASS_NAME, props["class_name"])
return super().create(*children, **props)
class TabsTab(TabsBaseUIComponent):
"""An individual interactive tab button."""
tag = "Tabs.Tab"
... |
# Whether to render before hydration
render_before_hydration: Var[bool] = False
# Class name
class_name: Var[str] | str | None = TABS_INDICATOR_CLASS_NAME
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the tabs indicator component."""
if "class_name"... | tag = "Tabs.Indicator" |
TabsTab(TabsBaseUIComponent):
"""An individual interactive tab button."""
tag = "Tabs.Tab"
# The value of the tab
value: Var[Any]
# Optional icon component
icon: Component | None = None
# Class name
class_name: Var[str] | str | None = TABS_TAB_CLASS_NAME
@classmethod
def cre... |
class TabsPanel(TabsBaseUIComponent):
"""Content panel associated with a tab."""
tag = "Tabs.Panel"
# The value that associates the panel with a tab
value: Var[Any]
# Whether to keep the panel mounted when inactive
keep_mounted: Var[bool] = False
# Class name
class_name: Var[str] ... | def create(cls, *children, **props) -> Component:
"""Create the tabs indicator component."""
if "class_name" in props:
props["class_name"] = cn(TABS_INDICATOR_CLASS_NAME, props["class_name"])
return super().create(*children, **props) |
e value of the tab
value: Var[Any]
# Optional icon component
icon: Component | None = None
# Class name
class_name: Var[str] | str | None = TABS_TAB_CLASS_NAME
@classmethod
def create(cls, *children, icon: Component | None = None, **props) -> Component:
"""Create the tab component... |
return super().create(*children, **props)
class TabsPanel(TabsBaseUIComponent):
"""Content panel associated with a tab."""
tag = "Tabs.Panel"
# The value that associates the panel with a tab
value: Var[Any]
# Whether to keep the panel mounted when inactive
keep_mounted: Var[bool] =... | if "class_name" in props:
props["class_name"] = cn(TABS_INDICATOR_CLASS_NAME, props["class_name"]) |
# Optional icon component
icon: Component | None = None
# Class name
class_name: Var[str] | str | None = TABS_TAB_CLASS_NAME
@classmethod
def create(cls, *children, icon: Component | None = None, **props) -> Component:
"""Create the tab component with optional icon."""
if "cl... |
return super().create(*children, **props)
class TabsPanel(TabsBaseUIComponent):
"""Content panel associated with a tab."""
tag = "Tabs.Panel"
# The value that associates the panel with a tab
value: Var[Any]
# Whether to keep the panel mounted when inactive
keep_mounted: Var[bool] =... | props["class_name"] = cn(TABS_INDICATOR_CLASS_NAME, props["class_name"]) |
ABS_TAB_CLASS_NAME
@classmethod
def create(cls, *children, icon: Component | None = None, **props) -> Component:
"""Create the tab component with optional icon."""
if "class_name" in props:
props["class_name"] = cn(TABS_TAB_CLASS_NAME, props["class_name"])
if icon is not Non... |
class Tabs(ComponentNamespace):
"""Namespace for Tab components."""
root = __call__ = staticmethod(TabsRoot.create)
list = staticmethod(TabsList.create)
tab = staticmethod(TabsTab.create)
panel = staticmethod(TabsPanel.create)
indicator = staticmethod(TabsIndicator.create)
tabs = Tabs()
| class TabsPanel(TabsBaseUIComponent):
"""Content panel associated with a tab."""
tag = "Tabs.Panel"
# The value that associates the panel with a tab
value: Var[Any]
# Whether to keep the panel mounted when inactive
keep_mounted: Var[bool] = False
# Class name
class_name: Var[str] | s... |
= None, **props) -> Component:
"""Create the tab component with optional icon."""
if "class_name" in props:
props["class_name"] = cn(TABS_TAB_CLASS_NAME, props["class_name"])
if icon is not None:
children = (icon, *children)
return super().create(*children, **pro... |
# The value that associates the panel with a tab
value: Var[Any]
# Whether to keep the panel mounted when inactive
keep_mounted: Var[bool] = False
# Class name
class_name: Var[str] | str | None
class Tabs(ComponentNamespace):
"""Namespace for Tab components."""
root = __call__ = s... | tag = "Tabs.Panel" |
children = (icon, *children)
return super().create(*children, **props)
class TabsIndicator(TabsBaseUIComponent):
"""Visual indicator for the active tab."""
tag = "Tabs.Indicator"
# Whether to render before hydration
render_before_hydration: Var[bool] = False
# Class name
class_na... |
tabs = Tabs()
| class Tabs(ComponentNamespace):
"""Namespace for Tab components."""
root = __call__ = staticmethod(TabsRoot.create)
list = staticmethod(TabsList.create)
tab = staticmethod(TabsTab.create)
panel = staticmethod(TabsPanel.create)
indicator = staticmethod(TabsIndicator.create) |
ops)
class TabsIndicator(TabsBaseUIComponent):
"""Visual indicator for the active tab."""
tag = "Tabs.Indicator"
# Whether to render before hydration
render_before_hydration: Var[bool] = False
# Class name
class_name: Var[str] | str | None = TABS_INDICATOR_CLASS_NAME
@classmethod
d... |
list = staticmethod(TabsList.create)
tab = staticmethod(TabsTab.create)
panel = staticmethod(TabsPanel.create)
indicator = staticmethod(TabsIndicator.create)
tabs = Tabs()
| root = __call__ = staticmethod(TabsRoot.create) |
"""Visual indicator for the active tab."""
tag = "Tabs.Indicator"
# Whether to render before hydration
render_before_hydration: Var[bool] = False
# Class name
class_name: Var[str] | str | None = TABS_INDICATOR_CLASS_NAME
@classmethod
def create(cls, *children, **props) -> Component:
... |
tab = staticmethod(TabsTab.create)
panel = staticmethod(TabsPanel.create)
indicator = staticmethod(TabsIndicator.create)
tabs = Tabs()
| list = staticmethod(TabsList.create) |
""
tag = "Tabs.Indicator"
# Whether to render before hydration
render_before_hydration: Var[bool] = False
# Class name
class_name: Var[str] | str | None = TABS_INDICATOR_CLASS_NAME
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the tabs indicator compone... |
panel = staticmethod(TabsPanel.create)
indicator = staticmethod(TabsIndicator.create)
tabs = Tabs()
| tab = staticmethod(TabsTab.create) |
hether to render before hydration
render_before_hydration: Var[bool] = False
# Class name
class_name: Var[str] | str | None = TABS_INDICATOR_CLASS_NAME
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the tabs indicator component."""
if "class_name" in props... |
indicator = staticmethod(TabsIndicator.create)
tabs = Tabs()
| panel = staticmethod(TabsPanel.create) |
r_before_hydration: Var[bool] = False
# Class name
class_name: Var[str] | str | None = TABS_INDICATOR_CLASS_NAME
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the tabs indicator component."""
if "class_name" in props:
props["class_name"] = cn(TABS... |
tabs = Tabs()
| indicator = staticmethod(TabsIndicator.create) |
s name
class_name: Var[str] | str | None = TABS_INDICATOR_CLASS_NAME
@classmethod
def create(cls, *children, **props) -> Component:
"""Create the tabs indicator component."""
if "class_name" in props:
props["class_name"] = cn(TABS_INDICATOR_CLASS_NAME, props["class_name"])
... | tabs = Tabs() | |
import reflex as rx
from reflex.event import EventHandler, EventSpec
from reflex.vars.base import get_unique_variable_name
from pcweb.components.icons import get_icon
from pcweb.components.icons.hugeicons import hi
from pcweb.components.utils.twmerge import cn
def user_input(
placeholder: str = "",
name: s... | from typing import List, Optional, Union | |
from typing import List, Optional, Union
|
from reflex.event import EventHandler, EventSpec
from reflex.vars.base import get_unique_variable_name
from pcweb.components.icons import get_icon
from pcweb.components.icons.hugeicons import hi
from pcweb.components.utils.twmerge import cn
def user_input(
placeholder: str = "",
name: str = "",
input_id... | import reflex as rx |
from typing import List, Optional, Union
import reflex as rx
|
from reflex.vars.base import get_unique_variable_name
from pcweb.components.icons import get_icon
from pcweb.components.icons.hugeicons import hi
from pcweb.components.utils.twmerge import cn
def user_input(
placeholder: str = "",
name: str = "",
input_id: str = "",
input_cn: str = "",
type_: st... | from reflex.event import EventHandler, EventSpec |
from typing import List, Optional, Union
import reflex as rx
from reflex.event import EventHandler, EventSpec
|
from pcweb.components.icons import get_icon
from pcweb.components.icons.hugeicons import hi
from pcweb.components.utils.twmerge import cn
def user_input(
placeholder: str = "",
name: str = "",
input_id: str = "",
input_cn: str = "",
type_: str = "text",
clear_button_event: list[EventHandler ... | from reflex.vars.base import get_unique_variable_name |
from typing import List, Optional, Union
import reflex as rx
from reflex.event import EventHandler, EventSpec
from reflex.vars.base import get_unique_variable_name
|
from pcweb.components.icons.hugeicons import hi
from pcweb.components.utils.twmerge import cn
def user_input(
placeholder: str = "",
name: str = "",
input_id: str = "",
input_cn: str = "",
type_: str = "text",
clear_button_event: list[EventHandler | EventSpec] | None = None,
class_name: s... | from pcweb.components.icons import get_icon |
from typing import List, Optional, Union
import reflex as rx
from reflex.event import EventHandler, EventSpec
from reflex.vars.base import get_unique_variable_name
from pcweb.components.icons import get_icon
|
from pcweb.components.utils.twmerge import cn
def user_input(
placeholder: str = "",
name: str = "",
input_id: str = "",
input_cn: str = "",
type_: str = "text",
clear_button_event: list[EventHandler | EventSpec] | None = None,
class_name: str = "",
**props,
) -> rx.Component:
"""... | from pcweb.components.icons.hugeicons import hi |
from typing import List, Optional, Union
import reflex as rx
from reflex.event import EventHandler, EventSpec
from reflex.vars.base import get_unique_variable_name
from pcweb.components.icons import get_icon
from pcweb.components.icons.hugeicons import hi
|
def user_input(
placeholder: str = "",
name: str = "",
input_id: str = "",
input_cn: str = "",
type_: str = "text",
clear_button_event: list[EventHandler | EventSpec] | None = None,
class_name: str = "",
**props,
) -> rx.Component:
"""Create a basic input component.
Args:
... | from pcweb.components.utils.twmerge import cn |
vars.base import get_unique_variable_name
from pcweb.components.icons import get_icon
from pcweb.components.icons.hugeicons import hi
from pcweb.components.utils.twmerge import cn
def user_input(
placeholder: str = "",
name: str = "",
input_id: str = "",
input_cn: str = "",
type_: str = "text",
... |
return rx.box(
rx.el.input(
placeholder=placeholder,
name=name,
id=input_id,
class_name=cn(
"box-border flex flex-row flex-1 gap-2 border-slate-5 bg-slate-1 focus:shadow-[0px_0px_0px_2px_var(--c-violet-4)] px-6 pr-8 border rounded-[0.625rem] h... | if not input_id:
input_id = get_unique_variable_name() |
ue_variable_name
from pcweb.components.icons import get_icon
from pcweb.components.icons.hugeicons import hi
from pcweb.components.utils.twmerge import cn
def user_input(
placeholder: str = "",
name: str = "",
input_id: str = "",
input_cn: str = "",
type_: str = "text",
clear_button_event: li... |
return rx.box(
rx.el.input(
placeholder=placeholder,
name=name,
id=input_id,
class_name=cn(
"box-border flex flex-row flex-1 gap-2 border-slate-5 bg-slate-1 focus:shadow-[0px_0px_0px_2px_var(--c-violet-4)] px-6 pr-8 border rounded-[0.625rem] h... | input_id = get_unique_variable_name() |
Spec]]] = None,
class_name: str = "",
**props,
) -> rx.Component:
"""Create an input component with clear functionality.
Args:
placeholder (str): Placeholder text for the input. Defaults to "".
name (str): Name of the input. Defaults to "".
id (str): ID of the input. Defaults to... |
icon_component = (
rx.box(
hi(
icon,
class_name="!text-slate-9 pointer-events-none",
),
class_name="left-0 z-10 absolute inset-y-0 flex items-center pl-2.5",
)
if icon
else rx.fragment()
)
id = get_unique_va... | padding_left_cn = "pl-8" if icon else "pl-2.5" |
ps,
) -> rx.Component:
"""Create an input component with clear functionality.
Args:
placeholder (str): Placeholder text for the input. Defaults to "".
name (str): Name of the input. Defaults to "".
id (str): ID of the input. Defaults to "".
input_cn (str): Additional Tailwind CS... |
id = get_unique_variable_name()
return rx.box(
icon_component,
rx.el.input(
placeholder=placeholder,
name=name,
id=id,
class_name=f"box-border flex flex-row flex-1 gap-2 border-slate-5 bg-slate-1 focus:shadow-[0px_0px_0px_2px_var(--c-violet-4)] px... | icon_component = (
rx.box(
hi(
icon,
class_name="!text-slate-9 pointer-events-none",
),
class_name="left-0 z-10 absolute inset-y-0 flex items-center pl-2.5",
)
if icon
else rx.fragment()
) |
Additional Tailwind CSS class for input. Defaults to "".
form_cn (str): Additional Tailwind CSS class for form. Defaults to "".
icon (str): Icon to display in the input. Defaults to "".
type_ (str): Type of the input. Defaults to "text".
clear_button_event (Optional[EventType[[]]]): Eve... |
return rx.box(
icon_component,
rx.el.input(
placeholder=placeholder,
name=name,
id=id,
class_name=f"box-border flex flex-row flex-1 gap-2 border-slate-5 bg-slate-1 focus:shadow-[0px_0px_0px_2px_var(--c-violet-4)] px-6 pr-8 border rounded-[0.625rem] h-... | id = get_unique_variable_name() |
"""UI and logic inkeep chat component."""
|
from reflex.utils.imports import ImportVar
from reflex.vars import Var
class InkeepSearchBar(rx.NoSSRComponent):
tag = "InkeepSearchBar"
library = "@inkeep/cxkit-react@0.5.55"
class Search(rx.el.Div):
def add_imports(self):
"""Add the imports for the component."""
return {
"... | import reflex as rx |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.