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    

Container

A container is a basic UI component similar to a view, however, it can be styled and customized.

If you are using a Background image, make sure the Image file name begins with a letter, not a number!

Configuration

Parameter
Description

Elevation

A number between 0 and 3 that controls the intensity of the drop shadow on the container.

Background color

Select a background color for the container.

Background image

Set an image as the background of the container.

Border Radius

Apply a border radius to round the corners of the container.

Use gutter padding

Apply gutter padding (configurable in the theme's Spacing menu) to the right and left sides of the container. The default setting is 16.

Background image resize mode

Set how to resize the container's background image when the image dimensions set in the builder don't match the actual dimensions of the image.

Background image resize mode

Parameter
Description

Cover

The image is resized to fill the container will retaining its proportions, even if the container is larger than the dimensions of the image.

Contain

The image is resized so that the picture fits within the container and is fully visible, even if that means the image will not fill the entire container.

Stretch

The image is resized to fill the container and display the entire image. To ensure the image is fully visible, the image will not always stretch proportionally and may appear distorted.

Repeat

If the container is larger than the image, multiple instances of the image will render to fill up the container.

Center

Adjusts the image so that the center of the image is visible regardless of the size of the container.

Container


A container is a basic UI component similar to a view, however, it can be styled and customized.

Suggested Edits are limited on API Reference Pages

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