DocsReferenceClasses and options
Classes, variables and options
Everything you can set, on one page.
#Component options
The React, Vue and Svelte components take the same options.
| Option | Type | What it does |
|---|---|---|
icon | string | The icon module you imported. Required. |
value | number, 0 to 1 | Sets the icon. Leave it out for the rest value. |
hover | boolean | Fidget when this icon is hovered. |
move | boolean | Motion only on hover. |
className / class, style | Merged with the icon's own. Any other attribute is passed through. |
To fidget an icon when its button is hovered, leave hover off and put fidg-hover on the button.
#Classes
| Class | Goes on | What it does |
|---|---|---|
fidg | the svg | Marks an icon. Already on every icon. |
fidg-hover | icon or parent | Fidget on hover and keyboard focus. |
fidg-move | icon or parent | Motion only, on hover and focus. |
is-on | a parent with fidg-hover | Plays the fidget now. Remove it after 1.1 s, or the icon keeps its rest value. |
fidg-scrub | with fidg-hover is-on | Holds the fidget at --t seconds. |
fidg-calm | any parent | Stops all motion inside. |
fidg-mono, fidg-offset, fidg-chip | icon or parent | The other three looks. |
#Variables
| Variable | Goes on | What it does |
|---|---|---|
--v | the svg | The value, 0 to 1. |
--fidg-accent | anywhere | Accent colour. Default #ffb300. |
--fidg-stroke | anywhere | Line weight. 1.25 Light (default), 1.75 Regular, 2.25 Bold. |
--fidg-bg | anywhere | The colour the icon sits on. Default white. |
--fidg-glide | anywhere | Time to reach a new value. Default .5s. |
--fidg-chip, --fidg-chip-ink | anywhere | Tile and ink colours of the Chip look. |
--t | with fidg-scrub | The moment to hold, in seconds, 0 to 1.1. |
#index.json
{ "id": "battery", "name": "Battery", "category": "Interface", "value": "charge", "rest": 1,
"motion": "pop", "sound": "charge", "free": true }Something missing or unclear?Write to usRequest an icon