Skip to content

Icon Columns

Icon tables allow you to render a (lucide) icon within a table row.

You can create an Icon column as so:

go
IconColumn("icon")

Icon

The Icon method allows you to specify what icon to render inside each row.

go
import "github.com/iridiumgo/iridium-icons/icon/icons"

// static
IconColumn("icon").
    Icon(icons.Atom)

// callback
IconColum("icon").
    IconFn(
        func (ctx CellContext) *icon.Icon {
            return icons.Atom
        }
    )

Customizing your icon

In order to vary say the icon's colour, or other properties, you need to directly change the Icon you provide to the Icon method. There are no hooks on the IconColumn struct for customizing your icon

You can learn more about this in our icons section

Released under the MIT License.