← v16 index

Renderer · /studio/:slug/renderer

custom TSX · sandbox preview · 3-layer cascade (PR #10, #22, #66)
v16 · Studio
DESKTOP · 1440px · TAB: RENDERER
floom.dev/studio/flyfast/renderer
studio flyfast Renderer
Custom · active
OUTPUT RENDERING

Custom renderer

Style how your action outputs look on /p/:slug. Upload a TSX file, it's esbuild-compiled server-side and served in an iframe sandbox with your schema as props.

CASCADE · PR #66
1. Custom (your TSX)
In use. Full control.
2. Component library
Floom-built: FlightTable, Chart, Markdown, Map, Diff, Key-Value. Picks by output type.
3. Auto (schema → UI)
Default. Renders raw JSON → inferred components.
FlightResults.tsx compiled · 184 KB
1// Receives run output as schema-typed props
2import { type FlightOutput } from './floom-schema'
3import { Card, Badge } from '@floom/ui'
4 
5export default function FlightResults({ output }: { output: FlightOutput }) {
6  return (
7    <div className="grid gap-3">
8      {output.flights.map(f => (
9        <Card key={f.id}>
10          <div className="flex items-center justify-between">
11            <span>{f.airline} {f.number}</span>
12            <Badge tone={f.onTimeRate > 0.9 ? 'good' : 'warn'}>
13              {Math.round(f.onTimeRate * 100)}% on-time
14            </Badge>
15          </div>
16          <div className="text-sm text-muted">
17            {f.depart} → {f.arrive} · {f.duration}
18          </div>
19        </Card>
20      ))}
21    </div>
22  )
23}
Sandbox preview · sample output
Lufthansa LH441
HAM 10:30 → LIS 13:10 · 3h 40m
92% on-time
TAP Portugal TP557
HAM 14:15 → LIS 17:00 · 3h 45m · 1 stop
78% on-time
Ryanair FR5543
HAM 06:50 → LIS 09:25 · 3h 35m
89% on-time
iframe-sandboxed · no network · runs in <50ms
LAST COMPILE · 2 min ago
[00:00] esbuild · entry FlightResults.tsx
[00:01] ✓ type-check · 0 errors · 0 warnings
[00:01] ✓ tree-shake · output 184 KB · gzip 52 KB
[00:02] ✓ sandbox publish · sbx_flyfast_v1.4.0
FALLBACK

If custom fails

Floom drops to layer 2 (library) automatically. Errors go to /runs. Users never see a broken render.

COMPONENT LIBRARY · LAYER 2

Floom-built

FlightTable Chart Markdown Map Diff KeyValue CodeBlock
MOBILE · 390px
floom.dev/studio/flyfast/renderer
flyfast / Renderer
F
STATUS
Custom renderer active
FlightResults.tsx · 184 KB · compiled 2 min ago

Editor + sandbox preview require a desktop viewport (or external IDE).

v16 notes
  • Split view 50/50 desktop. Mobile hides the editor (VS Code on phone is a non-goal).
  • Upload-or-paste TSX. esbuild compiles server-side (PR #10, #22), no npm install on creator machine.
  • 3-layer cascade is explicit: custom TSX wins, library fallback, auto last. PR #66.
  • Sandbox preview uses two seeded sample outputs (A/B) + live re-run button.
  • Fallback is silent — if custom renderer throws, users get library render and error goes to /runs log.