Frame
Displays related content in a structured frame.
Installation
Command to install the Frame component.
Component Guide
Use the following to build the Frame component.
from components.ui.frame import frameSource Code & Dependencies
For manual installation, copy each of the source codes below in their respective locations.
components/core/core.py
components/ui/frame.py
Examples
Basic Panels
A basic frame with a header and two panels.
Props used: none required beyond default frame.root composition.
Stacked Panels
Set stacked=True to merge panel borders into one continuous block.
Props used: stacked on frame.root.
Dense Panels
Set dense=True for minimal frame padding, edge-to-edge.
Props used: dense on frame.root.
Outer Border
Set variant="ghost" to remove the frame's outer border.
Props used: variant on frame.root.
API Reference
frame.root
frame.root(
frame.panel(
frame.header(frame.title("Overview")),
"Panel content",
),
variant="default",
spacing="default",
)
frame.panel
frame.panel("Panel content")
frame.header
frame.header(frame.title("Overview"))
frame.title
frame.title("Overview")
frame.description
frame.description("A summary of recent activity.")
frame.footer
frame.footer(button("View all", variant="ghost", size="sm"))