AdwCarousel
A paginated scrolling widget.
Preview
CSS Node Tree
carousel[.horizontal|.vertical]
└── [child] (a page each)
carouselindicatordots
carouselindicatorlinesProps
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(vexpandwhen 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
allowLongSwipesis 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, orallowMouseDrag={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.
pagechanges the page from code, with an animation, andonPageChangedreports the page once it settles. Withinteractive={false}, onlypagechanges it: the user can't.onPositionChangedreports the scroll position as it moves, in pages. Pass it with the page count toAdwCarouselIndicatorDotsorAdwCarouselIndicatorLines, which follow it. As in libadwaita, the indicators only show the position; they can't be clicked.