Playing Next Lesson In
seconds

Transcript

  1. system. Now, Edge.js is a backend rendered template engine, so it's not going to have reactivity baked in that we're going to be able to use.

  2. However, we can sprinkle in Alpine.js to add that reactivity in. And we're also going to be using Pines UI and Tailwind CSS to comprise the components itself.

  3. Pines UI has a number of different elements that we're going to be able to directly reach into. It has reactivity baked in using Alpine.js. The styling is done via Tailwind CSS.

  4. So we're going to be able to copy this and then just kind of parse it out as we need for our AdonisJS Edge components. For example, after we're done with our button component, we're going to be left with something

  5. like this, where we have our base button, which all of our buttons comprise from. We're going to have different size options, different variants, an inverse style, and

  6. an outline style as well. Now before we actually dive in and start creating our components, we're going to take a brief moment to walk through components, what they are, how to name them, where to place them,

  7. what state props and slots are, to get us up and running and ready to go for our components itself so that nobody's left lost in what we're actually doing.

Exploring EdgeJS' Component System

In This Lesson

We'll walk through a high-level overview of this series' objectives, including the various components we'll build throughout this series.

Created by
@tomgobich
Published

Throughout this series, we'll be exploring AdonisJS's Edge component system in depth by building various components of our own.

What We’ll Be Using

AdonisJS is a backend-rendered template engine, meaning that when our AdonisJS server sends its response and our HTML hits the browser, EdgeJS has already done its job. Therefore, reactivity isn’t something it’s able to provide. To introduce reactivity, we can incorporate AlpineJS. Additionally, we'll utilize PinesUI and TailwindCSS to create our components.

PinesUI offers a range of elements with inherent reactivity through AlpineJS, while TailwindCSS handles styling. This combination enables us to adapt PinesUI elements for our AdonisJS Edge components with relative ease.

What We’ll Be Building

One of the first components we’ll be building is a button component. Our button component will evolve into a versatile option as we progress through its module in this series.

It will feature a core button structure, from which we can derive various sizes, color variants, an inverse style, and an outline style. Then, we’ll sprinkle in reactivity using AlpineJS to handle events like clicks that can propagate outside of our button component to an event handler.

In addition to our button, we’ll also incorporate components for:

  • Accordion

  • Alert

  • Tabs

  • Cards

  • Date picker

  • Inputs

  • Modals

  • Pagination

  • Textareas

  • And more

Before We Dive In

Before delving into component creation, we'll first provide a brief overview of components, including their definition, naming conventions, directory placement, and explanations of state, props, and slots. This foundational knowledge will ensure you're well-prepared and won't feel lost as we dive into the actual component development.

Join the Discussion 0 comments

Create a free account to join in on the discussion
robot comment bubble

Be the first to comment!