Skip to main content

flet-m3-carousel

Demo

A Flet extension that wraps the Flutter m3_carousel package and exposes it as the M3Carousel layout control.

The carousel layout and animation are delegated to the upstream package. This wrapper does not reimplement them.

Platform support

Tested on Linux desktop. Other platforms are supported by the upstream package but were not tested here.

Platform Status
Linux Tested
Windows Not tested
macOS Not tested
Web Not tested
iOS Not tested
Android Not tested

Installation

Install the Python package:

pip install flet-m3-carousel

The Flutter side is built into the Flet client. After changing Dart code, rebuild the client.

Quick start

import flet as ft
from flet_m3_carousel import M3Carousel, M3CarouselItem


def main(page: ft.Page):
    page.add(
        M3Carousel(
            height=320,
            layout="hero",
            axis="horizontal",
            hero_alignment="center",
            items=[
                M3CarouselItem(key="mountains", image="assets/mountains.jpg", title="Mountains"),
                M3CarouselItem(key="city", image="assets/city.jpg", title="City"),
                M3CarouselItem(key="ocean", image="assets/ocean.jpg", title="Ocean"),
            ],
            on_tap=lambda e: print(e.index, e.item_key),
        )
    )


ft.run(main)

Layouts

Value Upstream type Description
hero M3CarouselType.hero One large item with small peeking neighbors.
contained M3CarouselType.contained Items stay contained in the content area.
uncontained M3CarouselType.uncontained Items scroll to the container edge.
uncontainedMultiAspect M3CarouselType.uncontainedMultiAspect Uncontained items with their own widths.
fullScreen M3CarouselType.fullScreen One edge to edge item, scrolled vertically.

Events

  • on_tap: fires when an item is tapped. Payload has index (zero based) and item_key.
  • on_change: fires when the focal item changes after scrolling. Payload has index and item_key.

Demo

A runnable example is in examples/flet_m3_carousel_example. Build and run it with:

cd examples/flet_m3_carousel_example
flet build linux
flet run

Compatibility

This package follows Flet's extension model. Build the client after changing Dart code. Python-only changes do not require a rebuild.

Known limitations

  • Item content is image-based. Arbitrary Flet controls are not supported as item content.
  • Autoplay, infinite looping, custom physics, and custom spring curves are not exposed by the upstream package.
  • Asset images must be declared in the app pubspec.yaml. A Python relative path is not a Flutter asset path.

License

MIT for this wrapper. The upstream package is also MIT licensed.

Metadata

Release files for flet-m3-carousel 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flet-m3-carousel 0.1.0
File Size Uploaded Provenance
flet_m3_carousel-0.1.0.tar.gz 11.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for flet-m3-carousel 0.1.0
File Interpreter ABI Platform
flet_m3_carousel-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.3 kB

Security for flet-m3-carousel 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for flet_m3_carousel-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page