Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A native Rust UI library with fine-grained reactivity

License

NotificationsYou must be signed in to change notification settings

lapce/floem

Repository files navigation

Floem

A native Rust UI library with fine-grained reactivity

crates.iodocs.rsDiscord

The project is still maturing. We will make occasional breaking changes and add missing features on our way to v1.

Quickstart

use floem::prelude::*;fnmain(){    floem::launch(counter_view);}fncounter_view() ->implIntoView{letmut counter =RwSignal::new(0);h_stack((button("Increment").action(move || counter +=1),label(move ||format!("Value: {counter}")),button("Decrement").action(move || counter -=1),)).style(|s| s.size_full().items_center().justify_center().gap(10))}

Features

Inspired byXilem,Leptos andrui, Floem aims to be a high performance declarative UI library with a highly ergonomic API.

  • Cross-platform: Floem supports Windows, macOS and Linux with rendering usingwgpu. In case a GPU is unavailable, a CPU renderer powered bytiny-skia will be used.
  • Fine-grained reactivity: The entire library is built around reactive primitives inspired byleptos_reactive. The reactive "signals" allow you to keep your UI up-to-date with minimal effort, all while maintaining very high performance.
  • Performance: The view tree is constructed only once, safeguarding you from accidentally creating a bottleneck in a view generation function that slows down your entire application. Floem also provides tools to help you write efficient UI code, such as avirtual list.
  • Flexbox layout: UsingTaffy, the library provides the Flexbox and Grid layout systems, which can be applied to any View node.
  • Customizable widgets: Widgets are highly customizable. You can customize both the appearance and behavior of widgets using the styling API, which supports theming with classes. You can also install third-party themes.
  • Transitions and Animations: Floem supports both transitions and animations. Transitions, like css transitions, can animate any property that can be interpolated and can be applied alongside other styles, including in classes.Floem also supports full keyframe animations that build on the ergonomics of the style system. In both transitions and animations, Floem supports easing with spring functions.
  • Element inspector: Inspired by your browser's developer tools, Floem provides adiagnostic tool to debug your layout.

To sample Floem's capabilities, check out the repo and run thewidget gallery example with cargo.

Widget gallery

To help you master Floem, we providedocumentation andcode examples.

Contributions

Open in Lapdev

Lapdev, developed by the Lapce team, is a cloud dev env service similar to GitHub Codespaces. By clicking the button above, you'll be taken to a fully set up Floem dev env where you can browse the code and start developing. All dependencies are pre-installed, so you can get straight to code.

Contributions welcome! If you'd like to improve how Floem works and fix things, feel free to open an issue or submit a PR. If you'd like a conversation with Floem devs, you can join in the #floem channel on thisDiscord.


[8]ページ先頭

©2009-2025 Movatter.jp