explaingit

snapchat/valdi

16,384C++Audience · developerComplexity · 4/5LicenseSetup · hard

TLDR

Snapchat's cross-platform UI framework that compiles TypeScript TSX into truly native views for iOS, Android, and macOS without a JS bridge.

Mindmap

mindmap
  root((Valdi))
    Inputs
      TypeScript code
      TSX components
      Native modules
    Outputs
      Native iOS views
      Native Android views
      Native macOS views
    Use Cases
      Build a cross platform app
      Embed in existing native code
      Hot reload UI on device
      Mix in C++ for hot paths
    Tech Stack
      TypeScript
      C++
      Swift
      Kotlin
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build a single-codebase iOS, Android, and macOS app with native rendering

USE CASE 2

Drop Valdi screens into an existing native app one feature at a time

USE CASE 3

Write hot-path code in C++ or Swift with type-safe TypeScript bindings

Tech stack

TypeScriptC++SwiftKotlinObjective-C

Getting it running

Difficulty · hard Time to first run · 1day+

Beta status plus full native toolchains (Xcode, Android SDK, C++ build) required for each target platform.

Use freely in personal or commercial projects as long as you keep the copyright notice.

In plain English

Valdi is a cross-platform UI framework created by Snapchat that lets you build mobile and desktop apps for iOS, Android, and macOS by writing code once in TypeScript. TypeScript is a version of JavaScript with added type safety, which helps catch mistakes early. What makes Valdi different from similar tools is that it compiles your code directly into native views, the real building blocks the operating system uses to draw the screen, rather than running a web browser inside your app or using a JavaScript bridge (a middle layer that translates between JavaScript and native code, which often causes performance slowdowns). The framework has been used inside Snap's own production apps for eight years before being open-sourced. You write your UI components in a style that looks like HTML-style tags inside TypeScript (called TSX), and Valdi compiles those to native elements on each platform. The layout engine is written in C++ and runs with minimal overhead. Performance features include automatic view recycling (reusing on-screen elements instead of recreating them) and viewport-aware rendering (only loading what is currently visible). For developers, Valdi offers instant hot reload (see code changes appear on-device in milliseconds without a full rebuild), full debugging support in VSCode and Cursor editors, and the ability to mix Valdi components into existing native app code gradually rather than rewriting everything at once. You can also write performance-critical code in C++, Swift, Kotlin, or Objective-C and connect it to your TypeScript layer with type-safe auto-generated bindings. Valdi is currently in beta and is free to use under the MIT license.

Copy-paste prompts

Prompt 1
Walk me through bootstrapping a new Valdi project that targets iOS and Android from one TypeScript codebase
Prompt 2
Show me how to embed a Valdi screen into an existing Swift iOS app and pass data between them
Prompt 3
Write a Valdi TSX component for a scrollable list with view recycling enabled
Prompt 4
Generate type-safe Valdi bindings for a Kotlin module that exposes a camera API
Open on GitHub → Explain another repo

← snapchat on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.