Bus UI Actions

Icon renders shared SVG symbols.

Use Icon when a component needs a standalone symbol from the shared icon catalog or an audited custom path.

Public API

Functionui.Icon
Propsui.IconProps
Catalogui.IconPathCatalog

Example

Loading Icon demo...

Go API

import ui "github.com/busdk/bus-ui/pkg/ui"

node, err := ui.Icon(ui.IconProps{
  Name:  ui.IconNameRefresh,
  Title: "Refresh",
})

.gx source

package actionsui

import gx "github.com/busdk/bus-gx/pkg/gx"

type IconProps struct { Label string }

func RefreshIcon(props IconProps) gx.Node {
  return <svg class="bus-ui-svg-icon" role="img" aria-label={props.Label} viewBox="0 0 24 24">
    <title><Text value={props.Label}></Text></title>
    <path d="M20 11a8 8 0 1 0-2.34 5.66"></path>
  </svg>
}

var icon = <RefreshIcon label={"Refresh"}></RefreshIcon>