Skip to main content

DrawSVG UI

Tag Build PyPI

This repository provides a graphical user interface designed to make it easier to create files with the drawsvg library.
Instead of writing raw Python code by hand, you can visually place, move, and edit shapes on a canvas, then export your work as a ready-to-use drawsvg file. The UI runs on PySide6 and comes with a property inspector, snapping/grid helpers and a set of ready-made shapes.

The goal of this project is to help users quickly prototype and generate drawsvg code through an intuitive drag-and-drop UI.

DrawSVG UI screenshot

Requirements

The application requires Python 3.10 or newer. Dependencies include:

  • drawsvg
  • PySide6

Install via PyPI

You can install the packaged app and launch it via the generated executable script:

python -m pip install --upgrade drawsvg-ui
drawsvg-ui  # on Windows this is available as drawsvg-ui.exe

Install all via dependencies with:

python -m pip install -r requirements.txt

Running the Application

After installing the dependencies, start the application with:

python src/main.py

UI Features

Canvas and navigation

  • A4 canvas with grid/subgrid preview; toggle visibility via Edit → Show grid.
  • Snap-to-grid movement and resizing; hold Alt to place/drag/resize freely.
  • Automatic extra A4 pages when objects cross page borders; empty pages are cleaned up again.
  • Zoom with Ctrl/Alt + mouse wheel; pan with middle button or right-button drag (right click on empty space resets zoom).
  • Rotation handle above the selection; snaps to 5° steps, hold Alt for smooth rotation with a live angle readout.

Shape palette

  • Drag shapes from the palette or click to drop them at the view center.
  • Shapes: rectangle, rounded rectangle, split rounded rectangle (adjustable header), ellipse/circle, triangle, diamond, line, arrow, block arrow, curvy right bracket, text box, and a folder-tree placeholder.

Editing and layout

  • Rubber-band selection; add to selection with Ctrl/Shift click; duplicate selection with Ctrl + drag.
  • Resize via handles; items snap while moving/resizing unless Alt is held.
  • Align multiple items (left/center/right, top/middle/bottom, snap to grid) from the context menu.
  • Group/ungroup selections (Ctrl+G / Ctrl+Shift+G) and change z-order (bring forward/back).
  • Delete with the Delete key or clear everything via Edit → Clear canvas. Full undo/redo stack (Ctrl+Z, Ctrl+Y / Ctrl+Shift+Z).

Styling, text, and labels

  • Context menu or properties panel to edit fill/stroke color, opacity, stroke width, and line style (solid/dashed/dotted).
  • Corner radius for rectangles; adjustable divider and separate top/bottom fills for split rounded rectangles.
  • Arrowheads on lines/arrows with configurable width/height; block arrow head/shaft ratios; curvy bracket hook depth.
  • Built-in labels for supported shapes: edit text inline or in the properties panel, set font family/size/color, and horizontal/vertical alignment.
  • Text items support multi-line content, font and padding, alignment, and left-to-right or right-to-left direction.

Properties panel

  • Live inspector synced to the current selection: position, rotation, scale, z-value, size, stroke/fill, and shape-specific options.
  • Dedicated text tab for labels/text content including font, color, padding, alignment, and direction controls.

Import/Export

  • Load or save scenes as ready-to-run drawsvg Python files via the File menu.

Version 0.7.0 — local integration candidate

This candidate integrates the editor development from UI_drawsvg into this repository. It adds native .drawsvg project files, connectors, free paths, diagram shapes, layers, clipboard operations, style presets, templates, guides and document lifecycle support. SVG, PDF and configurable PNG export use the shared Qt renderer. The existing canvas hover preview and aligned Python text export are retained.

No release has been published for this integration. See the integration report for validation and remaining release limitations, including the existing Python-export visual-parity gate.

Development checks

python -m pip install -e ".[dev]"
python -m pytest -q
python -m ruff check .
python -m build

License

This project is licensed under the GNU General Public License version 2 or later (GPL-2.0-or-later); see LICENSE.

You may use, modify and distribute this software under the terms of the GPL. Any derivative work must also be distributed under the same license.

Metadata

Release files for drawsvg-ui 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for drawsvg-ui 0.7.0
File Size Uploaded
drawsvg_ui-0.7.0.tar.gz 233.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for drawsvg-ui 0.7.0
File Interpreter ABI Platform
drawsvg_ui-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 413.8 kB

Release files / drawsvg_ui-0.7.0.tar.gz

Download URL drawsvg_ui-0.7.0.tar.gz
Size 233.4 kB
Tags Source
SHA-256 checksum
How to use checksums
04368b58cefe3df66a1d7df35e5e62c75ce3d82c44886c4ff3e8ff8bd2688998
BLAKE2b-256 checksum
How to use checksums
47554af9129a82467e3cc7cc6c8068b5f2a1bb769a2d1982958a42c6217954e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / drawsvg_ui-0.7.0-py3-none-any.whl

Download URL drawsvg_ui-0.7.0-py3-none-any.whl
Size 180.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e5f91aaaa06d1a3f4ea396fcc2286928285519caa42dc6fd86eaa3b56f7a8664
BLAKE2b-256 checksum
How to use checksums
a45a54327a7194727484ba2e20f9305369b78ca9093eee4e80ee9e0c4e3c3e94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

This release

0.7.0 This release

2 release files

0.6.0

2 release files

0.5.5

2 release files

0.5.4

2 release files

0.5.3

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page