Repository navigation
Introduction
Blinc is a GPU-accelerated UI framework for Rust. Build desktop, mobile and browser interfaces with composable components, CSS styling and reactive property bindings.
This book uses the blinc package. Its modules provide the application runner,
layout builders, reactive primitives, themes and optional component APIs.
Rust builders describe the content and its structure:
use blinc::{cn, prelude::*};
fn project_card() -> Div {
div().class("project-card")
.child(cn::h2("Website"))
.child(cn::p("Keep decisions and next steps together."))
}Stylesheets define the appearance:
.project-card {
display: flex;
flex-direction: column;
gap: var(--space-3);
padding: var(--space-4);
border-radius: var(--radius-default);
background: var(--surface);
}Built-in themes supply colours, spacing, corner shapes and motion tokens. Component classes let an application restyle controls while retaining their input behaviour.
Signals hold values, Computeds derive them, and Effects connect changes to application logic. Properties accept reactive sources directly:
use blinc::{cn, core::{computed, signal}};
let pending = signal(3usize);
let summary = computed(move |g| {
format!("{} files awaiting review", g.get(pending).unwrap_or_default())
});
let heading = cn::heading(2, summary);
pending.set(5);Changing the Signal updates the bound heading in place. Reactive lists and branches handle changes to children. Finite state machines remain available for interactions that need explicit states and transitions.
Blinc combines text shaping, SDF geometry, images, SVG, canvas drawing and material effects in its GPU renderer. Flow shaders provide custom visual behaviour. CSS transitions, keyframes and motion containers animate the UI.
| Module | Purpose |
|---|---|
blinc::app |
Desktop, mobile and browser runners |
blinc::layout |
Elements, layout and input routing |
blinc::core |
Signals, Computeds, Effects and drawing types |
blinc::theme |
Built-in themes and custom theme bundles |
blinc::cn |
Components, enabled with cn
|
blinc::icons |
Lucide icons, enabled with icons
|
blinc::svg |
SVG loading APIs, enabled with svg
|
blinc::media |
Playback and capture APIs, enabled with media
|
The version selector opens documentation for the release you use. The main
/docs/ entry shows the latest stable book; Development follows the current
source tree.
Start with Installation, then build Your First App.
Getting Started
Migrating
Mobile Development
Example Gallery
- Example Gallery
- Canvas Element
- Canvas Kit Interactive
- Carousel Demo - Selector API Showcase
- Chrome-Style Tabs
- blinc_cn Components
- Run with
cargo run -p blinc_app_examples --features cn --example cn_pickers_demo. - 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. - Gpu Pass 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
- Wet Glass
- Windowed Application
Web Development
Core Concepts
- Elements & Layout
- Styling & Materials
- CSS Styling
- Theming
- Event Handling
- Accessibility
- State Management
- Lists & Conditional Content
- Element Refs
Animation
Components
Component Library (blinc_cn)
- Overview
- Button
- Card
- Icons
- Typography
- Dialog
- Form Components
- Date, Time and Colour Pickers
- Rich Text Editor
- Code Editor
- Navigation
- Feedback
- Layout
- Data Display
Widgets
- Buttons & Inputs
- Text & Rich Text
- Code Editor
- Scroll Containers
- Virtualized List
- Canvas Drawing
- Gestures
- Notched Surfaces
- 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 reloading
Architecture
Contributing