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><Section>
<SectionColumn HeaderText="Contact Info">
<TextEdit ColumnName="firstname" />
<TextEdit ColumnName="lastname" />
</SectionColumn>
<SectionColumn HeaderText="Account Info">
<TextEdit ColumnName="name" />
</SectionColumn>
</Section>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><!-- Explicit 3-column layout -->
<Section ColumnCount="3">
<SectionColumn>Column 1</SectionColumn>
<SectionColumn>Column 2</SectionColumn>
<SectionColumn>Column 3</SectionColumn>
</Section>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><Section ColumnMinWidth="200px">
<SectionColumn>Narrow column 1</SectionColumn>
<SectionColumn>Narrow column 2</SectionColumn>
<SectionColumn>Narrow column 3</SectionColumn>
<SectionColumn>Narrow column 4</SectionColumn>
</Section>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><!-- 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>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><Section HeaderText="Account Details" FooterText="Last updated: today">
<SectionColumn HeaderText="General">
<TextEdit ColumnName="name" />
</SectionColumn>
<SectionColumn HeaderText="Address">
<TextEdit ColumnName="address1_city" />
</SectionColumn>
</Section>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>
<SectionColumn borderVisible>Bordered column</SectionColumn>
<SectionColumn borderVisible={false}>No border on this column</SectionColumn>
</Section><Section BorderVisible="true">
<SectionColumn BorderVisible="true">
Bordered column
</SectionColumn>
<SectionColumn BorderVisible="false">
No border on this column
</SectionColumn>
</Section>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.
import { SectionColumnOrientation } from '@powerportalspro/react-fluent';
<Section>
<SectionColumn
columnContentOrientation={SectionColumnOrientation.Horizontal}
horizontalGap={20}
verticalGap={10}
>
<TextEdit columnName="firstname" />
<TextEdit columnName="lastname" />
</SectionColumn>
</Section><Section>
<SectionColumn ColumnContentOrientation="ComponentOrientation.Horizontal"
HorizontalGap="20"
VerticalGap="10">
<TextEdit ColumnName="firstname" />
<TextEdit ColumnName="lastname" />
</SectionColumn>
</Section>A Section with four columns that wraps responsively.
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.
Use the controls below to explore borders, headers, and footers on both Section and SectionColumn.
Name | Type | Default | Description |
|---|---|---|---|
BorderVisible | bool | False | Should a border be displayed? |
ChildContent | RenderFragment? | Content of the section. | |
ChildContentStyle | string? | Style to apply to the container of the child content. | |
ColumnCount | int? | 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. | |
ColumnMinWidth | string? | 340px | Minimum width that the column should occupy. |
Footer | RenderFragment? | Footer to display for the section. | |
FooterStyle | string? | Style to apply to the footer. | |
FooterText | string? | Text to display as a footer. Not shown when a Layout.Section.Footer is supplied. | |
Header | RenderFragment? | Header content to display for the section. | |
HeaderStyle | string? | Style to apply to the header. | |
HeaderText | string? | Text to display as a header. Not shown when a Layout.Section.Header is supplied. |
BorderVisibleChildContentChildContentStyleColumnCountLayout.SectionColumn's in the child content of the component.ColumnMinWidthFooterFooterStyleFooterTextLayout.Section.Footer is supplied.HeaderHeaderStyleHeaderTextLayout.Section.Header is supplied.Name | Type | Default | Description |
|---|---|---|---|
BorderVisible | bool | True | Is the border visible. |
ChildContent | RenderFragment? | Child content for the section column | |
ColumnContentOrientation | ComponentOrientation | Vertical | Orientation of the columns. |
Footer | RenderFragment? | Footer to display for the section. | |
FooterText | string? | Text to display as a footer. Not shown when a Layout.SectionColumn.Footer is supplied. | |
Header | RenderFragment? | Header content to display for the section. | |
HeaderText | string? | Text to display as a header. Not shown when a Layout.SectionColumn.Header is supplied. | |
HorizontalGap | int? | 10 | Horizontal gap in pixels. |
VerticalGap | int? | 10 | Vertical gap in pixels. |
Width | double? | Relative width of this column expressed as a weight. Widths are treated as ratios across all columns in the section, so three columns with |
BorderVisibleChildContentColumnContentOrientationFooterFooterTextLayout.SectionColumn.Footer is supplied.HeaderHeaderTextLayout.SectionColumn.Header is supplied.HorizontalGapVerticalGapWidth