AdwCarousel

A paginated scrolling widget.

Preview

CSS Node Tree

carousel[.horizontal|.vertical]
  └── [child] (a page each)

carouselindicatordots

carouselindicatorlines

Props

Prop

Type

AdwCarouselIndicatorDots

Prop

Type

AdwCarouselIndicatorLines

Prop

Type

Behavior

  • Each child is a page. Pages are as wide as the widest child, or as the carousel when a child sets hexpand (vexpand when vertical), and the current page is centered.
  • Drag pages with the mouse or touch, or swipe with a touchpad: the pages follow, and a swipe goes to the next page at most unless allowLongSwipes is set. A quick flick goes on to the next page.
  • A mouse wheel notch goes to the next or previous page. Set allowScrollWheel={false} to turn it off, or allowMouseDrag={false} to leave dragging to touch.
  • While something in the carousel has the focus, ← and → (↑ and ↓ when vertical) and Page Up and Page Down go to the previous or next page, Home and End to the first or last.
  • page changes the page from code, with an animation, and onPageChanged reports the page once it settles. With interactive={false}, only page changes it: the user can't.
  • onPositionChanged reports the scroll position as it moves, in pages. Pass it with the page count to AdwCarouselIndicatorDots or AdwCarouselIndicatorLines, which follow it. As in libadwaita, the indicators only show the position; they can't be clicked.

Adwaita Documentation →

On this page