Skip to content

Row

One of the three layout components in Graffiti, along with Container and Column. Used to help you position items along the horizontal axis.

See all the examples and details in the Storybook.

Usage

tsx
import { Row, Heading, Text } from "@samgl/graffiti-ui";

const MyRow = () => {
  return (
    <Row>
      <Heading $level={2}>Some content inside a row</Heading>
      <Text>
        <p>
          Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean a
          finibus sem, sed imperdiet nibh. Duis nec lorem ipsum. Nulla sagittis
          mi at libero pretium volutpat.
        </p>
      </Text>
    </Row>
  );
};

Props

PropTypeDefaultOptionalDescription
childrenReactNodeThe content of the Row.
$widthstringThe width of the Row.
$heightstringThe height of the Row.
$flexGrownumberThe flex grow factor of the Row.
$gapstringThe gap between the items in the row.
$justifyContentstringThe justify content of the Row.
$alignItemsstringThe align items of the Row.
classNamestringThe class name of the component, generally used when extending the component with a styled component.