Skip to content

Commit 6c8ed22

Browse files
committed
Add EDGE intro
1 parent 4efa6ea commit 6c8ed22

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

resources/views/docs/mobile/2/edge-components/introduction.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,60 @@
22
title: Introduction
33
order: 1
44
---
5+
6+
## What is EDGE?
7+
8+
EDGE (Element Definition and Generation Engine) is NativePHP for Mobile's component system that transforms Blade
9+
template syntax into platform-native UI elements.
10+
11+
Instead of rendering in the web view, EDGE components are compiled into truly native elements and live apart from the
12+
web view's lifecycle. This means they are persistent and performant.
13+
14+
These are native components, coming with all the performance benefits of the native UI rendering pipeline — no custom
15+
rendering engine, no expensive transformation or compilation step. Just pure native components configured by PHP.
16+
17+
## Available Components
18+
19+
Our first set of components are focused on navigation, framing your application with beautiful, platform-dependent UI
20+
components. These are familiar navigational elements that your users will be familiar with and make your app feel right
21+
at home, like any other native app. All whilst giving you easy-to-use tools to help you rapidly build your app.
22+
23+
Dig into the docs for each component:
24+
25+
- **[Bottom Navigation](bottom-nav)** - Bottom navigation bar with up to 5 items
26+
- **[Top Bar](top-bar)** - Top app bar with title and action buttons
27+
- **[Side Navigation](side-nav)** - Slide-out navigation drawer
28+
29+
## How It Works
30+
31+
You simply define your components in Blade:
32+
33+
@verbatim
34+
```blade
35+
<native:bottom-nav>
36+
<native:bottom-nav-item id="home" icon="home" label="Home" url="/home" />
37+
</native:bottom-nav>
38+
```
39+
@endverbatim
40+
41+
And EDGE processes these during each request, passing instructions to the native side. The native UI rendering pipeline
42+
takes over to generate your defined components and builds the interface just the way your users would expect, enabling
43+
your app to use the latest and greatest parts of each platform, such as Liquid Glass on iOS.
44+
45+
Under the hood, the Blade components are compiled down to a simple JSON configuration which we pass to the native side.
46+
The native code already contains generic components compiled-in that are then rendered as needed based on the JSON.
47+
48+
<aside>
49+
50+
#### Sounds like _Server-Driven UI_...
51+
52+
That's right! This approach takes more than one leaf out of the server-driven UI book. The difference is that it can be
53+
greatly simplified as there is no network involved — all the generation and rendering is happening on-device.
54+
55+
</aside>
56+
57+
## Why Blade?
58+
59+
Blade is an expressive and straightforward templating language that is very familiar to all Laravel users, but is also
60+
super accessible to anyone who's used to writing HTML. All of our components are Blade components, allowing us to use
61+
Blade's battle-tested processing engine to rapidly compile the necessary transformation just in time.

0 commit comments

Comments
 (0)