Skip to content

Icons

Pyzed bundles the Lucide font (ISC license) with about 2000 icons. Search names with pyzed icons <filter> or on the Lucide website.

icon(name, *, size=16, color=None)

An icon widget. Also available as pyzed.icon.

Parameter Description
name Icon name.
size Size.
color Color (defaults to the text color).
glyph(name)

Returns an icon’s character, to use in any text with font="icons". Raises ValueError if it doesn’t exist.

Parameter Description
name Icon name.
names()

Sorted list of all icon names.

search(query, among=None)

Icons matching a search by name and tag, best first: exact names, then names that start with the query, names with every word and icons found by their tags (search("person") finds user).

Parameter Description
query Words that must all appear in the name or the tags.
among Only search these names (default: every icon).
icons.search("arrow up")[:3] # ["arrow-up", "arrow-up-01", "arrow-up-10"]
tags(name)

The search tags of an icon, from Lucide (tags("user") is ["person", "account", "contact"]).

Parameter Description
name Icon name.
category(key, among=None)

The icons of a category of CATEGORIES, sorted. An icon can be in several.

Parameter Description
key A key of CATEGORIES ("arrows", "files", "people"…).
among Only look at these names.

Groups for browsing icons (arrows, text, files, layout, media, communication, people, devices, development, shapes, weather, commerce, maps, status), each with the words of names and tags that put an icon in it.

for_file(name)

Returns (icon, color_or_None) for a file name, as in the project panel of a code editor.

Parameter Description
name File name.
language_for(name)

Human-readable language name of a file ("main.py" → "Python"), handy for the status bar.

Parameter Description
name File name.