A container component that divides the layout into sections, with an optional title.

Fields

NameTypeDescriptionOptions
TitleTextLeave blank to hide.-
CollapsibleBoolean-
  1. Yes
  2. No
Start collapsedBooleanOnly applied when the component is collapsible.
  1. Yes
  2. No
AccentColor--
Primary textColor--
Secondary textColor--
Container backgroundColor--
Container shadowShadow--
SeparatorColor--
ButtonColor--
Button textColor--
Button shadowShadow--
PaddingPadding--
Content alignment (H)Align (H)--
Custom CSS classesTextCSS classes, separated by spaces. You can define classes in custom stylesheets.-

Low code usage

This component can be declared directly in Python, using backend-driven UI.

ui.Section(content={
        "title": "", # str 
        "isCollapsible": "no", # str [yes, no]
        "startCollapsed": "no", # str [yes, no]
        "accentColor": "", # str 
        "primaryTextColor": "", # str 
        "secondaryTextColor": "", # str 
        "containerBackgroundColor": "", # str 
        "containerShadow": "", # str 
        "separatorColor": "", # str 
        "buttonColor": "", # str 
        "buttonTextColor": "", # str 
        "buttonShadow": "", # str 
        "contentPadding": "", # str 
        "contentHAlign": "", # str 
        "cssClasses": "", # str 
    }
)

Reference