Skip to content
THE COMPONENT LIBRARY
Skip to content

Component reference

Flex

A flexible toolbar that adapts to available space.

Preview

Live preview

Changes apply to this preview only.

Toolbar

The actions stay on the right at every width.

Projects

Media object

A fixed thumbnail next to fluid text.

Pimolu Studio headphones with the p emblem
Pimolu StudioLightweight sneaker for everyday runs. The text takes the remaining width and wraps instead of pushing the image.
In stock€129

Split layout

Two equal panes with a token gap.

Primary pane: grows from a zero basis, so both sides stay equal.

Secondary pane: same rule, same width.

Width adapts to the available space

More examples

Different configurations and compositions using the real Pimolu API. Each preview runs independently and follows the site appearance.

Direction

row (default), row-reverse, column and column-reverse.

Open preview

Alignment

align-items on the cross axis.

Open preview

Justification

justify-content on the main axis, from start to space-evenly.

Open preview

Usage

Use wrapping rather than squeezing labels or clipping actions.

API reference

Generated from the public TypeScript declarations. Native HTML attributes are inherited where the component extends them; this reference includes Pimolu props and selected common native attributes.

PimoluFlexProps

Type source
PimoluFlexProps public API
NameTypeDefaultDescription
asElementType | undefined`div`Element rendered by the flex container. Defaults to `div`.
directionPimoluFlexDirection | undefined`row`Main axis. Defaults to `row`.
alignPimoluFlexAlign | undefined—Cross-axis alignment.
justifyPimoluFlexJustify | undefined—Main-axis distribution.
wrapboolean | undefinedfalseAllow children to wrap onto several lines.
gapPimoluFlexSpace | undefined`0`Gap between children. Defaults to `0`.
grownumber | undefined—`flex-grow` of the container inside its own parent.
shrinknumber | undefined—`flex-shrink` of the container inside its own parent.
basisstring | number | undefined—`flex-basis` of the container; numbers are pixels.
fullWidthboolean | undefinedfalseFill the available inline size.
defaultValuestring | number | readonly string[] | undefined—Standard React/HTML attribute.
classNamestring | undefined—Standard React/HTML attribute.
styleCSSProperties | undefined—Standard React/HTML attribute.
aria-labelstring | undefined—Defines a string value that labels the current element.
childrenReactNode—Standard React/HTML attribute.
onChangeChangeEventHandler<HTMLElement, Element> | undefined—Standard React/HTML attribute.
onClickMouseEventHandler<HTMLElement> | undefined—Standard React/HTML attribute.
as

ElementType | undefined

Default: `div`

Element rendered by the flex container. Defaults to `div`.

direction

PimoluFlexDirection | undefined

Default: `row`

Main axis. Defaults to `row`.

align

PimoluFlexAlign | undefined

No default extracted.

Cross-axis alignment.

justify

PimoluFlexJustify | undefined

No default extracted.

Main-axis distribution.

wrap

boolean | undefined

Default: false

Allow children to wrap onto several lines.

gap

PimoluFlexSpace | undefined

Default: `0`

Gap between children. Defaults to `0`.

grow

number | undefined

No default extracted.

`flex-grow` of the container inside its own parent.

shrink

number | undefined

No default extracted.

`flex-shrink` of the container inside its own parent.

basis

string | number | undefined

No default extracted.

`flex-basis` of the container; numbers are pixels.

fullWidth

boolean | undefined

Default: false

Fill the available inline size.

defaultValue

string | number | readonly string[] | undefined

No default extracted.

Standard React/HTML attribute.

className

string | undefined

No default extracted.

Standard React/HTML attribute.

style

CSSProperties | undefined

No default extracted.

Standard React/HTML attribute.

aria-label

string | undefined

No default extracted.

Defines a string value that labels the current element.

children

ReactNode

No default extracted.

Standard React/HTML attribute.

onChange

ChangeEventHandler<HTMLElement, Element> | undefined

No default extracted.

Standard React/HTML attribute.

onClick

MouseEventHandler<HTMLElement> | undefined

No default extracted.

Standard React/HTML attribute.

Accessibility

  • Keep source order logical and verify all controls remain reachable at narrow widths.
Read the accessibility guide →