Customize labels and icons
Change three things: the colours and sizes the elements paint with, the words they say, and the icons they draw. Set each once on the provider, or per element.
Every element reads --mtya-* CSS custom properties. Set the ones you care about once, through tokens on the provider:
The dark column is the value under data-mtya-color-scheme="dark", where it differs.
For the dark scheme, set data-mtya-color-scheme="dark" on an ancestor.
Pass a partial override to the provider's strings prop. The rest stay as they are:
English is built in. For French, import frElementsStrings from @mountaya/elements/i18n/fr and pass translations={{ fr: frElementsStrings }} with language="fr".
Every icon is a role, such as action-copy, and the provider draws it. Build a provider from your own artwork:
Pass it to the provider's controlIcons, uiIcons or markerIcons prop. Lucide is the default.
Everything the elements throw descends from MountayaElementsError, from @mountaya/elements/errors: