Skip to main content

Multi-step wizard templates for Flet apps — auth, profile, and gallery showcase

Project description

flet-wizards

PyPI version Python Flet License: MIT

Templates de wizard multi-step prontos para Flet — autenticação, perfil, onboarding e survey. Cada template é uma @ft.component autocontida com estado reativo, sistema de temas dark/light e callback on_complete tipado.


Instalação

pip install flet-wizards

Requer Python 3.12+ e Flet 0.85+.


Uso rápido

import flet as ft
from flet_wizards import AuthLoginWizard, WizardTheme


@ft.component
def App() -> ft.Control:
    async def handle_login(data: dict) -> None:
        email = data["email"]
        # autenticar...

    return AuthLoginWizard(
        theme=WizardTheme.SLATE,
        on_complete=handle_login,
    )


async def main(page: ft.Page) -> None:
    page.padding = 0
    page.bgcolor = "#0B0B0F"
    page.render(App)


ft.run(main)

Todos os wizards são importados a partir da raiz do pacote:

from flet_wizards import (
    AuthLoginWizard, AuthRegisterWizard, AuthRecoveryWizard, AuthTwoFactorWizard,
    ProfileSetupWizard, ProfileEditWizard, ProfileAvatarWizard,
    OnboardingWalkthroughWizard, SurveyFeedbackWizard,
    WizardTheme,
)

Templates disponíveis

Categoria Classe Steps Descrição Docs
auth AuthLoginWizard 2 Login com e-mail e senha + tela de confirmação. docs/auth/login.md
auth AuthRegisterWizard 3 Cadastro com conta, perfil e revisão. docs/auth/register.md
auth AuthRecoveryWizard 3 Recuperação de senha com código de 6 dígitos e força animada. docs/auth/recovery.md
auth AuthTwoFactorWizard 1 Verificação 2FA mobile-first com 6 dígitos individuais. docs/auth/two_factor.md
profile ProfileSetupWizard 3 Onboarding com identidade, bio, interesses e preferências. docs/profile/setup.md
profile ProfileEditWizard 3 Edição com diff visual destacando apenas campos alterados. docs/profile/edit.md
profile ProfileAvatarWizard 3 Avatar via URL ou iniciais com preview ao vivo. docs/profile/avatar.md
onboarding OnboardingWalkthroughWizard 4 Walkthrough mobile fullscreen em 4 slides. docs/onboarding/walkthrough.md
survey SurveyFeedbackWizard 3 Survey conversacional com NPS, comentário e categoria. docs/survey/feedback.md

Os wizards AuthTwoFactorWizard, OnboardingWalkthroughWizard e SurveyFeedbackWizard são mobile-first (Android / iOS). Quando abertos em desktop, o PlatformGuard exibe aviso com botão "Continuar mesmo assim".


Temas

A lib expõe 7 pares de temas, cada um em duas variantes (dark e light), totalizando 14 paletas internas. O dev escolhe pelo nome do par:

Par Dark primary Light primary
Slate #7C6EF6 #6366F1
Emerald #6EE7B7 #059669
Rose #FB7185 #E11D48
Azure #818CF8 #4F46E5
Amber #F59E0B #D97706
Crimson #DE1F26 #B91C1C
Frost #60A5FA #0052FF

Uso direto

from flet_wizards import WizardTheme

AuthLoginWizard(theme=WizardTheme.SLATE)        # variante dark
AuthLoginWizard(theme=WizardTheme.SLATE_LIGHT)  # variante light

Detecção automática (dark/light do sistema)

import flet as ft
from flet_wizards import AuthLoginWizard, WizardTheme
from flet_wizards.core import resolve_theme


@ft.component
def App() -> ft.Control:
    page = ft.context.page
    theme = resolve_theme(WizardTheme.SLATE, page.theme_mode)
    return AuthLoginWizard(theme=theme)

resolve_theme(theme, mode) devolve a variante correta:

  • ft.ThemeMode.DARK → variante dark do par.
  • ft.ThemeMode.LIGHT → variante light do par.
  • ft.ThemeMode.SYSTEM → consulta page.platform_brightness e cai em dark como fallback fora de contexto reativo.

Detalhes em docs/themes.md.


Preview local de desenvolvimento

Para inspecionar os wizards visualmente durante o desenvolvimento:

git clone https://github.com/Alisonsantos77/flet-wizards
cd flet-wizards
uv sync
uv run flet run

Abre uma janela com todos os 9 templates lado a lado, com seletor de tema e modo dark/light. O código do preview vive em src/gallery/ e não faz parte do pacote distribuído no PyPI — é apenas ferramenta de inspeção local.


Demo interativa

Veja todos os templates ao vivo no projeto de demonstração:

flet-wizards-gallery


Contribuindo

Veja CONTRIBUTING.md para instruções de como adicionar templates e convenções do projeto.


Licença

MIT © Alison Santos

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flet_wizards-0.2.3.tar.gz (42.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flet_wizards-0.2.3-py3-none-any.whl (54.5 kB view details)

Uploaded Python 3

File details

Details for the file flet_wizards-0.2.3.tar.gz.

File metadata

  • Download URL: flet_wizards-0.2.3.tar.gz
  • Upload date:
  • Size: 42.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for flet_wizards-0.2.3.tar.gz
Algorithm Hash digest
SHA256 6cd1207839f9d3b849d225686516adeb362cd304576d7125d88cf91ee142100a
MD5 1c0968c41bcd3c991cded7123e8d0721
BLAKE2b-256 8dd7840b6ed55de5d2bfc4a60f7c58dacd6568e6c15172b98134ff7f80243198

See more details on using hashes here.

Provenance

The following attestation bundles were made for flet_wizards-0.2.3.tar.gz:

Publisher: publish.yml on Alisonsantos77/flet-wizards

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flet_wizards-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: flet_wizards-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 54.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for flet_wizards-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 177363c9f61e66955e7b5f59e3992d14d67c933330400a75246b8449e6df8073
MD5 7813b736bcd82141ec9f915d468e7da6
BLAKE2b-256 854c9c198627592bbf33b9cef774473683220cb9e260318fa618fe3014aa9c14

See more details on using hashes here.

Provenance

The following attestation bundles were made for flet_wizards-0.2.3-py3-none-any.whl:

Publisher: publish.yml on Alisonsantos77/flet-wizards

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page