diff --git a/reflex/components/core/html.py b/reflex/components/core/html.py
index 987d216a3..e344cb3d7 100644
--- a/reflex/components/core/html.py
+++ b/reflex/components/core/html.py
@@ -35,5 +35,11 @@ class Html(Div):
else:
props["dangerouslySetInnerHTML"] = {"__html": children[0]}
+ # Apply the default classname
+ given_class_name = props.pop("class_name", [])
+ if isinstance(given_class_name, str):
+ given_class_name = [given_class_name]
+ props["class_name"] = ["rx-Html", *given_class_name]
+
# Create the component.
return super().create(**props)
diff --git a/reflex/components/core/upload.py b/reflex/components/core/upload.py
index a652f9462..b3ac37c15 100644
--- a/reflex/components/core/upload.py
+++ b/reflex/components/core/upload.py
@@ -219,6 +219,12 @@ class Upload(MemoizationLeaf):
# Mark the Upload component as used in the app.
cls.is_used = True
+ # Apply the default classname
+ given_class_name = props.pop("class_name", [])
+ if isinstance(given_class_name, str):
+ given_class_name = [given_class_name]
+ props["class_name"] = ["rx-Upload", *given_class_name]
+
# get only upload component props
supported_props = cls.get_props().union({"on_drop"})
upload_props = {
diff --git a/reflex/components/radix/themes/layout/container.py b/reflex/components/radix/themes/layout/container.py
index 2e049df7d..2ab548cdf 100644
--- a/reflex/components/radix/themes/layout/container.py
+++ b/reflex/components/radix/themes/layout/container.py
@@ -4,6 +4,7 @@ from __future__ import annotations
from typing import Literal
from reflex import el
+from reflex.style import STACK_CHILDREN_FULL_WIDTH
from reflex.vars import Var
from ..base import RadixThemesComponent
@@ -19,5 +20,32 @@ class Container(el.Div, RadixThemesComponent):
tag = "Container"
- # The size of the container: "1" - "4" (default "4")
- size: Var[LiteralContainerSize]
+ # The size of the container: "1" - "4" (default "3")
+ size: Var[LiteralContainerSize] = Var.create_safe("3")
+
+ @classmethod
+ def create(
+ cls,
+ *children,
+ padding: str = "16px",
+ stack_children_full_width: bool = False,
+ **props,
+ ):
+ """Create the container component.
+
+ Args:
+ children: The children components.
+ padding: The padding of the container.
+ stack_children_full_width: If True, any vstack/hstack children will have 100% width.
+ props: The properties of the container.
+
+ Returns:
+ The container component.
+ """
+ if stack_children_full_width:
+ props["style"] = {**STACK_CHILDREN_FULL_WIDTH, **props.pop("style", {})}
+ return super().create(
+ *children,
+ padding=padding,
+ **props,
+ )
diff --git a/reflex/components/radix/themes/layout/container.pyi b/reflex/components/radix/themes/layout/container.pyi
index 4e7bc275b..a2ea0266f 100644
--- a/reflex/components/radix/themes/layout/container.pyi
+++ b/reflex/components/radix/themes/layout/container.pyi
@@ -9,6 +9,7 @@ from reflex.event import EventChain, EventHandler, EventSpec
from reflex.style import Style
from typing import Literal
from reflex import el
+from reflex.style import STACK_CHILDREN_FULL_WIDTH
from reflex.vars import Var
from ..base import RadixThemesComponent
@@ -20,6 +21,8 @@ class Container(el.Div, RadixThemesComponent):
def create( # type: ignore
cls,
*children,
+ padding: Optional[str] = "16px",
+ stack_children_full_width: Optional[bool] = False,
size: Optional[
Union[Var[Literal["1", "2", "3", "4"]], Literal["1", "2", "3", "4"]]
] = None,
@@ -116,39 +119,15 @@ class Container(el.Div, RadixThemesComponent):
] = None,
**props
) -> "Container":
- """Create a new component instance.
-
- Will prepend "RadixThemes" to the component tag to avoid conflicts with
- other UI libraries for common names, like Text and Button.
+ """Create the container component.
Args:
- *children: Child components.
- size: The size of the container: "1" - "4" (default "4")
- access_key: Provides a hint for generating a keyboard shortcut for the current element.
- auto_capitalize: Controls whether and how text input is automatically capitalized as it is entered/edited by the user.
- content_editable: Indicates whether the element's content is editable.
- context_menu: Defines the ID of a