Examples are grouped by complexity.
A simple custom message box.
(Almost) the simplest interactive example possible: a counter with push-buttons.
Variant: sync-counter opens two windows with a synchronised counter.
Curious what each mouse cursor available on your desktop (via winit) looks like?
Demonstration of complex layout and multi-paragraph text.
Demonstrates resizable panes.
A simple calculator show-casing the grid layout and keyboard support.
Ready? Set! Go!
A variant of Counter, demonstrating multiple windows and the
SingleView widget (the simplest shared data widget).
A simple clock. This is example uses mid-level drawing routines over a transparent window.
A simple demonstration of the GridView widget.
This example demonstrates an interface over a list data structure of user-defined length. It has two implementations, both with (approximately) the same UI, but different internals:
data-listdirectly allocates a widget for each data entry and stores data within the widgets; it can scale to hundreds of entries or potentially tens of thousands when using release optimisations and tolerating some delaysdata-list-viewuses a dynamic view over a lazily-allocated data structure; performance is thus independent of the number of entries (though length is still limited by the maximum possible scroll offset; see issue #222)
Demonstrates updating the UI in response to events from a background thread.
A testbed demoing most widgets, animations, data models, canvas and configuration.
GPU-accelerated fractals via a custom embedded WGPU graphics pipeline.
A kas::Id is a path. This tool can decode both an Id displayed with a leading # (as below) and codes converted to a u64 (where this is a compressed full path, not where this is a hash of a longer stack-allocated path).
$ cargo run --example reformat-id '#1001970'
[1, 0, 0, 1, 15, 0]
The file includes a list of contributors who claim copyright on this project. This list may be incomplete; new contributors may optionally add themselves to this list.
The KAS library is published under the terms of the Apache License, Version 2.0. You may obtain a copy of this licence from the file or on the following webpage: https://www.apache.org/licenses/LICENSE-2.0













