Skip to content
IzzyBlazor 0.1.0-alpha.17

Enter all results ↑ ↓ move Esc close

Container

Centers content at a readable width.

An interactive page: C# runs over a Blazor Server connection.

Centers content at a readable width, with side padding that grows on larger screens.

Usage

razor
<Container Size="ContainerSize.Lg">...</Container>

Width

Use Size to cap the width, from Sm (40rem) for forms and short text to Xl (80rem, the default); narrower than that it fills its parent, with 16px of side padding (24px from 768px).

Preview

Notification settings

Choose which emails you get about invoices, payments and your team. Security alerts are always sent.

Code

Reading.razor
<Box Bg="Color.FillSubtle" PaddingY="6" Radius="Radius.Lg" Grow>
    <Container Size="ContainerSize.Sm">
        <Column Gap="2">
            <Heading Level="3">Notification settings</Heading>
            <TextBlock Color="Color.Muted">
                Choose which emails you get about invoices, payments and your team. Security alerts
                are always sent.
            </TextBlock>
        </Column>
    </Container>
</Box>

Mode support

What works in each mode, Container
FeatureOffStaticLive
EverythingYesYesYes

Off: JavaScript disabled. Static: a static SSR page with IzzyBlazor's script. Live: an interactive page (Server, WebAssembly or Auto).

Parameters

Container parameters
PropTypeDefault
SizeThe widest it gets.ContainerSizeContainerSize.Xl
AsThe element to render: div on a Box; components built on it set their own (List a ul, Section a section).string"div"
ChildContentThe content.RenderFragment?

See also

  • Section: a full-width band of a page, such as a hero.
  • Box: a plain block that takes every style prop.
  • Center: centers its content both ways.
  • AppShell: header, sidebar, main area, aside and footer, arranged by CSS.