fletcarousel


Namefletcarousel JSON
Version 0.0.12 PyPI version JSON
download
home_pagehttps://github.com/naderidev/flet-carousel
SummarySimple carousel sliders for flet framework
upload_time2023-02-09 19:28:48
maintainer
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

![PyPI - Downloads](https://img.shields.io/pypi/dm/fletcarousel)

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_swicher`` : 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 :)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/naderidev/flet-carousel",
    "name": "fletcarousel",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "flet,carousel,slideshow,slider,python,flet-carousel,fletcarousel",
    "author": "naderidev",
    "author_email": "mohammadrezanaderi84@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/28/dd/1f6e0e6b4160260fbdf710e8a4a6f6d9c7746d70bb843da400e54926852c/fletcarousel-0.0.12.tar.gz",
    "platform": null,
    "description": "# Flet simple carousel sliders\r\n\r\n![PyPI - Downloads](https://img.shields.io/pypi/dm/fletcarousel)\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_swicher`` : 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",
    "bugtrack_url": null,
    "license": "LICENSE",
    "summary": "Simple carousel sliders for flet framework",
    "version": "0.0.12",
    "split_keywords": [
        "flet",
        "carousel",
        "slideshow",
        "slider",
        "python",
        "flet-carousel",
        "fletcarousel"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ff4fb322349a105a0b81500c3829d51ad8abcd6355038525947767527e739b3c",
                "md5": "5355d26b5161cdd88b39c4a8a00ead1f",
                "sha256": "f314b925b57066d28a8dccdb546e70fe19478a1eb6846e8a1e1610823517e93b"
            },
            "downloads": -1,
            "filename": "fletcarousel-0.0.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5355d26b5161cdd88b39c4a8a00ead1f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 7099,
            "upload_time": "2023-02-09T19:28:46",
            "upload_time_iso_8601": "2023-02-09T19:28:46.103800Z",
            "url": "https://files.pythonhosted.org/packages/ff/4f/b322349a105a0b81500c3829d51ad8abcd6355038525947767527e739b3c/fletcarousel-0.0.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "28dd1f6e0e6b4160260fbdf710e8a4a6f6d9c7746d70bb843da400e54926852c",
                "md5": "fb0c46252fda77934dd03713a3e8a0fd",
                "sha256": "063fe4742a157e547185083dcfeb59ccc1f9dd8eb64d1884e8a63c093f9038ab"
            },
            "downloads": -1,
            "filename": "fletcarousel-0.0.12.tar.gz",
            "has_sig": false,
            "md5_digest": "fb0c46252fda77934dd03713a3e8a0fd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 7506,
            "upload_time": "2023-02-09T19:28:48",
            "upload_time_iso_8601": "2023-02-09T19:28:48.148219Z",
            "url": "https://files.pythonhosted.org/packages/28/dd/1f6e0e6b4160260fbdf710e8a4a6f6d9c7746d70bb843da400e54926852c/fletcarousel-0.0.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-09 19:28:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "naderidev",
    "github_project": "flet-carousel",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "fletcarousel"
}
        
Elapsed time: 0.04587s