Book Image

Creating Interfaces with Bulma

By : Jeremy Thomas, Oleksii Potiekhin, Mikko Lauhakari, Aslam Shah, Dave Berning
Book Image

Creating Interfaces with Bulma

By: Jeremy Thomas, Oleksii Potiekhin, Mikko Lauhakari, Aslam Shah, Dave Berning

Overview of this book

Bulma is a lightweight configurable CSS framework that handles all the hard work of Flexbox for you. Bulma makes creating web interfaces an easy and interesting job. This book begins with an overview of the basics of Bulma ? its terms and its concepts. Then, while designing a login page for your application, you’ll learn how to use the various tools provided by Bulma to create HTML forms and control their layout and flow. In the later chapters, you’ll design an admin area for your application, thus learning to use Bulma’s navigation and menu components. You will also add the components to your user interface for common things such as boxes, lists, and media groups, and then create pagination. As you progress through the book, you’ll create and layout some other components for your interface, including tables, design dropdown lists, and finally to integrate your web application with JavaScript. By the end of this book, you’ll be able to use the features of Bulma to your advantage and build web interfaces quickly and easily.
Table of Contents (15 chapters)
8
8. Creating more tables and selecting dropdowns

Creating the Login component

Let’s create a folder and name it “Login.” As stated above, this folder will contain all of our component’s code. Inside this folder, let’s create a JSX file and name it “Login.jsx”.

This Login.jsx will act as a container and will do nothing but “contain” the child components. On this level, you can control the overall layout of the component. You want to keep UI layout separate from the child components. If it’s confusing now, don’t worry, it’ll make more sense soon.

Login.jsx

Remember, Bulma was added globally into the index.js file earlier. So you don’t need to add it again, so let’s create the first React component with Bulma.

Creating the Login form container

First, create the user interface that contains the form. Remember, you should keep the actual form separate from the Login component. That way you can reuse the form itself anywhere in the web application...