Adaptable Icon

Summary

  • The Adaptable Icon object enables the provision of customizable icons
  • Icons are very widely used in Adaptable including in Buttons, Menus, and Badge Style
  • An AdapTable Icon can be one of 3 types:
    • a System icon provided by AdapTable
    • a Custom icon provided by a developer
    • an HTML element provided by a developer

The Adaptable Icon is used in many places in AdapTable including:

AdapTable Icons can be styled as needed.

Types of Adaptable Icon

An Adaptable Icon definition (of type AdaptableIcon) can be one of 3 types:

System Icon

AdapTable provides a number of SVG icons that can be used in various use cases.

This is done by simply referencing the name of the icon.

Note

The full list of available AdapTable Icons - with their names - is provided in the Appendix to this page

Optionally the size of the icon may be specified.

Deep Dive

The System Icon Definition

System Adaptable Icons
Fork
  • This demo leverages a number of different System Icons which are used in various ways:
    • an Application Icon (see below for more details) that uses the home System Icon
    • 2 Custom Predicates (Popular & Vanilla on the Name & Language columns) using the broadcast and check-circle System Icons
    • 3 Custom Toolbar Buttons which show the 2 Custom Predicates described above (and the same System Icons) plus a Clear button (that uses close System Icon)
    • a Dashboard Button to switch Themes that uses the theme system icon
    • a Badge Style on the Language column that uses the assignment System Icon
    • a User Context Menu Item (Expand / Collapse Dashboard) that uses expand and collapse System Icons
    • a User Column Menu Item to set System Status that uses traffic-lights,error, warning, checked and info System Icons

Custom Icon

Where the System Icons are insufficient, Custom Icons may be provided by developers.

Technically, the icon will be rendered as an <img> element with the provided src attribute.

The src attribute of the <img> element may be a relative, or absolute, path to any supported image format.

Alternatively, the image can be an SVG format if required.

Custom Icons can be configured in 2 ways:

  • "in-place", directly provided when needed (e.g. when defining a Button)
  • via the customIcons property in User Interface Options and then referenced by name when needed

Hint

  • An advantage of providing a customIcons collection is that you can easily re-use the same Icon in multiple places
  • Another advantage is that run-time users can select these Icons in the UI (e.g. when creating a Badge Style)

customIcons

Bespoke Icons that can be used in AdapTable (e.g. in Badge Styles and Buttons)
Custom Adaptable Icons
Fork

HTML Element Icon

This option allows users to provide the Icon as a DOM element or HTML string.

Deep Dive

The Element Icon Definition

Element Icons
Fork
  • In this example we provide an Icon as an HTML Element, which we use in the button in the toolbar

Styling Icons

The style of an Adaptable Icon - for both system or custom icons - may be customized with the following common properties, defined by AdaptableBaseIcon:

PropertyDescription
classNameThe class name of the icon
styleCSS Properties

Application Icon

AdapTable allows users to supply an Application Icon which can be used in multiple places:

  • Dashboard
  • Settings Panel
  • Anywhere where Icons are displayed (e.g Buttons)

This is provided in the applicationIcon property in User Interface Options.

applicationIcon

Icon to display in Dashboard, Notifications and elsewhere
Application Icon
Fork
Try It Out
  • Change the value of any cell to trigger the Alert: note the Application Icon in the Toast Notification
  • Open the Settings Panel and see the Application Icon displayed

Appendix: AdapTable Icon Library

This is the full list of System Icons available in AdapTable.

add
add-circle
alert
align-center
align-justify
align-left
align-right
arrow-down
arrow-down-long
arrow-expand
arrow-left
arrow-right
arrow-up
arrow-up-long
assignment
badge
bold
boolean-list
brain
broadcast
brush
building
calculated-column
calendar
call
case-lower
case-sentence
case-upper
cells
chart
chat
check
check-circle
checked
clipboard
clone
close
cloud-upload
collapse
collapse-all
color-palette
column-add
column-outline
columns
comment
comments
contact
contains
copy
csv
dashboard
data-set
date-range
delete
division
dock
dollar
download
downloaded
drag
edit
edit-table
ends-with
equals
equation
error
excel
expand
expand-all
exponent
export
export-data
fast-backward
fast-forward
fdc3
filled-circle
filter
filter-list
filter-off
flag
folder
folder-open
folder-shared
function
gradient
greater-than
greater-than-or-equal
grid
grid-filter
grid-info
history
home
horizontal-lines
import
import-export
info
inspector
interactions
italic
json
laptop
less-than
less-than-or-equal
lightning
link
list
logout
mail
menu
minus
money
multiplication
newpage
news
not-contains
not-equal
note
open-in-new
order
organisation
overline
paperclip
pause
percent
percent-tag
person
pie-chart
play
plus
quote
refresh
regex
reminder
resume
rows
save
schedule
science
search
search-table
select-all
select-fwd
select-off
settings
sort-asc
sort-desc
spanner
spark-line
starts-with
statusbar
stop
strikethrough
styled-grid
sync
tab-unselected
target
theme
traffic-lights
triangle-down
triangle-up
unchecked
underline
undo
unfilled-circle
upload
visibility-off
visibility-off-bold
visibility-on
visibility-on-bold
warning