Skip to content
daisyBlazor

Stack

A flex container with direction, gap, wrapping and alignment as parameters, so you rarely hand-write flex utilities. Column by default; drops in for MudStack.
Cover · <Stack>

Examples

Direction

Children stack in a column by default; Row lays them out horizontally.

Column (default)

Dev Staging Production

Row="true"

Dev Staging Production
website/Examples/Layout/StackDirectionExample.razor Source

Justify

Justify distributes children along the main axis.

Justify.FlexStart

Justify.Center

Justify.SpaceBetween

Justify.SpaceEvenly

website/Examples/Layout/StackJustifyExample.razor Source

Wrap

Wrap lets a row break onto several lines instead of overflowing.

BillingOnboardingAPIMobileSecurityPerformanceDashboardIntegrationsDocsBug
website/Examples/Layout/StackWrapExample.razor Source

API

<Stack>

DaisyBlazor

Parameters

  • AlignItems AlignItems?
    = null

    Cross-axis alignment of items (align-items); unset by default.

  • Justify Justify?
    = null

    Main-axis distribution of items (justify-content); unset by default.

  • Row bool
    = false

    When true lays items out horizontally (flex-row); vertical (flex-col) by default.

  • Spacing int
    = 4

    Gap between items as a Tailwind gap-{n} step. Defaults to 4.

  • Wrap bool
    = false

    When true lets items wrap onto multiple lines (flex-wrap).

  • Class string
    = null

    Extra CSS classes merged onto the root element.

  • Style string
    = null

    Inline CSS styles applied to the root element.

Content

  • ChildContent RenderFragment

    The items laid out in the flex container.

From MudStack

Stack keeps MudStack's parameter names, so most markup moves over by dropping the Mud prefix. See the migration guide for the shared enums, icons and services.

<MudStack> <Stack>
Something went wrong while running the docs. Reload