Skip to content

Icon

Icons provide additional context to elements on the page.

Overview

Icon displays from a set of simple, square icons. Nebula includes a limited set which can be edited and expanded.

Register icons

There are a set of icons which correspond to the timing categories of registers supported by Kaluza, which are part of the default set.

Note that 'interval' and 'smart' are the same icon, since smart meters in EU are known as 'interval' meters in the AP region.

Usage

Icons should be paired with text, do not assume that the icon alone will be understood by everyone. On web it is recommended to use ems for icon sizes, so they should match the size of the text automatically (and responsively!).

Accessibility

Icons cannot be “read” by screen readers so they should be paired them with text and considered as purely decorative.

Variations

Icons will generally inherit the colour and size of their parent, but these can also be set manually.

Custom colour

Custom size

Customising icons

All custom icons should be on a square canvas and use "currentColor" as the default fill color. Props should be spread on the "svg" element.

You can override existing icons or add new icons by adding the IconProvider around your app:

You can also use an svg file directly:

Using Material UI icons (opens in new window)  takes a little mapping of their props to work with the Icon component.

Properties

NameValuesDefault

name

IconName

size

NumberString

1em

color

String

...

JSX.IntrinsicElements["svg"]

Tokens