← 返回日报
精读 预计 4 分钟

Slint 1.17 Released

摘要

这是 Slint 1.17 的发布说明。Slint 是一个基于 Rust 的跨平台 UI 工具包,支持 Rust、C++、JavaScript 和 Python,用于桌面、移动与嵌入式应用开发。本次版本重点推进 “desktop-ready” 路线,新增 drag and drop(应用内拖拽交互)、SystemTrayIcon(跨平台系统托盘图标)、Tooltip 和 RadioGroup 等常用桌面组件。 同时带来多项增强功能:支持模型行级别的双向绑定(可直接绑定并编辑 model row 数据)、布局 cross-axis 对齐能力增强、Markdown 在 StyledText 中的运行时解析、以及 Linux/macOS 上 Node.js 端更低 CPU 占用的事件循环优化。还新增 MCP server,使 AI 助手可通过应用可访问性树、输入模拟与截图来理解和操作 Slint 应用;并提供 remote viewer,可将 UI 运行结果远程渲染到手机/平板。C++ 也新增 Android 构建支持,并改进阴影效果与样式能力。整体是一次以桌面体验补齐与 AI/远程开发能力扩展为主的版本更新。

荐读理由

在项目中引入 SystemTrayIcon 组件实现安静后台运行、显示状态更新或暴露快捷操作菜单,同时在 Slint 界面中嵌入 MCP 服务器,让 AI 助手通过无障碍树驱动 UI、注入输入并截图推理;Markdown 解析与模型两向绑定则直接支持运行时构建样式化文本和原地编辑表格行数据

原文

June 24, 2026 by Slint Developers

Slint 1.17 Released Blog RSS


We're happy to announce Slint 1.17, another big step toward making Slint desktop-ready. This release brings drag and drop, system tray icons, tooltips, and two-way bindings on model rows.

Slint is a toolkit written in Rust, with APIs for Rust, C++, JavaScript, and Python, for building native user interfaces for desktop, embedded, and mobile applications.

Making Slint Desktop-Ready

Back in November we laid out a plan to make Slint desktop-ready. With 1.17 we're checking off four more boxes from that list:

Work on drag and drop, system tray icons, and tooltips was funded by NLnet as part of the Slintify LibrePCB project. We're very grateful for their support.

Drag and Drop

You can now add drag and drop interactions to your Slint apps.

Try the kanban demo live in your browser.

A DragArea marks the source of a drag, a DropArea marks the target, and the payload is an opaque data-transfer value that you construct and read in your host language.

export global Api {
    pure callback make-transfer(string) -> data-transfer;
    pure callback read-transfer(data-transfer) -> string;
}

export component Example inherits Window {
    DragArea {
        data: Api.make-transfer("Hello World");
        allow-copy: true;
        Rectangle { background: #f0c000; width: 100px; height: 100px; }
    }

    drop := DropArea {
        x: 150px;
        can-drop(event) => DragAction.copy;
        dropped(event) => {
            debug("Got: ", Api.read-transfer(event.data));
            return event.proposed-action;
        }
        Rectangle {
            background: drop.contains-drag ? #80e080 : #a0a0a0;
            width: 100px;
            height: 100px;
        }
    }
}

can-drop runs while the drag hovers and returns a DragAction that drives the cursor and any visual feedback; dropped runs on release and confirms the action. A DragArea declares which actions it allows and reacts to the result through drag-finished. See the drag and drop guide for the full picture.

In this release, drag and drop works within the application. Dragging to other applications and receiving drops from them is in development upstream in winit.

System Tray Icons

Run a quiet background app, display status updates, or expose a quick-action menu from the system tray with the new SystemTrayIcon element:

export component MyTray inherits SystemTrayIcon {
    icon: @image-url("tray.png");
    tooltip: "My App";

    callback show-window();
    callback hide-window();

    Menu {
        MenuItem {
            title: "Show";
            activated => { show-window(); }
        }
        MenuItem {
            title: "Hide";
            activated => { hide-window(); }
        }
    }
}

The same SystemTrayIcon works on macOS, Windows, and Linux. The clip above shows it on Windows.

Tooltips and Radio Groups

Two new widgets that show up everywhere in a real desktop app.

Add a tooltip to any element with the new Tooltip element:

Button {
    text: "Save";
    Tooltip { text: @markdown("Save the current document (Ctrl+S)"); }
}

And bundle a set of radio buttons with RadioGroup, which manages selection and keyboard navigation for you:

RadioGroup {
    RadioButton { text: "Small"; }
    RadioButton { text: "Medium"; checked: true; }
    RadioButton { text: "Large"; }
}

Other Changes

Additional items worth highlighting:

  • MCP server for AI assistants: a Slint application can now embed a Model Context Protocol server. Once connected, an assistant can inspect a running application through its accessibility tree, drive the UI by injecting mouse, touch, and keyboard input, and capture screenshots to reason about the result. We also ship skills and plugins that teach AI coding assistants how to write Slint code; see the AI coding assistants guide to set them up.

  • Remote Slint viewer: a new --remote flag connects slint-viewer to a Slint LSP running on another machine and renders the design locally, so you can edit a .slint file on your desktop and watch the result on a phone or tablet as you type. The viewer is in beta for Android on Google Play (or grab the APK), and for iOS through TestFlight while the App Store review is underway.

  • Two-way bindings on model rows: following the two-way bindings on struct fields from Slint 1.15, you can now bind directly to model row data with text <=> item.name, editing a row in place without bouncing through a callback to write the change back.

  • Cross-axis alignment on layouts: align children along the cross axis with the new cross-axis-alignment property on VerticalLayout and HorizontalLayout (#2587).

  • A faster Node.js port: on Linux and macOS, Slint now ties its event loop to the libuv file descriptor that Node already polls, so the UI no longer wakes on a timer and idle CPU usage drops to near zero (Windows is still pending). A dedicated blog post on these changes is coming soon.

  • C++ on Android: you can now build Slint apps for Android from a C++ codebase. See the Android guide to get started.

  • Markdown parsing in native code: the StyledText API in Rust, C++, JavaScript, and Python now parses markdown at runtime, so you can construct styled text from data your app loads at runtime, not just from .slint literals.

  • Drop-shadow improvements: we added drop-shadow-spread and a full set of inner-shadow-* properties to Rectangle (Skia only).

For the full picture, see the ChangeLog.

Getting Started with Slint 1.17

Don't forget to star us on GitHub, join our Mattermost chat, and share your projects.

Thanks

Big thanks to everyone who contributed code, fixes, or feedback. You help us make Slint better with every release.

@0x6e @1mrnewton @agent10 @amirHdev @bennysj @bowenxuuu @DataTriny @dfaure-kdab @eira-fransham @Eyalm321 @farmaazon @fieran100 @flukejones @GrandAdmiralBee @ImFeH2 @lainon1 @manushT @megabyte6 @npwoods @pepin82 @qarmin @redstrate @ruffsl @stevekwon211 @task-jp @tilladam @ubruhin @wyhaya


Comments

Slint is a Rust-based toolkit for creating reactive and fluent user interfaces across a range of targets, from embedded devices with limited resources to powerful mobile devices and desktop machines. Supporting Android, Windows, Mac, Linux, and bare-metal systems, Slint features an easy-to-learn domain-specific language (DSL) that compiles into native code, optimizing for the target device's capabilities. It facilitates collaboration between designers and developers on shared projects and supports business logic development in Rust, C++, JavaScript, or Python.

Lobsters · 1 赞 · 0 评 讨论 → 阅读原文 →

这条对你有帮助吗?