-
-
Notifications
You must be signed in to change notification settings - Fork 14
Introduction
Blinc is a GPU-accelerated, reactive UI framework for Rust. It provides a declarative, component-based approach to building high-performance user interfaces with smooth animations and modern visual effects.
-
GPU-Accelerated Rendering - All rendering is done on the GPU via wgpu, enabling smooth 60fps animations and complex visual effects like glass materials and shadows.
-
Declarative UI - Build interfaces using a fluent, composable API inspired by SwiftUI and modern web frameworks. No manual DOM manipulation.
-
Reactive State - Automatic UI updates when state changes, with fine-grained reactivity for optimal performance.
-
Spring Physics - Natural, physics-based animations using spring dynamics instead of fixed durations.
-
Cross-Platform - Runs on macOS, Windows, Linux, Android, iOS and Web (WASM + WebGPU).
All layout is powered by Taffy, a high-performance flexbox implementation. Use familiar CSS-like properties:
div()
.flex_col()
.gap(16.0)
.p(24.0)
.child(text("Hello"))
.child(text("World"))Built-in support for glass, metallic, and other material effects:
div()
.glass()
.rounded(16.0)
.p(24.0)
.child(text("Frosted Glass"))The BlincComponent derive macro generates type-safe animation hooks:
#[derive(BlincComponent)]
struct MyCard {
#[animation]
scale: f32,
#[animation]
opacity: f32,
}
// Usage
let scale = MyCard::use_scale(ctx, 1.0, SpringConfig::snappy());
let opacity = MyCard::use_opacity(ctx, 0.0, SpringConfig::gentle());Intuitive event handling with closures:
div()
.on_click(|_| println!("Clicked!"))
.on_hover_enter(|_| println!("Hovered"))┌─────────────────────────────────────────────────────┐
│ Your Application │
├─────────────────────────────────────────────────────┤
│ blinc_app │ WindowedApp, Context, State Hooks │
├──────────────┼──────────────────────────────────────┤
│ blinc_layout│ Elements, Flexbox, Event Routing │
├──────────────┼──────────────────────────────────────┤
│ blinc_animation │ Springs, Timelines, Motion │
├──────────────┼──────────────────────────────────────┤
│ blinc_gpu │ Render Pipeline, Materials │
├──────────────┼──────────────────────────────────────┤
│ wgpu │ GPU Abstraction Layer │
└─────────────────────────────────────────────────────┘
Here's a minimal Blinc application:
use blinc_app::prelude::*;
use blinc_app::windowed::{WindowedApp, WindowedContext};
fn main() -> Result<()> {
WindowedApp::run(WindowConfig::default(), |ctx| {
div()
.w(ctx.width)
.h(ctx.height)
.bg(Color::rgba(0.1, 0.1, 0.15, 1.0))
.flex_center()
.child(
div()
.glass()
.rounded(16.0)
.p(32.0)
.child(text("Hello, Blinc!").size(24.0).color(Color::WHITE))
)
})
}If you're an AI coding agent working with Blinc, see Skills.md in the repository root — a concise, example-driven reference with verified APIs, CSS-first styling patterns, and common pitfalls.
- Installation - Set up your development environment
- Your First App - Build a complete application step by step
- Elements & Layout - Learn about available UI elements
Getting Started
Mobile Development
Example Gallery
- Example Gallery
- Canvas Element
- Canvas Kit Interactive
- Carousel Demo - Selector API Showcase
- Chrome-Style Tabs
- blinc_cn Components
- Code Element
- Complex SVG
- CSS Debug
- CSS Visual Features
- Layer Effects
- Emoji and HTML Entities
- @flow Shader
- Fluid Surface
- Skeleton animation with glTF +
blinc_canvas_kit. DrawContext::run_gpu_passend-to-end demo.- Image CSS Styling
- Image Layer Test
- Keyframe Animation Canvas
- Markdown Editor
- 3D Mesh Demo — renders the Khronos glTF
DamagedHelmetsample model - Motion Demo
- Music Player Glass Card
- Node-editor demo — pre-wired graph with three node types, typed
- Notch Menu Bar
- Overflow Fade
- Overlay System
- Pointer Query
- Rich Text Element
- Rich Text Editor
- Scroll Container
- Semantic @flow
- Sortable
- Stateful API + Signal-bound modifiers demo.
- End-to-end 3D demo wiring Blinc's SceneKit3D renderer up to
- Unified Styling API
- SVG Animation
- Table Builder
- Tabler Icons
- Minimal text positioning test
- Text Input Widgets
- KHR_texture_transform
- Theme System
- Timeline Animation
- Typography
- Video Player
- Wet Glass
- Windowed Application
Web Development
Core Concepts
Animation
Components
Component Library (blinc_cn)
Widgets
- Buttons & Inputs
- Text & Rich Text
- Code Editor
- Scroll Containers
- Virtualized List
- Canvas Drawing
- Images & SVG
- Audio & Video
- Markdown Rendering
Canvas Kit
Advanced
- Routing & Navigation
- Multi-Window
- System Integration
- Element Query API
- Overlay System
- Custom State Machines
- Pointer Query
- Performance Tips
- Flow Shaders
- 3D Rendering
- Custom GPU Passes
- Hot-reload (experimental)
Architecture
Contributing