Read page as text

NIB / DOCUMENTATION

Carousel — NibComponents

Swipe a real PageView, navigate through its controller, and choose an indicator.

Open interactive view

Choose height and neighboring visibility

height gives every slide a bounded vertical extent. peekExtent exposes an edge of adjacent slides; viewportFraction is the explicit alternative when you need a fraction of the viewport. This preview preserves the complete artwork with BoxFit.contain. Changing the peek or loop setting rebuilds PageView and returns to slide one because the package fixes its viewport fraction at controller construction.

indicatorStyle chooses dots, line, or none. NibCarouselDot is also exported for a custom indicator arrangement. It receives active, color, and inactiveColor along with style options. It is a visual mark without an onTap callback; changing the indicator style does not change the slide model.

Make automatic movement a deliberate policy

NibCarousel itself defaults autoPlay, loop, and animated to false. This website explicitly enables them, with a four-second interval. The Autoplay and indicator motion setting changes both autoplay and the active-indicator effect. Those are separate package parameters: animated alone does not turn on autoplay or control PageView scrolling.

The example disables autoPlay when its Pause carousel button is active, when the containing TickerMode is disabled, or when MediaQuery.disableAnimations is true. The website motion pause and view-only gallery use TickerMode. Reduced-motion and paused manual navigation use jumpToPage, so the destination remains accessible without a sliding transition. Disposing the widget cancels the package timer and the example disposes its external controller. Hosts must supply their own visibility signal for a carousel merely scrolled off screen.

Preserve logical identity

The artwork is original SVG, rasterized to PNG without a Flutter dependency. The full example embeds those PNG bytes and their semantic descriptions, so copying the code does not depend on website assets or remote image availability. Keep item order stable when only style changes; if the slide count changes, reconcile the selected index and controller.

A carousel is useful for a short ordered sequence. Essential navigation and text should remain accessible without waiting for a timer. Device swipe behavior and frame pacing require device checks beyond this preview.