The Draftbit Developer Hub

Welcome to the Draftbit developer hub. You'll find comprehensive guides and documentation to help you start working with Draftbit as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Layout

With Flexbox, you can specify the layout of an element and its children to provide a consistent layout on different screen sizes.

Flex Items

  • Flex Direction
    Setting the Flex Direction establishes the main axis and direction that child elements are placed along in the layout.

  • Align Items
    Setting align items determines how child elements are spread across the the remaining space of the cross axis (the opposite of the axis set in Flex Direction) they lie on.

  • Justify Content
    The Justify Content property determines how children elements are spread across the the remaining space of the axis they lie on.

Selected Item

  • Align Self
    Align Self shares the same positioning behavior as align items, however, it is set on each individual child element and overrides the settings applied to the parent element in Align Items.

  • Flex Grow
    The Flex Grow property describes how a child element will automatically resize itself in relation to other child elements within a parent element.

  • Flex Shrink
    Flex Shrink is generally used in tangent with Flex Grow and determines the behavior of children elements once they exceed the size of the container.

Content

  • Flex Wrap
    The Flex Wrap property is set on a container and determines how child elements will be laid out if they exceed the maximum dimensions of the the container.

  • Align Content
    Setting the Align Content property determines how the lines of elements are positioned on the cross-axis (the axis opposite of the main axis defined in Flex Direction).

Resources

React Native Docs - Layout Props

Updated about a month ago

Layout


With Flexbox, you can specify the layout of an element and its children to provide a consistent layout on different screen sizes.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.