simpleicons

package module
v0.1.0 Latest Latest
Warning

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

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

README

simple-icons

ci coverage Go Reference License

The Simple Icons brand-logo set (CC0-1.0), embedded as SVG and keyed by the icon's own name — for pure-Go UIs that render their own icons.

import simpleicons "github.com/go-icons/simple-icons"

svg := simpleicons.Icon("reddit") // the Reddit logo, as an SVG string

Icon(name) returns the brand glyph by name (reddit, instagram, x, mastodon, bluesky, rss, …), 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. Simple Icons are single-path monochrome fills, so the renderer's ink recolours them.

Licence

The Go code is BSD-3-Clause (LICENSE). The embedded Simple Icons artwork is CC0-1.0 (SIMPLE-ICONS-LICENSE) — redistributed unmodified. Brand names and logos are trademarks of their respective owners.

Documentation

Overview

Package simpleicons serves the Simple Icons brand-logo set (simpleicons.org, CC0-1.0 — see SIMPLE-ICONS-LICENSE) as SVG documents keyed by the icon's own name.

It is a DATA package: it embeds the Simple Icons 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. Simple Icons are single-path monochrome fills, 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 Simple Icons glyph named name (e.g. "reddit", "instagram", "x", "mastodon"), 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