SLI UI Toolkit
Reusable PySide6 widgets and UI infrastructure for compact desktop tools.
SLI stands for Shared Lightweight Interface. Host-specific icons, translations, resources, and business logic stay outside the library.
What Is Included
- custom-painted compact controls: buttons, inputs, switches, sliders, labels;
- a unified
Buttonsystem with icons, text, toggle, scroll, menu, long-press, ripple, and multi-region split layouts; - reusable composite widgets: flyouts, dialog shells, markdown help, timelines, toasts, lists, charts;
- theme-aware painting through
ThemeManagertokens; - app-injected hooks for icons, i18n, overlay placement, and timing.
Install
For development from this repository:
python -m venv .venv
source .venv/bin/activate
python -m pip install -U pip
python -m pip install -e ".[dev]"
For use as a dependency:
python -m pip install sli-ui-toolkit
Run The Demo
From the repository root:
python -m demo
The demo opens a PyQt window with widget pages for buttons, inputs, lists, dialogs, flyouts, charts, feedback, and miscellaneous primitives.
If you run on a headless machine, set Qt's platform first:
QT_QPA_PLATFORM=offscreen python -m demo
Run Tests
pytest tests/
The test suite uses pytest-qt and defaults to offscreen Qt through
tests/conftest.py.
Basic Use
Most application code should import from sli_ui_toolkit.widgets.
from PySide6.QtWidgets import QApplication, QVBoxLayout, QWidget
from sli_ui_toolkit.theme import ThemeManager
from sli_ui_toolkit.widgets import Button, ComboBox
app = QApplication([])
theme = ThemeManager.get_instance()
theme.set_theme("light", app)
window = QWidget()
layout = QVBoxLayout(window)
save = Button("save", text="Save", variant="surface")
mode = ComboBox()
mode.addItems(["Fast", "Balanced", "Quality"])
layout.addWidget(save)
layout.addWidget(mode)
window.show()
app.exec()
App Configuration Hooks
Hosts can inject app-specific behavior at startup:
configure_icon_resolver(...)Supplies icon lookup for app icon enums, names, or resources.configure_toolkit(...)Supplies overlay placement and timing defaults for flyouts and popups.ThemeManager.get_instance().register_palettes(...)/.set_theme(...)Registers color tokens and picks the active light/dark theme.configure_i18n(...)Supplies translation roots and language handling.setup_logging(...)Routes toolkit log records into the host app's own logger/handlers.install_application_tooltips(app)Installs the toolkit's themed hover-tooltip behavior app-wide.
Minimal apps can use bundled toolkit icons, the built-in palette, and English strings, and skip all of these hooks. Larger host apps should configure them once during startup — see Configuration Guide for the full startup sequence, every parameter, and what happens if a hook is skipped.
Public Import Layers
sli_ui_toolkitBootstrap/configuration helpers and common primitives.sli_ui_toolkit.widgetsMain public widget catalog. Prefer this for application UI.sli_ui_toolkit.themeThemeManager.sli_ui_toolkit.iconsIcon resolver configuration.sli_ui_toolkit.i18nTranslation manager and helpers.sli_ui_toolkit.managersFlyout and timer helpers.sli_ui_toolkit.servicesUtility services such as prewarm helpers.
Everything under sli_ui_toolkit.ui... is implementation detail first. Use it
inside toolkit internals, or only when no public export exists yet.
Documentation
- User docs
- Configuration guide
- Full public API
- Button API
- Developer docs
- Architecture
- Design language
- Docs index
Development Notes
- Keep host-app behavior outside the toolkit. Pass behavior through callbacks, signals, configuration hooks, or plain data objects.
- Resolve colors and sizes through
ThemeManager, widget properties, or documented tokens. - Update docs when changing public widget behavior or public API.
- Run
pytest tests/before tagging a release.
Caveats
ComboBoxis custom-painted; it is not a fullQComboBoxdrop-in replacement.- The toolkit is designed around custom-painted controls, not QSS-skinned stock widgets.
- Light and dark themes are both first-class. Avoid hard-coded colors in custom widgets; use theme tokens.
License
MIT — see LICENSE for details.
Metadata
Release files for sli-ui-toolkit 4.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sli_ui_toolkit-4.0.1.tar.gz | 1.1 MB | With provenance | Details for sli_ui_toolkit-4.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sli_ui_toolkit-4.0.1-py3-none-any.whl | Python 3 | none | any | Details for sli_ui_toolkit-4.0.1-py3-none-any.whl |
Total release size: 2.0 MB
Release files / sli_ui_toolkit-4.0.1.tar.gz
| Download URL | sli_ui_toolkit-4.0.1.tar.gz |
|---|---|
| Size | 1.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
01bf29b0ae23fcffed3c8039b562934a88f58a8faad347fbd34435f608a570b6
|
|
BLAKE2b-256 checksum How to use checksums |
45fd39e96b4e80bf17f93ff2612b4bec5d5674f77a3e8f909da5962d8c122d16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logRelease files / sli_ui_toolkit-4.0.1-py3-none-any.whl
| Download URL | sli_ui_toolkit-4.0.1-py3-none-any.whl |
|---|---|
| Size | 917.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d366e344e3ae38bb4d2197fa13d4386c34b252ae740e76aa6694421402e8b609
|
|
BLAKE2b-256 checksum How to use checksums |
cf8868aa60d8cfb0a2db694a28defe9f876760ac36b6c8120bdc77a015cc3520
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logSecurity for sli-ui-toolkit 4.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for sli_ui_toolkit-4.0.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.