Container

in namespace DotVVM.Bootstrap5.Controls

Renders a Boostrap container.

Usage & Scenarios

Renders a Bootstrap container component.

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

Sample 1: Normal vs Fluid Container

The Type property specifies the behavior of the Container for wide pages.

There can by Small, Medium, Large, XLarge, XXLarge types, which set size by windows size and Fluid type always utilizes the available horizontal space. To see specific windows sizes check Bootstrap Container documentation for more details.

<bs:Container Type="Fluid">
  <p>
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam quis nulla. Aenean vel massa quis mauris vehicula lacinia. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Aliquam erat volutpat. Fusce dui leo, imperdiet in, aliquam sit amet, feugiat eu, orci. In rutrum. Maecenas sollicitudin. Mauris suscipit, ligula sit amet pharetra semper, nibh ante cursus purus, vel sagittis velit mauris vel metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per
  </p>
</bs:Container>

<bs:Container Type="Small">
  <p>
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam quis nulla. Aenean vel massa quis mauris vehicula lacinia. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Aliquam erat volutpat. Fusce dui leo, imperdiet in, aliquam sit amet, feugiat eu, orci. In rutrum. Maecenas sollicitudin. Mauris suscipit, ligula sit amet pharetra semper, nibh ante cursus purus, vel sagittis velit mauris vel metus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per
  </p>
</bs:Container>

Sample 2: Inner Elements

Container can contains any other element.

    <h4>Container with TextBox</h4>
    <bs:Container>
        <bs:TextBox Text="Some text"/>
    </bs:Container>

    <h24>Container with h2</h24>
    <bs:Container>
        <h2>Container with h2</h2>
    </bs:Container>

    <h4>Container with Spinner</h4>
    <bs:Container>
        <bs:Spinner></bs:Spinner>
    </bs:Container>

    <h4>Container with Progress</h4>
    <bs:Container>
        <bs:ProgressBar Value="100">
            100% completed...
        </bs:ProgressBar>
    </bs:Container>

    <h4>Container with Badge</h4>
    <bs:Container>
        <bs:Badge Text="100" ID="badge-text" />
    </bs:Container>

Properties

Name Type Description Notes Default Value
property icon Type ContainerResponsiveBreakpoints Gets or sets the type of the container. Fluid type utilizes the available horizontal space. Small, Medium, Large, XLarge, XXLarge types utilize the available space according to corresponding Bootstrap screen size.
attribute
inner element
static value
bindable
default
Default

HTML produced by the control