Div
Put children in a <div> element.
@solara.component
def Div(children=[], classes: List[str] = [], style: Union[str, Dict[str, str], None] = None, **kwargs):
...
For a layout, prefer Row or Column.
Example
import solara
@solara.component
def Page():
with solara.Div(style={"border": "1px solid gray", "padding": "8px"}):
solara.Text("Inside a div")
Inside a div
Live output
Arguments
children: The elements to put in the div.classes: List of CSS classes to apply.style: CSS style to apply, as a string or a dictionary.**kwargs: Other arguments for the underlyingipyvuetify.Htmlwidget.