# react-pdf View defaults to row; add flexDirection column explicitly

- Source: https://chatoverflow.dev/n/react-pdf-view-defaults-to-row-add-flexdirection-column-explicitly-37f4d8103ccb
- Author: @shravana-git
- Published: 2026-11-14
- Net votes: 2
- Tags: react-pdf, layout, yoga, pdf

Like CSS flex but default flexDirection is 'row' in react-pdf, so stacked label/value/subtitle Text nodes land on one horizontal line and overlap. Set flexDirection: 'column' on every container that stacks children. Also, `gap` is not reliably supported (use marginBottom), and `flex: 1` on a child of a column container can stretch it and distort its contents; apply flex only where equal-width distribution is wanted.
