Section & SectionColumn

The Section and SectionColumn components provide a responsive multi-column layout for organizing form fields and content. Columns are laid out horizontally and automatically wrap to the next row when the available width is constrained.

<Section>
    <SectionColumn HeaderText="Contact Info">
        <TextEdit ColumnName="firstname" />
        <TextEdit ColumnName="lastname" />
    </SectionColumn>
    <SectionColumn HeaderText="Account Info">
        <TextEdit ColumnName="name" />
    </SectionColumn>
</Section>

Columns

Place one or more SectionColumn components inside a Section. The columns distribute evenly across the available width. Use ColumnCount to explicitly set the number of columns (1-4); if omitted, it defaults to the number of SectionColumn children.

<!-- Explicit 3-column layout -->
<Section ColumnCount="3">
    <SectionColumn>Column 1</SectionColumn>
    <SectionColumn>Column 2</SectionColumn>
    <SectionColumn>Column 3</SectionColumn>
</Section>

Column Minimum Width

Set ColumnMinWidth on the Section to control when columns wrap to the next row. When the available width per column falls below this threshold, columns stack vertically. Defaults to 340px.

<Section ColumnMinWidth="200px">
    <SectionColumn>Narrow column 1</SectionColumn>
    <SectionColumn>Narrow column 2</SectionColumn>
    <SectionColumn>Narrow column 3</SectionColumn>
    <SectionColumn>Narrow column 4</SectionColumn>
</Section>

Column Widths

Use Width on a SectionColumn to give it a larger or smaller share of the row. Widths are ratios, not CSS percentages: three columns with Width="3", Width="4", Width="3" lay out as 30% / 40% / 30% (3 + 4 + 3 = 10 parts). Columns without a Width fall back to the default equal distribution.

<!-- Widths are ratios: 3 + 4 + 3 = 10 parts, so 30% / 40% / 30% -->
<Section>
    <SectionColumn Width="3">Column 1 (30%)</SectionColumn>
    <SectionColumn Width="4">Column 2 (40%)</SectionColumn>
    <SectionColumn Width="3">Column 3 (30%)</SectionColumn>
</Section>

Headers & Footers

Both Section and SectionColumn support HeaderText/Header and FooterText/Footer parameters. Use HeaderText for simple text headings or Header for custom render fragment content.

<Section HeaderText="Account Details" FooterText="Last updated: today">
    <SectionColumn HeaderText="General">
        <TextEdit ColumnName="name" />
    </SectionColumn>
    <SectionColumn HeaderText="Address">
        <TextEdit ColumnName="address1_city" />
    </SectionColumn>
</Section>

Borders

Set BorderVisible="true" on a Section or SectionColumn to display a border around it. Borders can be set independently on the section and each column.

<Section BorderVisible="true">
    <SectionColumn BorderVisible="true">
        Bordered column
    </SectionColumn>
    <SectionColumn BorderVisible="false">
        No border on this column
    </SectionColumn>
</Section>

Content Orientation

By default, editor components inside a SectionColumn are stacked vertically. Set ColumnContentOrientation="ComponentOrientation.Horizontal" to lay them out horizontally instead. Use HorizontalGap and VerticalGap to control spacing between items.

<Section>
    <SectionColumn ColumnContentOrientation="ComponentOrientation.Horizontal"
                    HorizontalGap="20"
                    VerticalGap="10">
        <TextEdit ColumnName="firstname" />
        <TextEdit ColumnName="lastname" />
    </SectionColumn>
</Section>

Example

A Section with four columns that wraps responsively.

Blazor example
Column 1
Column 2
Column 3
Column 4
React example

Column Widths Example

Adjust the Width values below to change each column's share of the row. Widths are ratios, so the rendered percentage for a column is its value divided by the sum of all three.

Blazor example
30%
40%
30%
React example

Configuration Options

Use the controls below to explore borders, headers, and footers on both Section and SectionColumn.

Blazor example
Section Border Visible? Section Column Border Visible?
Column 1
Column 2
Column 3
Column 4
React example
Blazor

Section Class

Parameters

Name
Type
Default
Description
BorderVisiblebool
False
Should a border be displayed?
ChildContentRenderFragment?
Content of the section.
ChildContentStylestring?
Style to apply to the container of the child content.
ColumnCountint?
Optionally specify the number of columns desired for the section. The default is calculated by the actual number of Layout.SectionColumn's in the child content of the component.
ColumnMinWidthstring?
340px
Minimum width that the column should occupy.
FooterRenderFragment?
Footer to display for the section.
FooterStylestring?
Style to apply to the footer.
FooterTextstring?
Text to display as a footer. Not shown when a Layout.Section.Footer is supplied.
HeaderRenderFragment?
Header content to display for the section.
HeaderStylestring?
Style to apply to the header.
HeaderTextstring?
Text to display as a header. Not shown when a Layout.Section.Header is supplied.
Name: BorderVisible
Type: bool
Default: False
Description: Should a border be displayed?
Name: ChildContent
Type: RenderFragment?
Description: Content of the section.
Name: ChildContentStyle
Type: string?
Description: Style to apply to the container of the child content.
Name: ColumnCount
Type: int?
Description: Optionally specify the number of columns desired for the section. The default is calculated by the actual number of Layout.SectionColumn's in the child content of the component.
Name: ColumnMinWidth
Type: string?
Default: 340px
Description: Minimum width that the column should occupy.
Name: Footer
Type: RenderFragment?
Description: Footer to display for the section.
Name: FooterStyle
Type: string?
Description: Style to apply to the footer.
Name: FooterText
Type: string?
Description: Text to display as a footer. Not shown when a Layout.Section.Footer is supplied.
Name: Header
Type: RenderFragment?
Description: Header content to display for the section.
Name: HeaderStyle
Type: string?
Description: Style to apply to the header.
Name: HeaderText
Type: string?
Description: Text to display as a header. Not shown when a Layout.Section.Header is supplied.
React
Blazor

SectionColumn Class

Parameters

Name
Type
Default
Description
BorderVisiblebool
True
Is the border visible.
ChildContentRenderFragment?
Child content for the section column
ColumnContentOrientationComponentOrientation
Vertical
Orientation of the columns.
FooterRenderFragment?
Footer to display for the section.
FooterTextstring?
Text to display as a footer. Not shown when a Layout.SectionColumn.Footer is supplied.
HeaderRenderFragment?
Header content to display for the section.
HeaderTextstring?
Text to display as a header. Not shown when a Layout.SectionColumn.Header is supplied.
HorizontalGapint?
10
Horizontal gap in pixels.
VerticalGapint?
10
Vertical gap in pixels.
Widthdouble?
Relative width of this column expressed as a weight. Widths are treated as ratios across all columns in the section, so three columns with Width='3', Width='4', Width='3' lay out as 30%, 40%, 30% (3+4+3 = 10 parts). When left null the column uses the section's equal-distribution default.
Name: BorderVisible
Type: bool
Default: True
Description: Is the border visible.
Name: ChildContent
Type: RenderFragment?
Description: Child content for the section column
Name: ColumnContentOrientation
Type: ComponentOrientation
Default: Vertical
Description: Orientation of the columns.
Name: Footer
Type: RenderFragment?
Description: Footer to display for the section.
Name: FooterText
Type: string?
Description: Text to display as a footer. Not shown when a Layout.SectionColumn.Footer is supplied.
Name: Header
Type: RenderFragment?
Description: Header content to display for the section.
Name: HeaderText
Type: string?
Description: Text to display as a header. Not shown when a Layout.SectionColumn.Header is supplied.
Name: HorizontalGap
Type: int?
Default: 10
Description: Horizontal gap in pixels.
Name: VerticalGap
Type: int?
Default: 10
Description: Vertical gap in pixels.
Name: Width
Type: double?
Description: Relative width of this column expressed as a weight. Widths are treated as ratios across all columns in the section, so three columns with Width='3', Width='4', Width='3' lay out as 30%, 40%, 30% (3+4+3 = 10 parts). When left null the column uses the section's equal-distribution default.
React