# NiceGUI

> Open-source Python UI framework that renders web-based interfaces in the browser from pure Python code.

NiceGUI is an open-source Python library from Zauberzeug for building graphical user interfaces that run in the browser. You write buttons, dialogs, charts, tables and 3D scenes as Python code, and NiceGUI handles the web layer. It is distributed via PyPI, conda-forge and Docker, and the latest release listed is v3.18.0.

## What It Is

NiceGUI is a backend-first UI framework: all UI logic lives in Python while the framework manages HTML, CSS and JavaScript details. The docs describe it as suited to short scripts, dashboards, robotics projects, IoT, smart home automation and machine learning work. An app is a single script that assembles elements into pages and calls `ui.run()` to start a local server, which can be opened in a browser or in a native window.

## How It Works

UI elements are arranged declaratively using Python's `with` statement. User interactions trigger events handled by Python functions, and elements can be bound to data models so the interface updates automatically. Styling uses Tailwind CSS classes, Quasar props and custom CSS. The framework runs on an async event loop, with helpers for running CPU-bound and IO-bound work without blocking the UI.

## Components and Capabilities

The documentation lists over a hundred elements, including inputs, dialogs, menus, tables, AG Grid, ECharts, Plotly, Matplotlib, Leaflet maps, 3D scenes, joysticks, audio and video. Additional features include sub-pages for single-page apps, per-user and general storage, auto-reload on code change, and lifecycle hooks. Custom routes can be added through FastAPI.

## Testing and Deployment

A pytest-based testing framework offers a `screen` fixture using a real headless browser and a faster `user` fixture that simulates interaction at the Python level. Apps can run locally, on a server serving many clients, in native mode, or through a multi-arch Docker image. The stack builds on Vue, Quasar, FastAPI, Starlette and Uvicorn, and requires Python 3.10+.

## AI Assistant Support

The project ships an LLM reference at nicegui.io/llms.txt and a machine-readable JSON documentation index that AI assistants or RAG pipelines can use when generating NiceGUI code.

## Features
- Browser-based GUI written entirely in Python
- 100+ UI elements including buttons, dialogs, tables, charts and 3D scenes
- Reactive data binding and refreshable functions
- Auto-reload on code change
- Native window mode
- Single-page apps with ui.sub_pages
- Per-user and general persistent storage
- Tailwind CSS and Quasar customization
- Pytest-based testing framework with screen and user fixtures
- Custom FastAPI routes
- Jupyter Notebook support
- Docker image
- LLM reference and machine-readable documentation index

## Integrations
FastAPI, Vue, Quasar, Tailwind CSS, Plotly, Matplotlib, ECharts, Highcharts, AG Grid, Leaflet, pytest, Docker, Jupyter, PyPI, conda-forge

## Platforms
WINDOWS, MACOS, LINUX, WEB, API, DEVELOPER_SDK, CLI

## Pricing
Open Source

## Version
v3.18.0

## Links
- Website: https://nicegui.io
- Documentation: https://nicegui.io/documentation
- Repository: https://github.com/zauberzeug/nicegui
- EveryDev.ai: https://www.everydev.ai/tools/nicegui
