Flex

Class
Namespace: RazorConsole.Components
Assembly: RazorConsole.Core

Definition

public class Flex : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender

Constructors

1
NameTypeDescription
Flex()Constructor—

Properties

13
NameTypeDescription
Appearance
ClassStringCSS class emitted for translator compatibility. Default is flex.
FillHeightBooleanWhether the flex container should fill the height offered by its parent.
FillWidthBooleanWhether the flex container should fill the width offered by its parent.
HeightNullable<Int32>Explicit height in terminal rows.
WidthNullable<Int32>Explicit width in terminal cells.
Common
ChildContentRenderFragmentLays out child content along a row or column axis.
Other
AdditionalAttributesIReadOnlyDictionary<String, Object>Additional attributes applied to the emitted flex element.
AlignFlexAlignHow items are aligned along the cross axis. Default is Start.
DirectionFlexDirectionThe main axis direction. Default is Row.
ExpandBooleanWhether the flex container should expand along its main axis. Prefer FillWidth and FillHeight for new code.
GapInt32Spacing between items along the main axis.
JustifyFlexJustifyHow free space is distributed along the main axis. Default is Start.
WrapFlexWrapWhether flex items can wrap. Default is NoWrap.

Methods

1
NameTypeDescription
BuildRenderTree(RenderTreeBuilder)()MethodRenders the component to the supplied RenderTreeBuilder.