Column

in namespace DotVVM.Bootstrap5.Controls

Renders a Bootstrap responsive column.

Usage & Scenarios

Renders a Bootstrap column. This control should be a direct child of Row control.

https://getbootstrap.com/docs/5.2/layout/grid/

Sample 1: Column Sizes

You can specify the size of the column in the Bootstrap grid units (12 units per row by default) using the SizeAll property.

To override the value for particular screen sizes, use the SizeSmall, SizeMedium, SizeLarge, SizeXLarge and SizeXLarge properties.

If you want to use natural width of column content, than use value auto for Size property.

If you don't specify the size of the column, Bootstrap will distribute the space equally.

See Bootstrap Grid documentation for more details.

<bs:Column SizeAll="5">
            Size 5
</bs:Column>
<bs:Column SizeSmall="5">
    SizeSM 5
</bs:Column>
<bs:Column SizeMedium="5">
    SizeMD 5
</bs:Column>
<bs:Column SizeLarge="5">
    SizeLG 5
</bs:Column>
<bs:Column SizeXLarge="5">
    SizeXL 5
</bs:Column>
<bs:Column SizeXXLarge="5">
    SizeXXL 5
</bs:Column>
<bs:Column SizeAll="auto">
    Size auto
</bs:Column>

Sample 2: Column Offsets

To shift the column to the right, use the OffsetAll property - it specifies the number of columns to be skipped.

To override the value for a particular screen size, use OffsetSmall, OffsetMedium, OffsetLarge, OffsetXLarge and OffsetXXLarge properties.

<bs:Column OffsetAll="5">
    Offset 5
</bs:Column>
<bs:Column OffsetSmall="5">
    OffsetSM 5
</bs:Column>
<bs:Column OffsetMedium="5">
    OffsetMD 5
</bs:Column>
<bs:Column OffsetLarge="5">
    OffsetLG 5
</bs:Column>
<bs:Column OffsetXLarge="5">
    OffsetXL 5
</bs:Column>
<bs:Column OffsetXXLarge="5">
    OffsetXXL 5
</bs:Column>

Sample 3: Column Ordering

To specify explicit column order, use the OrderAll property.

To override the value for a particular screen size, use OrderSmall, OrderMedium, OrderLarge, OrderXLarge and OrderXXLarge properties.

Includes support for 1 through 5 across all six screen sizes. There are also responsive first and last values that set position of column to first or last position.

<bs:Row>
    <bs:Column Flex.OrderAll="5">
        Order 5
    </bs:Column>
    <bs:Column Flex.OrderSmall="5">
        OrderSM 5
    </bs:Column>
    <bs:Column Flex.OrderMedium="5">
        OrderMD 5
    </bs:Column>
    <bs:Column Flex.OrderLarge="5">
        OrderLG 5
    </bs:Column>
    <bs:Column Flex.OrderXLarge="5">
        OrderXL 5
    </bs:Column>
    <bs:Column Flex.OrderXXLarge="5">
        OrderXXL 5
    </bs:Column>
    <bs:Column Flex.OrderAll="last">
        Order Last
    </bs:Column>
    <bs:Column Flex.OrderAll="first">
        Order First
    </bs:Column>
</bs:row>

Sample 4: Vertical Alignment

The VerticalAlignment property to align the column vertically within the row.

  • None aligns the columns by default.
  • Start aligns the columns to the top.
  • Center aligns the columns to the middle.
  • End aligns the columns to the bottom.
<bs:Row Flex.AlignItemsAll="Center" style="height:75px;border-style:solid">
    <bs:Column>
        some normal text
    </bs:Column>
    <bs:Column>
        some very cool text
    </bs:Column>
</bs:Row>
<bs:Row Flex.AlignItemsAll="End" style="height:75px;border-style:solid">
    <bs:Column>
        some normal text
    </bs:Column>
    <bs:Column>
        some very cool text
    </bs:Column>
</bs:Row>

Properties

Name Type Description Notes Default Value
property icon Content List<DotvvmControl> Gets or sets the content placed inside the control.
attribute
inner element
static value
bindable
default
null
property icon OffsetAll String Gets or sets the row offset CSS class for all screens.
attribute
inner element
static value
bindable
default
null
property icon OffsetLarge String Gets or sets the row offset CSS class for a large screen.
attribute
inner element
static value
bindable
default
null
property icon OffsetMedium String Gets or sets the row offset CSS class for a medium screen.
attribute
inner element
static value
bindable
default
null
property icon OffsetSmall String Gets or sets the row offset CSS class for a small screen.
attribute
inner element
static value
bindable
default
null
property icon OffsetXLarge String Gets or sets the row offset CSS class for a very large screen.
attribute
inner element
static value
bindable
default
null
property icon OffsetXXLarge String Gets or sets the row offset CSS class for the largest screen.
attribute
inner element
static value
bindable
default
null
property icon SizeAll String Gets or sets the row size CSS class for all screens.
attribute
inner element
static value
bindable
default
null
property icon SizeLarge String Gets or sets the row size CSS class for a large screen.
attribute
inner element
static value
bindable
default
null
property icon SizeMedium String Gets or sets the row size CSS class for a medium screen.
attribute
inner element
static value
bindable
default
null
property icon SizeSmall String Gets or sets the row size CSS class for a small screen.
attribute
inner element
static value
bindable
default
null
property icon SizeXLarge String Gets or sets the row size CSS class for a very large screen.
attribute
inner element
static value
bindable
default
null
property icon SizeXXLarge String Gets or sets the row size CSS class for the largest screen.
attribute
inner element
static value
bindable
default
null
property icon Text String Gets or sets the text inside the control.
attribute
inner element
static value
bindable
default
null
property icon VerticalAlignment VerticalAlignment Gets or sets the vertical alignment CSS class. Possible values are Start (align-self-start), Center (align-self -center), End (align-self-end).
attribute
inner element
static value
bindable
default
None
property icon Visible Boolean Gets or sets whether the control is visible. When set to false, `style="display: none"` will be added to this control.
attribute
inner element
static value
bindable
default
True

HTML produced by the control