Package: icons

Bootstrap Icons and Boxicons as renderable Go tags — no icon font or SVG spriting needed.

Package: icons

Bundled SVG icon sets rendered as Go tags — currently Bootstrap Icons 1.13.1 and Boxicons 2.1.4 — so icons can be emitted inline without pulling an icon font or maintaining SVG sprites.

Repository: https://github.com/dracory/icons

Installation

go get github.com/dracory/icons

Usage

package main

import (
    "github.com/dracory/icons"
)

func main() {
    // As an HB tag — embed in any hb tree
    iconTag := icons.Icon("bi-globe", 120, 120, "white")

    // As raw HTML
    iconHTML := icons.Icon("bi-globe", 120, 120, "white").ToHTML()

    _ = iconTag
    _ = iconHTML
}

Features

  • Bootstrap Icons 1.13.1 and Boxicons 2.1.4 bundled (MIT licensed).
  • Returns hb.TagInterface — composes with the HTML builder directly.
  • Inline SVG output — no runtime font/CSS dependency.