Overview
A function page is an App Studio page backed by a Rippling function. You return an SDUI spec—a JSON description of layout, state, bindings, and handlers—and Rippling renders it with native components from the component catalog.
Server-Driven UI (SDUI) is the spec format and runtime behind function pages. You author specs in TypeScript with @rippling/pebble-sdui-web and the custom-apps catalog.
Why use function pages?
No custom frontend — Ship TypeScript that returns a spec instead of maintaining a separate React app.
Native Rippling UI — Specs use the same component catalog as the rest of the product.
Full layout surface — Grids, modals, drawers, navigation, repeats, and forms are available from the catalog.
Server-driven logic — Return different UI or data based on the user, role, or live backend state—without a separate frontend deployment.
Documentation map
| Doc | Use it for |
|---|---|
| Get started (this page) | What function pages are, lifecycle, when the server runs |
| Hello World | First function and SDUI spec end to end |
| Server round-trips | triggerFunction and multiple action handlers |
| State & Data Binding | $state, $bindState, repeats, and local actions |
| Components | Searchable props and events for each catalog component |
| Reference | Imports, render, component directives, actions table |
What an SDUI spec includes
A single SDUI spec can define everything the function page needs at runtime:
- Layout — Which components appear and how they are arranged.
- State — Initial values the page reads and writes.
- Bindings — Inputs connected to state paths (for example
$bindState('/name')). - Event handlers — Actions attached via
on(clicks, changes, navigation). - Visibility — Conditional display with logic helpers.
- Repeats — Lists driven by arrays in state.
Most client-side interactions (typing, toggling, simple button actions) run from the spec without calling your function again. Server work uses triggerFunction or other actions that invoke your handler with a new action value.
How a function page loads
When someone opens the function page:
- Rippling calls your function with
action: 'init'. - Your function returns an SDUI spec.
- Rippling renders the page from that spec.
When a user interacts with the page:
- Local updates (bound inputs,
setState, notifications) happen in the browser. - Actions that need server logic call your function again (for example via
triggerFunction) withinputs.actionand any additional values the handler needs.
┌─────────┐ ┌─────────────────────┐ ┌──────────────────┐
│ Browser │ │ Rippling UI │ │ Server Function │
└────┬────┘ └──────────┬──────────┘ └────────┬─────────┘
│ │ │
│ 1. User opens page │ │
├─────────────────────────────>│ │
│ │ 2. Invoke function (init) │
│ ├─────────────────────────────────>│
│ │ │
│ │ 3. Return SDUI spec (JSON) │
│ │<─────────────────────────────────┤
│ │ │
│ 4. Render native components │ │
│<─────────────────────────────┤ │
│ │ │
│ 5. User action needs server │ │
├─────────────────────────────>│ 6. Invoke function again │
│ ├─────────────────────────────────>│
Typical authoring flow
- Define state paths your page will use (even empty strings or arrays).
- Build the component tree with catalog helpers (
VStack,Text,Button, …). - Connect inputs with
$bindStateand display values with$stateor$template. - Return
render({ root, state })fromonRipplingEventwhenaction === 'init'.
Start with Hello World to render a minimal function page, then Server round-trips when a button or action needs to call a Rippling function.