material

package module
v0.1.1 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

material-icons

ci coverage Go Reference License

File-type icons from the Material Icon Theme (by Material Extensions, MIT), as embedded SVG documents keyed by file name — for pure-Go UIs that render their own icons.

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

svg := material.Icon("paper.tex") // the Material .tex glyph, as an SVG string
dir := material.Folder()          // the folder glyph

Icon(filename) matches by exact base name first, then by extension, then falls back to a generic document. It is a data package: it returns SVG strings and draws nothing. A renderer such as go-widgets/toolkit's SVGIcon turns the SVG into a drawn glyph.

Licence

The Go code is BSD-3-Clause (LICENSE). The embedded Material Icon Theme artwork is MIT, © Material Extensions (MATERIAL-LICENSE.md) — redistributed unmodified.

Documentation

Overview

Package materialicons serves file-type icons from the Material Icon Theme (by Material Extensions, MIT — see MATERIAL-LICENSE.md), as SVG documents keyed by file name.

It is a data package: a curated subset of the icons is embedded, and Icon maps a file name to the best-matching SVG (falling back to a generic document), Folder returns the folder glyph. A renderer such as go-widgets/toolkit's SVGIcon turns the returned SVG into a drawn glyph; this package draws nothing itself.

Index

Constants

View Source
const Name = "Material"

Name is the human label a picker shows for this pack.

Variables

This section is empty.

Functions

func Folder

func Folder() string

Folder returns the SVG document for a directory.

func Icon

func Icon(filename string) string

Icon returns the SVG document for the file named filename (any path — only the base name matters), matching by exact name first, then by extension, then a generic document.

Types

This section is empty.

Jump to

Keyboard shortcuts

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