Skip to main content

The component library

The component library is a set of pre-built UI components you can drag onto a page. Learn how to open it, build a responsive landing page, and connect signup and login workflows.

Written by Sofia Maconi

The component library is a collection of pre-built UI components you can drag and drop onto your page to build interfaces faster. These components are fully responsive (see Key terms) and made up of containers (see Key terms), visual elements (see Key terms), and form inputs (see Key terms) that you can customize individually once you've added them to your page. Each component works as an independent unit, but you can connect them to each other, or to other parts of your app, with workflows (see Key terms) and data.

This article shows you how to use these components to build a landing page in seconds, and how to wire up the signup and login forms for full user authentication.

Accessing the component library

To access the component library, click the component icon in the top-right corner of the Design tab.

The component icon highlighted at the right end of the Bubble editor's top bar.

Click the component icon in the editor's top bar to open the component library.

The component library opens on the right side of the editor:

The component library panel open on the right side of the editor, listing page layout components with a note that some components require plugins.

The component library groups components by category. Some components need plugins before you can use them.

Build with components

The UI components in the component library let you build a fully responsive and customizable app in seconds.

1. Set the page layout to column

In the page's element property editor, set Container layout to Column. This makes your components stack vertically as you add them, and lets the content resize as the screen width changes.

The Layout section of the element property editor with the Column container layout selected.

Set the page's container layout to Column so components stack vertically.

2. Add components to the page

Drag any number of components onto your page, one below the other. As you drop a component, a blue indicator on the canvas shows you where it'll land.

Components can be added within other groups, so make sure the blue indicator sits at the very bottom of the last container before you drop a new one.

Once you've added your components, you'll have a fully responsive landing page ready to customize.

Customize your components

With the skeleton of your landing page in place, you can customize each element to your liking. Select any text box or button to update its appearance, or select an image to replace it with one of your own.

As you add more pages to your app, update the placeholder links on your page to point to those pages. Do this by adding a Go to page workflow action that runs when the link is clicked.

To change the overall look and feel of your landing page, customize the font and color variables in the Style variables subtab of the Styles tab. Since every element's font and color is connected to a style variable, any change you make at the style variable level cascades through your app automatically. Adjust these variables so your landing page matches your brand.

Add workflows for user authentication

User authentication is the foundation of almost every web app. Using the header and signup and login components, you can set up a fully functional signup and login flow in a handful of clicks.

Once you've added the header and signup and login components to your page, connect the signup and login buttons in the header so they open the signup and login popup or page, depending on which component you selected. Most of the workflows are already set up to help you get started.

1. Connect the signup and login buttons

Open the Workflow tab for the page that contains the signup and login component. You'll see two workflows, both titled When an element is clicked. The first controls the signup form, and the second controls the login form.

In the first workflow event, change the element to Button signup (Header) to connect it to the workflow that opens the signup form. In the second workflow event, change the element to Button login (Header) to connect it to the workflow that opens the login form.

2. Set up the signup workflow

From the signup button in the signup form, start a workflow and add the Sign the user up action. Map the email input's value and the password input's value to the action's parameters, so it can register both fields.

3. Capture the user's name on signup

On the Data tab, select the User data type and add a new field of type text called Name. Back in the signup workflow, add a new action after Sign the user up called Make changes to Current User. Map the Name parameter to the Input Name's value, so the user you just signed up gets updated with the name they entered.

As you keep building your app, you can add more workflows here, like navigating the user to a specific page after signup, or any other logic your app needs.

4. Set up the login workflow

From the login button, start a workflow and add the Log the user in action. As with signup, map the email and password input values from the login form to the Email and Password parameters.

You can add more logic here depending on what should happen after a user logs in.

Your landing page is now connected to a full user authentication workflow.

Key terms

Responsive: Responsive design is a method that gives your users a great experience no matter what device they use to access your app. The goal of responsive design is to create a single page that automatically adjusts its layout and content to fit the screen size and resolution of the device being used to access it.

Article series: Responsive design

Containers: Containers are used to contain elements and control how they behave on the page. Bubble has six container types that behave in different ways.

Visual elements: Visual elements are elements you can place on a page that can't contain other elements (like groups) and can't accept input (like input elements), such as text, images, and icons.

Form inputs: Input forms are elements you use to collect information from your users, such as text inputs, date pickers, and file uploaders. They can be as simple as a checkbox or combined into complex forms.

Workflows: Workflows are the engine of your app. They're how you instruct Bubble to respond to what a user does, like clicking a button, with a set of actions that can do anything from hiding, showing, or animating elements on the page to making changes in the database or calling an external API. A workflow is the combination of an event that triggers one or more actions.

Did this answer your question?