tawasuyu

tawasuyu/llimphi

Sovereign retained-mode GPU UI framework in Rust (wgpu+vello+taffy+parley), Elm loop, 40+ widgets.

Rust 229TOML 101Markdown 82Shell 24052 Definiciones

⎇ main widgets/carousel/README.md Markdown · 19 líneas · 747 B Historia crudo

chore: refresco desde el monorepo — 27 crates nuevos (anim, lottie, svg, mesh, image, layer, test, wire-view, widgets rag-sidebar/router/lazy-list/rive-button) y sync de los 95 existentes 93253cc22 · Sergio ·

1# llimphi-widget-carousel
2
3Paged pager.
4
5A view that shows N pages one at a time, with **indicator dots** at the bottom
6(clickable, to jump to page *i*) and **optional arrows** on the sides. The caller
7keeps a single `current_index: usize` in its model and receives `on_change(i)`
8when the user changes page.
9
10v1 has **no swipe** — navigation goes through dots and arrows. A v2 can add
11horizontal swipe using `View::draggable_velocity` + `fling_step` for
12snap-on-release (the seam already exists; adding it is composition).
13
14Pure helpers for wrapping and clamping the index (`wrap_index`, `clamp_index`)
15— useful in the caller's `update` (arrows at the ends may wrap or stay put).
16
17---
18
19Part of **llimphi** — see [llimphi](../../README.md).

README.md

llimphi-widget-carousel

Paged pager.

A view that shows N pages one at a time, with indicator dots at the bottom (clickable, to jump to page i) and optional arrows on the sides. The caller keeps a single current_index: usize in its model and receives on_change(i) when the user changes page.

v1 has no swipe — navigation goes through dots and arrows. A v2 can add horizontal swipe using View::draggable_velocity + fling_step for snap-on-release (the seam already exists; adding it is composition).

Pure helpers for wrapping and clamping the index (wrap_index, clamp_index) — useful in the caller's update (arrows at the ends may wrap or stay put).


Part of llimphi — see llimphi.