iconoir

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0

README

iconoir

The Iconoir icon set (MIT), embedded as SVG and keyed by the icon's own name — for pure-Go UIs that render their own icons.

import "github.com/go-icons/iconoir"

svg := iconoir.Icon("zoom-in") // the Iconoir zoom-in glyph, as an SVG string

Icon(name) returns the line ("regular") icon by name (zoom-in, folder, undo, settings, nav-arrow-left, …), or "" when unknown; Has and Names enumerate the full set.

It is a data package: it returns SVG strings and draws nothing. Rendering is a separate concern — a renderer such as go-widgets/toolkit's SVGIcon, over the go-gfx SVG rasteriser, turns the SVG into a glyph. Iconoir icons stroke in currentColor, so the renderer's ink recolours them.

Licence

The Go code is BSD-3-Clause (LICENSE). The embedded Iconoir artwork is MIT (ICONOIR-LICENSE) — redistributed unmodified.

Documentation

Overview

Package iconoir serves the Iconoir icon set (iconoir.com, MIT — see ICONOIR-LICENSE) as SVG documents keyed by the icon's own name.

It is a DATA package: it embeds the Iconoir line ("regular") SVGs and returns one by name; it draws nothing. Rendering is a separate concern — a renderer such as go-widgets/toolkit's SVGIcon (over the go-gfx SVG rasteriser) turns the returned SVG into a glyph. Iconoir icons stroke in currentColor, so the renderer's ink recolours them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Has

func Has(name string) bool

Has reports whether name is a known icon.

func Icon

func Icon(name string) string

Icon returns the SVG document for the Iconoir icon named name (e.g. "zoom-in", "folder", "nav-arrow-left"), or "" when the name is not in the set.

func Names

func Names() []string

Names lists every embedded icon name, sorted.

Types

This section is empty.

Jump to

Keyboard shortcuts

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