icons

package
v0.9.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2026 License: EPL-2.0 Imports: 14 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromSVG

func FromSVG(a *gowt.App, data []byte, size int, c gowt.RGB) *gowt.Image

FromSVG returns an image size x size points drawn from the SVG document data at every zoom, with currentColor in c (Lucide, Tabler and other monochrome icons). Images are cached per document, size and colour like Get's: calling FromSVG again with the colour of the new theme makes a new image only for a colour not seen before. The App owns the image like every gowt.Image.

func Get

func Get(a *gowt.App, name string, opts ...Option) *gowt.Image

Get returns the named icon from the system set of the current OS (SF Symbols, Segoe Fluent Icons, freedesktop symbolic icons), or from the embedded Lucide set when the system has none. The result is drawn at every zoom and tinted for the theme at call time: after App.OnThemeChange call Get again (the old image keeps its colour). Images are cached per name, size and colour and owned by the App like every gowt.Image; after a Dispose, Get makes the image again. It panics on an unknown name; Names lists the valid ones.

func Names

func Names() []string

Names lists the names Get accepts, sorted.

Types

type Option

type Option func(*iconConfig)

Option adjusts Get.

func Color

func Color(c gowt.RGB) Option

Color sets the tint; by default light gray in dark mode and near-black in light mode.

func Size

func Size(points int) Option

Size sets the icon's side in points (default 16).

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL