Button

A basic button with a solid accent background. Colours come from the --accent CSS variables.

Examples

Button Blue Green

CSS variables

NameTypeDefaultDescription
--accentR, G, B86, 88, 84Base colour, used as rgb(var(--accent)).
--accent-darkR, G, B29, 10, 11Hover colour.
--accent-lightR, G, B204, 204, 210Active (pressed) colour.

Usage

Attach a click listener as you would to a native button. Override the --accent variables on the element to change its colour.

Implementation