functions

Icon
Edited: Sunday 25 January 2026

Icon

Category: Utilities
File: components.go
Package: ui

Signature

1func Icon(b []byte, color color.NRGBA) W

Description

Icon creates a widget from icon bytes with the specified color.
Uses Material Design icons from golang.org/x/exp/shiny/materialdesign/icons.

Example:

import "golang.org/x/exp/shiny/materialdesign/icons"
iconWidget := Icon(icons.ActionHome, color.NRGBA{R: 255, A: 255})

The icon is automatically sized to match the current theme font size.

Examples

Icon

1{
2	_ = IconCheckbox
3}

Example Output


This documentation is auto-generated. To update, run make docs

Backlinks