DockLayout

in namespace DotVVM.Controls.Tailwind.Controls

Renders a dock layout with start, center, and end sections.

Usage & Scenarios

Arranges content into StartContent, flexible center Content, and EndContent sections with orientation and spacing options.

Sample 1: Start, center, and end regions

Shows the three content regions. The second example omits Content, leaving a flexible spacer between the start and end sections.

<div class="space-y-4">
    <t:DockLayout>
        <StartContent>
            <div class="bg-gray-700 text-white p-2 rounded">Filters</div>
        </StartContent>
        <Content>
            <div class="bg-info-700 text-white p-2 rounded">Flexible center content</div>
        </Content>
        <EndContent>
            <div class="bg-gray-700 text-white p-2 rounded">Actions</div>
        </EndContent>
    </t:DockLayout>

    <t:DockLayout>
        <StartContent>
            <div class="bg-gray-700 text-white p-2 rounded">Previous</div>
        </StartContent>
        <EndContent>
            <div class="bg-gray-700 text-white p-2 rounded">Next</div>
        </EndContent>
    </t:DockLayout>
</div>

Sample 2: Orientation, gap, and alignment

Uses Orientation, Gap, and Alignment to change how the three regions are arranged.

<div class="space-y-4">
    <t:DockLayout Gap="Large" Alignment="Center" class="h-20 bg-gray-100 p-2">
        <StartContent><div class="bg-gray-700 text-white p-2 rounded">Start</div></StartContent>
        <Content><div class="bg-info-700 text-white p-2 rounded">Centered items</div></Content>
        <EndContent><div class="bg-gray-700 text-white p-2 rounded">End</div></EndContent>
    </t:DockLayout>

    <t:DockLayout Orientation="Vertical" Gap="Small" Alignment="Stretch">
        <StartContent><div class="bg-gray-700 text-white p-3 rounded">Header</div></StartContent>
        <Content><div class="bg-info-700 text-white p-3 rounded">Body</div></Content>
        <EndContent><div class="bg-gray-700 text-white p-3 rounded">Footer</div></EndContent>
    </t:DockLayout>
</div>

Sample 3: Justify content

Shows several Justify values. This property is most useful when you want to change how the docked regions share the available horizontal space.

<div class="space-y-3">
    <t:DockLayout Justify="Start" class="bg-gray-100 p-2">
        <StartContent><div class="bg-gray-700 text-white p-2 rounded">Start</div></StartContent>
        <Content><div class="bg-info-700 text-white p-2 rounded">Content</div></Content>
        <EndContent><div class="bg-gray-700 text-white p-2 rounded">End</div></EndContent>
    </t:DockLayout>

    <t:DockLayout Justify="Center" class="bg-gray-100 p-2">
        <StartContent><div class="bg-gray-700 text-white p-2 rounded">Start</div></StartContent>
        <Content><div class="bg-info-700 text-white p-2 rounded">Content</div></Content>
        <EndContent><div class="bg-gray-700 text-white p-2 rounded">End</div></EndContent>
    </t:DockLayout>

    <t:DockLayout Justify="SpaceBetween" class="bg-gray-100 p-2">
        <StartContent><div class="bg-gray-700 text-white p-2 rounded">Start</div></StartContent>
        <Content><div class="bg-info-700 text-white p-2 rounded">Content</div></Content>
        <EndContent><div class="bg-gray-700 text-white p-2 rounded">End</div></EndContent>
    </t:DockLayout>
</div>

Properties

Name Type Description Notes Default Value
property icon Alignment ItemAlignment Controls how items are aligned on the cross axis inside the layout.
attribute
inner element
static value
bindable
default
Default
property icon Content ITemplate Template rendered in the center section of the layout.
attribute
inner element
static value
bindable
default
null
property icon EndContent ITemplate Template rendered in the end section of the layout.
attribute
inner element
static value
bindable
default
null
property icon Gap GapSize Controls the spacing between the rendered sections.
attribute
inner element
static value
bindable
default
Default
property icon Justify JustifyContent Controls how the start, center, and end sections are distributed on the main axis.
attribute
inner element
static value
bindable
default
Default
property icon Orientation Orientation Controls whether the sections are arranged horizontally or vertically.
attribute
inner element
static value
bindable
default
Horizontal
property icon StartContent ITemplate Template rendered in the start section of the layout.
attribute
inner element
static value
bindable
default
null
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