Snapchat /Valdi

Valdi is a cross-platform UI framework that delivers native performance without sacrificing developer velocity.

★ 16,380⑂ 538👁 75⑃ 125● 68▤ 4
TA的项目
下载:beta-0.2.1beta-0.2.1 ↓0.2.12026-10-19
+0
日增长
16,380
stars
538
forks
75
watchers
125
prs
68
issues
4
releases

README

[!NOTE]
 Beta Status: Valdi has been widely used in Snap's production apps for the last 8 years. We're calling this a beta because our tools and documentation need more battle testing in the open source world. Valdi will exit beta when we're happy with the developer experience.

Valdi is a cross-platform UI framework that delivers native performance without sacrificing developer velocity. Write your UI once in declarative TypeScript, and it compiles directly to native views on iOS, Android, and macOS—no web views, no JavaScript bridges. 

 Quick Example

A basic Valdi component:

tsx
import { Component } from 'valdi_core/src/Component';

class HelloWorld extends Component {
  onRender() {
    const message = 'Hello World! 👻';
    
      
    ;
  }
}



  


 Quick Start

Prerequisites: Node.js 20 or later (22 recommended) and, on macOS, Xcode 26.5 or 27. valdi dev_setup installs the rest. See the Installation Guide.

bash
 Install Valdi CLI
npm install -g @snap/valdi

 One-command setup (installs all dependencies)
valdi dev_setup

 Create your first project
mkdir my_project && cd my_project
valdi bootstrap
valdi install ios   or android


 [!TIP]
 Editor setup: No Valdi-specific extension is needed. See VSCode/Cursor setup to point your editor at the workspace TypeScript version.

 Quick Links

- Getting Started Guide
- Documentation
- Codelabs
- API Reference
- Frequently Asked Questions
- Component Library
- GitHub Discussions
- Roadmap

 Example Apps

The apps/ directory contains runnable examples:

| App | What it shows |
|-----|---------------|
| helloworld | Minimal component — the fastest way to get something on screen |
| navigation_example | Screen navigation patterns |
| managed_context_example | Sharing state across components with managed context |
| valdi_gpt | AI-driven dynamic UI — Valdi rendering UI described at runtime |
| cli_example | Building a Valdi CLI application |
| benchmark | Performance benchmarks |

 Why Choose Valdi?

Valdi is a cross-platform UI framework designed to solve the fundamental problem of cross-platform development: velocity vs. runtime performance. For 8 years, it has powered a large portion of Snap's production apps.

 True Native Performance

Unlike frameworks that rely on web views or JavaScript bridges, Valdi compiles declaratively rendered TypeScript components into platform-native views. Valdi also includes several other performance advantages:

- Automatic view recycling - Global view pooling system reuses native views across all screens, dramatically reducing inflation latency
- Optimized component rendering - Components re-render independently without triggering parent re-renders, enabling fast incremental updates
- Optimized layout engine - C++ layout engine runs on the main thread with minimal marshalling overhead
- Viewport-aware rendering - Only visible views are inflated, making infinite scrolling performant by default

Learn more in our Performance Optimization Guide.

 Developer Experience

Top issues

Discussions

Latest release

beta-0.2.1 beta-0.2.1 2026-10-19
What's new

A stability-focused release: runtime teardown and threading fixes, rendering fixes on iOS and Android, faster hot paths, and Xcode 27 support.

 Runtime stability
- Hardened runtime teardown at app termination: JS dispatch is refused once the JS queue is torn down, visibility observers are no longer flushed into a destroyed context, and the native context stays retained across in-flight Java calls.
- Deadline-bounded synchronous JS calls now fail fast while the JS thread is stalled instead of blocking the caller.
- Fixed a race in the initial auto-render publication on Android.
- P

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON