Guide
5/14/26Less than 1 minute
Guide
Welcome to the Perry PHP guide. Perry is a cross-platform UI code generation framework — you define your UI once in PHP and generate native source code for 11 platforms.
How It Works
PHP Widget Tree (DSL)
│
▼
Codegen Backend (e.g., SwiftUIBackend, HtmlBackend)
│
▼
Native Source Code (Swift, HTML, Kotlin, C#, etc.)
│
▼
Platform Toolchain (swiftc, dotnet, gradle, etc.)
│
▼
Native App (.app, .exe, .apk, etc.)Contents
- Getting Started — Installation and your first app
- UI Components — All 16 widgets: Text, Button, VStack, HStack, Spacer, Image, ScrollView, TextInput, Toggle, AppContainer, WebView, Slider, Checkbox, RadioButton, Progress, TabView
- State Management — Binding and State objects for reactive data
- Actions — Simple actions, Closure actions (AST transpilation), PHP function mappings
- Styling — 29 style properties, Style builder, platform support matrix
- Code Generation — 11 backends, 5 generators, 54 IR node types
- Platform Support — Supported targets and build requirements
- Build System — CLI usage, Windows (WebView2) requirements
- Extending Perry — Custom widgets, backends, generators, and function mappings