Skip to main content
Div and Span are unstyled primitives — the escape hatches for when Row, Column, and Grid don’t express what you need.

Div

A block container with no default styling. Style it entirely through css_class:

Span

An inline text element with no default styling. Useful for inline annotations or colored text:

API Reference

Div Parameters

css_class
str | None
default:"None"
Tailwind CSS classes. Div has no built-in styling.

Span Parameters

content
str
required
Text content. Can be passed as a positional argument.
css_class
str | None
default:"None"
Tailwind CSS classes. Span has no built-in styling.

Protocol Reference

Div
{
  "type": "Div",
  "children?": "[Component]",
  "cssClass?": "string"
}
Span
{
  "type": "Span",
  "content": "string (required)",
  "cssClass?": "string"
}
For the complete protocol schema, see Div, Span.