Multi-step wizard templates for Flet apps — auth, profile, and gallery showcase
Project description
flet-wizards
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→ consultapage.platform_brightnesse 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:
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cd1207839f9d3b849d225686516adeb362cd304576d7125d88cf91ee142100a
|
|
| MD5 |
1c0968c41bcd3c991cded7123e8d0721
|
|
| BLAKE2b-256 |
8dd7840b6ed55de5d2bfc4a60f7c58dacd6568e6c15172b98134ff7f80243198
|
Provenance
The following attestation bundles were made for flet_wizards-0.2.3.tar.gz:
Publisher:
publish.yml on Alisonsantos77/flet-wizards
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flet_wizards-0.2.3.tar.gz -
Subject digest:
6cd1207839f9d3b849d225686516adeb362cd304576d7125d88cf91ee142100a - Sigstore transparency entry: 1540311630
- Sigstore integration time:
-
Permalink:
Alisonsantos77/flet-wizards@10ba51791e79f526aab739857e01c942d61cc650 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/Alisonsantos77
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@10ba51791e79f526aab739857e01c942d61cc650 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
177363c9f61e66955e7b5f59e3992d14d67c933330400a75246b8449e6df8073
|
|
| MD5 |
7813b736bcd82141ec9f915d468e7da6
|
|
| BLAKE2b-256 |
854c9c198627592bbf33b9cef774473683220cb9e260318fa618fe3014aa9c14
|
Provenance
The following attestation bundles were made for flet_wizards-0.2.3-py3-none-any.whl:
Publisher:
publish.yml on Alisonsantos77/flet-wizards
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flet_wizards-0.2.3-py3-none-any.whl -
Subject digest:
177363c9f61e66955e7b5f59e3992d14d67c933330400a75246b8449e6df8073 - Sigstore transparency entry: 1540311756
- Sigstore integration time:
-
Permalink:
Alisonsantos77/flet-wizards@10ba51791e79f526aab739857e01c942d61cc650 -
Branch / Tag:
refs/tags/v0.2.3 - Owner: https://github.com/Alisonsantos77
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@10ba51791e79f526aab739857e01c942d61cc650 -
Trigger Event:
push
-
Statement type: