Skip to main content

Flex

Example

import { components } from "replugged";
const { Flex } = components;

<Flex direction={Flex.Direction.VERTICAL}>{/* Your components here */}</Flex>;

Subcomponents

ComponentDescription
Flex.ChildFlex child, useful together with Flex

Enums

EnumDescription
Flex.AlignFlexbox alignments
START | END | CENTER | STRETCH | BASELINE
Flex.DirectionFlexbox directions
VERTICAL | HORIZONTAL | HORIZONTAL_REVERSE
Flex.JustifyFlexbox justifies
START | END | CENTER | BETWEEN | AROUND
Flex.WrapFlexbox wraps
NO_WRAP | WRAP | WRAP_REVERSE

Props

info

The props of this component extend the attributes of the div element.

NameTypeDefaultDescription
alignFlex.AlignFlex.Align.STRETCHFlexbox align
basisstringautoFlexbox basis
directionFlex.DirectionFlex.Direction.HORIZONTALFlexbox direction
grownumber1Flexbox grow
justifyFlex.JustifyFlex.Justify.STARTFlexbox justify
shrinknumber1Flexbox shrink
wrapFlex.WrapFlex.Wrap.NO_WRAPFlexbox wrap

Types

Flex.Child

Props:

info

The props of this component extend the attributes of the div element.

NameTypeDefaultDescription
basisstringautoFlexbox basis
grownumber1Flexbox grow
shrinknumber1Flexbox shrink
wrapbooleanfalseWhether to wrap its children