Skip to content

JarriqTheTechie/Flet_Carousel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Flet Carousel

A functional carousel widget for flet framework.

Allows user to swipe or click through a list of images.

Parameters:
    images (List[str]): List of image URLs
    shuffle (bool): Shuffle the images
    active_color (str): Color of the active dot
    inactive_color (str): Color of the inactive dots

Returns:
    Carousel: Carousel Widget
from carousel import Carousel
import flet as flet

carousel_images = list(
    [
        "https://cookinglsl.com/wp-content/uploads/2019/02/chocolate-dipped-strawberries-wide-1.jpg",
        "https://cdn.shopify.com/s/files/1/2305/2515/products/IMG_0746_3024x.jpg",
        "https://www.coleinthekitchen.com/wp-content/uploads/2022/11/Small-Charcuterie-Board-6.jpg",
        "https://media-cldnry.s-nbcnews.com/image/upload/newscms/2021_18/1712998/strawberry-shortcake-kb-main-210505.jpg"
    ]
)

def main(page: ft.Page):
    page.add(
        Carousel(carousel_images, shuffle=True)
    )
    page.update()

``

About

A functional carousel widget for flet framework.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages