Lists & Data

Components that can be used to render a list of data from an external REST API.

List

The List component will generally be used inside of the Fetch component to display a list of entries from an API that has been connected to the Draftbit.

📘

If you're using the List component with a Fetch component, make sure you set the List component's Data property to 'array of data' in the Data Tab.

Configuration

Property

Description

Component name

To alter the name of the component. The name is reflected in the Layout tree. Defaults to List.

Horizontal

Enable so that the contents of the list display horizontally.

Number of columns

Define the number of columns the list should display.

Fetch

With the Fetch component, you're able to easily pull live data from a third party REST API directly into your apps in Draftbit.

Data

Property

Description

Service

Name of the REST API cloud service you have created inside the Draftbit app.

Endpoint

Name of the API endpoint to fetch data from.

📘

See the list of Data enabled components to use to render dynamic values from a REST API.

Adding an API to a Fetch component

You can add a new API in the Data tab on the left-hand side of the Builder and connect your API to the Fetch component in the Data Tab of the Properties Panel. Read more on the configuration options in the REST Services & Endpoints article.

Learn how to set up a Fetch component in the Fetching Data article.

Custom Code

Custom Code allows you to import packages into your Draftbit app and use these packages in screens (via functions/hooks) and components.

It's an Advanced Feature. See Custom Code docs under Project Level Settings for more information.


Did this page help you?