LogoLogo
  • A better way to do...stuff!
  • How we build the app
    • Overview
  • Documentation
    • Draftbit
      • Using Live Preview
      • Workspaces and Billing
      • Introduction to the Builder
      • Layout
      • Intro to Navigation
      • Fetching Data
      • Direct Integrations
      • FAQs
      • Draftbit
      • Draftbit
      • Custom Blocks
      • Borders, Background, and Elevation
      • Actions
      • Custom Screen Code
      • Exporting and Publishing Your Project
      • Sharing Your Project Online
      • Publishing Your App as a PWA
      • Stack Navigator
      • Tab Navigator
      • Draftbit
      • Draftbit
      • Basic
      • Media
      • REST Services & Endpoints
      • REST API Integrations
      • Themes & Styling
      • Submitting Data
      • Draftbit
      • Draftbit
    • Xano
      • resources-and-tips-1
        • 🎞️ Xano Video Tutorials
        • 🤝Community Corner
        • 💰Share Xano. Make money
      • FAQ
      • getting-started
        • ⚡ Jumpstart
        • 🎞️ The Xano Interface
      • instances
        • What is an Instance?
        • Early Access Instance
        • Upgrading an Instance
        • Sharing
        • Bandwidth Usage
        • API Rate Limit
      • What is a Workspace?
      • Dashboard
      • Database
      • Airtable Import
      • API
      • Library
      • Marketplace
      • Settings
      • authentication
        • Authentication
        • Sign-up & Log in
      • data-manipulation
        • The Function Stack
        • Addons (GraphQL-Like)
        • The Expression Builder
        • External Query Manipulation
        • Timestamp
        • Filters
        • Images
    • Expo
      • Creating your first build - Expo Documentation
    • Kommunicate
      • Installation
      • Installation
      • Installation
      • Installation
      • Installation
      • Flutter Installation
      • Installation
      • Zapier Integration
      • Authentication
      • CMS Installation
      • Authentication
      • Conversation
      • Conversation Assignment
      • Customization
      • Localization
      • Logout
      • Web Troubleshooting
      • Installation
      • Authentication
      • Push Notification
      • Conversation
      • Customization
      • Localization
      • Logout
      • Installation
      • Authentication
      • Push Notification
      • Conversation
      • Customization
    • Formito
      • basics
        • Getting Started
        • Variables
        • Are you GDPR ready?
        • How to prefill the values of my chatbot?
      • connect
        • How to connect Formito to Zapier?
      • convert
        • How to convert old formito chatbots to the new version?
        • How to convert Google Forms into a chatbot?
        • How to convert a Monday.com board to a chatbot?
        • How to create chatbot from QuickBase table?
      • guide
        • How to add my chatbot to WordPress?
        • How to create a chatbot for Zendesk?
      • shopify
        • How to embed my chatbot into a Shopify page?
        • How to display Formito chatbot on bottom corner of my Shopify store?
        • How to open my chatbot after clicking on links or buttons?
    • Stonly
  • Flex Stuff
    • App
    • APIs
    • Database
    • Website
    • Design
    • Style Guide
  • Content
    • Guides
    • ChatBots
    • Blogs
    • Whitepapers
  • Company
    • About us
    • Brand
    • Roadmap
    • Policies
  • Flex Together
    • Overview
    • Fair Finance
Powered by GitBook
On this page

Was this helpful?

  1. Documentation
  2. Draftbit

Layout

PreviousIntroduction to the BuilderNextIntro to Navigation

Last updated 4 years ago

Was this helpful?

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

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

Parameter

Description

Row

Places child elements horizontally.

Column

Places child elements vertically.

Row Reverse

Places child elements horizontally and additionally reverses the order that the elements are displayed.

Column Reverse

Places child elements vertically and additionally reverses the order that elements are displayed.

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

Parameter

Description

Flex Start

Child elements are positioned at the beginning of the container.

Flex End

Child elements are positioned at the end of the container.

Center

Child elements are positioned in the center of the container.

Stretch

Child elements will stretch to fill the container.

Baseline

Child elements are positioned so that their baselines are lined up with each other.

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

Parameter

Description

Flex Start

Child elements are grouped together and positioned at the beginning of the line.

Flex End

Child elements are grouped together and positioned at the end of the line.

Center

Child elements are grouped together and centered in the middle of the line.

Space Between

The first child element is positioned at the beginning, the last child element is positioned at the end and all remaining child elements are spread out evenly in between.

Space Around

Child elements are spread out across the line with equal amounts of space surrounding them.

Space Evenly

Items are distributed so that the spacing between any two adjacent alignment subjects, before the first alignment subject, and after the last alignment subject is the same.

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.

Parameter

Description

Flex Start

The child element will be positioned at the beginning of the container.

Flex End

The child element will be positioned at the end of the container.

Center

The child element will be positioned in the center of the container.

Baseline

The child element will stretch to fill the container.

Stretch

The child element will stretch to fill the container.

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

Flex grow can be set to any number greater than 0.

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. Just like Flex Grow, Flex Shrink sets a relative value on the children elements. Setting an element's Flex Shrink to 0 prevents the element from shrinking at all and will retain its original size calculated from the Flex Grow setting or from the set width and height.

Flex Shrink can be set to any number greater than 0, with 1 being the default value.

Flex basis is an axis-independent way of providing the default size of an item along the main axis. Setting the flex basis of a child is similar to setting the width of that child if its parent is a container with flex direction: row or setting the height of a child if its parent is a container with flex direction: column. The flex basis of an item is the default size of that item, the size of the item before any flex grow and flex shrink calculations are performed.

Flex Shrink can be set to any number greater than 0, with 1 being the default value.

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 container.

Parameter

Description

None

Forces all of the child elements onto one line and which has the potential to force shrink the elements in order to make them fit on the same line.

Wrap

The child elements will be placed along multiple lines, as needed, allowing them to retain their intended sizes.

Reverse

The same as Wrap, however the order of the child elements is reversed.

Align Content is only applicable when children elements are in a container that is set to flex wrap and there are multiple lines of children elements. 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).

Parameter

Description

Flex Start

Lines are grouped together and positioned at the beginning of the cross axis.

Flex End

Lines are grouped together and positioned at the end of the cross axis.

Stretch

Lines are stretched to the height of the container's cross axis.

Center

Lines are grouped together and positioned in the center of the container's cross axis.

Space Between

The first line is positioned at the beginning of the cross axis, the last element is positioned at the end of the cross axis, and all remaining lines are spread out evenly in between.

Space Around

All the lines are spread out across the cross axis of the container with equal amounts of space surrounding them.

Updated about a month ago

Yoga Docs
React Native Docs
CSS Tricks
Yoga Docs
React Native Docs
CSS Tricks
Yoga Docs
Yoga Docs
Yoga Documentation
Yoga Docs
Yoga Docs
CSS Tricks
Table of Contents
Flex Items
Flex Direction
Align Items
Justify Content
Selected Item
Align Self
Flex Grow
Flex Shrink
Flex Basis
Content
Flex Wrap
Align Content
Yoga Docs
React Native Docs
CSS Tricks
Yoga Docs
React Native Docs
CSS Tricks