Skip to content

Latest commit

 

History

History
69 lines (43 loc) · 2.12 KB

inline.mdx

File metadata and controls

69 lines (43 loc) · 2.12 KB

import { Property } from '@grapp/nextra-theme' import { Callout } from "nextra/components";

import { Example, getExamples } from '../../../components/Example'

export const getStaticProps = () => { return getExamples(['inline/space', 'inline/align-y', 'inline/align-x']); }

Inline

The Inline component arranges its children horizontally, allowing you to display multiple items side by side. If the children exceed the available space, the component wraps them to the next line, with equal spacing between children.

The alignX prop can be used to align children horizontally.

The alignY prop enables you to vertically align children of varying heights vertically, ensuring they are all at the same level.

The collapseBelow prop allows you to collapse all items into a single vertical stack, ensuring that your content remains accessible, even on smaller screens.

Props

The Inline component is created using the Box component. It extends all the props* supported by Box, as well as React Native View, and the props mentioned below.

Unavailable `Box` props:: `gap`, `rowGap`, `columnGap`, `direction`, `wrap`

space

<Property types={['ResponsiveProp']}> Sets the space between children.

spaceX 🚀

<Property types={['ResponsiveProp']}> Sets the horizontal space between children.

spaceY

<Property types={['ResponsiveProp']}> Sets the vertical space between children.

alignX

<Property types={["ResponsiveProp<AxisX | Space>"]}> Aligns children horizontally.

alignY

<Property types={["ResponsiveProp"]}> Aligns children vertically.

collapseBelow

<Property types={['Breakpoint']}> Stacks children vertically when the current breakpoint is smaller than the provided breakpoint.