fletcarousel


Namefletcarousel JSON
Version 0.0.14 PyPI version JSON
download
home_pagehttps://github.com/naderidev/flet-carousel
SummarySimple carousel sliders for flet framework
upload_time2024-09-12 14:28:21
maintainerNone
docs_urlNone
authornaderidev
requires_python>=3.9
licenseLICENSE
keywords flet carousel slideshow slider python flet-carousel fletcarousel
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Flet simple carousel sliders

This project is a carousel sliders pack with different types for the Flet framework. This project is under development, so in
the future, different types of sliders will be added to the project.

# Installation

````shell
pip install fletcarousel
````
or 
````shell
git clone https://github.com/naderidev/flet-carousel
````

# How to use

There are some types of sliders, so in the following, we will explain each type of them.

### BasicHorizontalCarousel

This type of slider is the basic one. This type is horizontal and there are two buttons to control slides.

![Screenshot of the app](https://raw.githubusercontent.com/naderidev/flet-carousel/master/screenshot1.png "Screenshot")

for example:

````python
BasicHorizontalCarousel(
    page=page,
    items_count=3,
    # auto_cycle=AutoCycle(duration=1),
    items=[
        Container(
            content=Text(value=str(i), size=20),
            height=200,
            width=300,
            bgcolor='red',
            border_radius=15,
            alignment=alignment.center,
        ) for i in range(10)
    ],
    buttons=[
        FloatingActionButton(
            icon=icons.NAVIGATE_BEFORE,
            bgcolor='#1f2127'
        ),
        FloatingActionButton(
            icon=icons.NAVIGATE_NEXT,
            bgcolor='#1f2127'
        )
    ],
    vertical_alignment=CrossAxisAlignment.CENTER,
    items_alignment=MainAxisAlignment.CENTER
)
````

### Properties

``page``

the main page

#### Container properties

1. ``width`` : slider width

2. ``height`` :slider height

3. ``expand`` : filling available space

4. ``tooltip`` : tooltip

5. ``disabled`` : disabled

6. ``padding`` : padding

7. ``margin`` : margin

8. ``alignment`` : alignment

9. ``bgcolor`` : background color

10. ``gradient`` : gradient

11. ``border`` : border

12. ``border_radius`` : border_radius

#### Slider properties

1. ``items`` : the items that you want to be in slide show

2. ``items_count`` : the count of controls in each slide

3. ``vertical_alignment`` : items vertical_alignment

4. ``items_alignment`` : items alignment

5. ``spacing`` : spacing between items

6. ``auto_cycle`` : auto cycleing (Auto changing slides)

7. ``buttons`` : the list of Slider's buttons that must be two buttons! the first one is the "previous" button and the second is the "next" button

#### Methods

1. ``next`` : next slide

2. ``prev`` :  previous slide

3. ``update_items`` :  updating items

4. ``reset_items_index`` :  reseting items index
 
check out the file ``examples/flet_carousel_basic.py``


### BasicAnimatedHorizontalCarousel

This type of slider works with AnimatedSwitcher and unlike "BasicHorizontalCarousel" has no next and prev button but has hint lines.

![Screenshot of the app](https://raw.githubusercontent.com/naderidev/flet-carousel/master/screenshot2.png "Screenshot")

for example:

````python
BasicAnimatedHorizontalCarousel(
    page=page,
    auto_cycle=AutoCycle(duration=2),
    expand=True,
    padding=50,
    hint_lines=HintLine(
        active_color='red',
        inactive_color='white',
        alignment=MainAxisAlignment.CENTER,
        max_list_size=400
    ),
    items=[
        Container(
            content=Text(value=str(i), size=30),
            height=400,
            expand=True,
            bgcolor='red',
            border_radius=15,
            alignment=alignment.center,
        ) for i in range(10)
    ],
)
````

### Properties

``page``

the main page

#### Container properties

1. ``width`` : slider width

2. ``height`` :slider height

3. ``expand`` : filling available space

4. ``tooltip`` : tooltip

5. ``disabled`` : disabled

6. ``padding`` : padding

7. ``margin`` : margin

8. ``alignment`` : alignment

9. ``bgcolor`` : background color

10. ``gradient`` : gradient

11. ``border`` : border

12. ``border_radius`` : border_radius

#### Slider properties

1. ``items`` : the items that you want to be in slider

2. ``hint_lines`` : hint lines settings

3. ``animated_switcher`` : The AnimatedSwitcher settings

4. ``auto_cycle`` : auto cycleing (Auto changing slides)

#### Methods

1. ``next`` : next slide

2. ``prev`` :  previous slide

3. ``update_items`` :  updating items

4. ``go`` :  go to a specific slide
 
check out the file ``examples/animated_horizontal_basic.py``

Hope to enjoy :)

# Donating
- [buy me a coffee](https://www.buymeacoffee.com/mohammadrezaN)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/naderidev/flet-carousel",
    "name": "fletcarousel",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "flet, carousel, slideshow, slider, python, flet-carousel, fletcarousel",
    "author": "naderidev",
    "author_email": "mohammadrezanaderi84@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/cc/9b/ebcb8d72f1dc224f60b4e6ad645e1d28028fa8601b16371b48125f3886ca/fletcarousel-0.0.14.tar.gz",
    "platform": null,
    "description": "# Flet simple carousel sliders\r\n\r\nThis project is a carousel sliders pack with different types for the Flet framework. This project is under development, so in\r\nthe future, different types of sliders will be added to the project.\r\n\r\n# Installation\r\n\r\n````shell\r\npip install fletcarousel\r\n````\r\nor \r\n````shell\r\ngit clone https://github.com/naderidev/flet-carousel\r\n````\r\n\r\n# How to use\r\n\r\nThere are some types of sliders, so in the following, we will explain each type of them.\r\n\r\n### BasicHorizontalCarousel\r\n\r\nThis type of slider is the basic one. This type is horizontal and there are two buttons to control slides.\r\n\r\n![Screenshot of the app](https://raw.githubusercontent.com/naderidev/flet-carousel/master/screenshot1.png \"Screenshot\")\r\n\r\nfor example:\r\n\r\n````python\r\nBasicHorizontalCarousel(\r\n    page=page,\r\n    items_count=3,\r\n    # auto_cycle=AutoCycle(duration=1),\r\n    items=[\r\n        Container(\r\n            content=Text(value=str(i), size=20),\r\n            height=200,\r\n            width=300,\r\n            bgcolor='red',\r\n            border_radius=15,\r\n            alignment=alignment.center,\r\n        ) for i in range(10)\r\n    ],\r\n    buttons=[\r\n        FloatingActionButton(\r\n            icon=icons.NAVIGATE_BEFORE,\r\n            bgcolor='#1f2127'\r\n        ),\r\n        FloatingActionButton(\r\n            icon=icons.NAVIGATE_NEXT,\r\n            bgcolor='#1f2127'\r\n        )\r\n    ],\r\n    vertical_alignment=CrossAxisAlignment.CENTER,\r\n    items_alignment=MainAxisAlignment.CENTER\r\n)\r\n````\r\n\r\n### Properties\r\n\r\n``page``\r\n\r\nthe main page\r\n\r\n#### Container properties\r\n\r\n1. ``width`` : slider width\r\n\r\n2. ``height`` :slider height\r\n\r\n3. ``expand`` : filling available space\r\n\r\n4. ``tooltip`` : tooltip\r\n\r\n5. ``disabled`` : disabled\r\n\r\n6. ``padding`` : padding\r\n\r\n7. ``margin`` : margin\r\n\r\n8. ``alignment`` : alignment\r\n\r\n9. ``bgcolor`` : background color\r\n\r\n10. ``gradient`` : gradient\r\n\r\n11. ``border`` : border\r\n\r\n12. ``border_radius`` : border_radius\r\n\r\n#### Slider properties\r\n\r\n1. ``items`` : the items that you want to be in slide show\r\n\r\n2. ``items_count`` : the count of controls in each slide\r\n\r\n3. ``vertical_alignment`` : items vertical_alignment\r\n\r\n4. ``items_alignment`` : items alignment\r\n\r\n5. ``spacing`` : spacing between items\r\n\r\n6. ``auto_cycle`` : auto cycleing (Auto changing slides)\r\n\r\n7. ``buttons`` : the list of Slider's buttons that must be two buttons! the first one is the \"previous\" button and the second is the \"next\" button\r\n\r\n#### Methods\r\n\r\n1. ``next`` : next slide\r\n\r\n2. ``prev`` :  previous slide\r\n\r\n3. ``update_items`` :  updating items\r\n\r\n4. ``reset_items_index`` :  reseting items index\r\n \r\ncheck out the file ``examples/flet_carousel_basic.py``\r\n\r\n\r\n### BasicAnimatedHorizontalCarousel\r\n\r\nThis type of slider works with AnimatedSwitcher and unlike \"BasicHorizontalCarousel\" has no next and prev button but has hint lines.\r\n\r\n![Screenshot of the app](https://raw.githubusercontent.com/naderidev/flet-carousel/master/screenshot2.png \"Screenshot\")\r\n\r\nfor example:\r\n\r\n````python\r\nBasicAnimatedHorizontalCarousel(\r\n    page=page,\r\n    auto_cycle=AutoCycle(duration=2),\r\n    expand=True,\r\n    padding=50,\r\n    hint_lines=HintLine(\r\n        active_color='red',\r\n        inactive_color='white',\r\n        alignment=MainAxisAlignment.CENTER,\r\n        max_list_size=400\r\n    ),\r\n    items=[\r\n        Container(\r\n            content=Text(value=str(i), size=30),\r\n            height=400,\r\n            expand=True,\r\n            bgcolor='red',\r\n            border_radius=15,\r\n            alignment=alignment.center,\r\n        ) for i in range(10)\r\n    ],\r\n)\r\n````\r\n\r\n### Properties\r\n\r\n``page``\r\n\r\nthe main page\r\n\r\n#### Container properties\r\n\r\n1. ``width`` : slider width\r\n\r\n2. ``height`` :slider height\r\n\r\n3. ``expand`` : filling available space\r\n\r\n4. ``tooltip`` : tooltip\r\n\r\n5. ``disabled`` : disabled\r\n\r\n6. ``padding`` : padding\r\n\r\n7. ``margin`` : margin\r\n\r\n8. ``alignment`` : alignment\r\n\r\n9. ``bgcolor`` : background color\r\n\r\n10. ``gradient`` : gradient\r\n\r\n11. ``border`` : border\r\n\r\n12. ``border_radius`` : border_radius\r\n\r\n#### Slider properties\r\n\r\n1. ``items`` : the items that you want to be in slider\r\n\r\n2. ``hint_lines`` : hint lines settings\r\n\r\n3. ``animated_switcher`` : The AnimatedSwitcher settings\r\n\r\n4. ``auto_cycle`` : auto cycleing (Auto changing slides)\r\n\r\n#### Methods\r\n\r\n1. ``next`` : next slide\r\n\r\n2. ``prev`` :  previous slide\r\n\r\n3. ``update_items`` :  updating items\r\n\r\n4. ``go`` :  go to a specific slide\r\n \r\ncheck out the file ``examples/animated_horizontal_basic.py``\r\n\r\nHope to enjoy :)\r\n\r\n# Donating\r\n- [buy me a coffee](https://www.buymeacoffee.com/mohammadrezaN)\r\n",
    "bugtrack_url": null,
    "license": "LICENSE",
    "summary": "Simple carousel sliders for flet framework",
    "version": "0.0.14",
    "project_urls": {
        "Homepage": "https://github.com/naderidev/flet-carousel"
    },
    "split_keywords": [
        "flet",
        " carousel",
        " slideshow",
        " slider",
        " python",
        " flet-carousel",
        " fletcarousel"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "07e1130c98a494f802ed1e6e94aa39327c4712e6ca9d05c746592f5bc36dcc40",
                "md5": "8071a37d4aa65e80696d795303eb0561",
                "sha256": "66bcecc1423d34263cffbe364866be5dfa21ed83606930cdc5ffdd1fb9303a56"
            },
            "downloads": -1,
            "filename": "fletcarousel-0.0.14-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8071a37d4aa65e80696d795303eb0561",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 6992,
            "upload_time": "2024-09-12T14:28:20",
            "upload_time_iso_8601": "2024-09-12T14:28:20.433751Z",
            "url": "https://files.pythonhosted.org/packages/07/e1/130c98a494f802ed1e6e94aa39327c4712e6ca9d05c746592f5bc36dcc40/fletcarousel-0.0.14-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cc9bebcb8d72f1dc224f60b4e6ad645e1d28028fa8601b16371b48125f3886ca",
                "md5": "b6a305c59b18d88dae0432b01bab4d2d",
                "sha256": "cc3a97b803e8fb41d652c9cdfc247ee69c1670e9bbdf6dd20a9a2c3a2192c0c9"
            },
            "downloads": -1,
            "filename": "fletcarousel-0.0.14.tar.gz",
            "has_sig": false,
            "md5_digest": "b6a305c59b18d88dae0432b01bab4d2d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 7428,
            "upload_time": "2024-09-12T14:28:21",
            "upload_time_iso_8601": "2024-09-12T14:28:21.631042Z",
            "url": "https://files.pythonhosted.org/packages/cc/9b/ebcb8d72f1dc224f60b4e6ad645e1d28028fa8601b16371b48125f3886ca/fletcarousel-0.0.14.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-12 14:28:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "naderidev",
    "github_project": "flet-carousel",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "fletcarousel"
}
        
Elapsed time: 0.33172s