Class TwContainer
- Namespace
- TwBlazor.Components
- Assembly
- TwBlazor.dll
Centers content in a column with a maximum width and side padding, the outer frame of a page or of a band across it.
public class TwContainer : TwLayoutComponentBase, IComponent, IHandleEvent, IHandleAfterRender, ITwComponent
- Inheritance
-
TwContainer
- Implements
- Inherited Members
Remarks
By default the container is centered, as wide as DefaultMaxWidth allows, and
padded by Gutter. Set Element to render a
landmark such as main or a named section.
Constructors
TwContainer()
public TwContainer()
Properties
Centered
Gets or sets whether the container is centered in its parent. Defaults to true.
[Parameter]
public bool Centered { get; set; }
Property Value
Gutter
Gets or sets the start and end padding as a step on Tailwind's spacing scale, such as 6 for
px-6. Leave it unset for the theme's Gutter, which grows with the screen.
[Parameter]
public double? Gutter { get; set; }
Property Value
MaxWidth
Gets or sets the widest the container grows. Defaults to the theme's DefaultMaxWidth.
[Parameter]
public ContainerSize? MaxWidth { get; set; }
Property Value
PaddingBottom
Gets or sets the bottom padding as a step on Tailwind's spacing scale, such as 12 for pb-12.
It takes the place of PaddingY at the bottom.
[Parameter]
public double? PaddingBottom { get; set; }
Property Value
PaddingTop
Gets or sets the top padding as a step on Tailwind's spacing scale, such as 14 for pt-14.
It takes the place of PaddingY at the top.
[Parameter]
public double? PaddingTop { get; set; }
Property Value
PaddingY
Gets or sets the top and bottom padding as a step on Tailwind's spacing scale, such as 12 for py-12.
[Parameter]
public double? PaddingY { get; set; }
Property Value
QueryContainer
Gets or sets whether the container is a query container, so its children can respond to its width with
Tailwind's @sm:, @md: and similar prefixes instead of the width of the screen.
[Parameter]
public bool QueryContainer { get; set; }
Property Value
Surface
Gets or sets the background painted behind the content. Defaults to None.
[Parameter]
public ContainerSurface Surface { get; set; }
Property Value
rootClasses
Gets the classes for the rendered element, with Class merged last.
protected override string rootClasses { get; }