Widget Customization
Appearance
The widget’s appearance can be seamlessly adjusted by modifying CSS variables, allowing for easy customization of various visual elements:
Adjust these variables to match your website’s design scheme, ensuring a seamless integration of the widget with your UI/UX aesthetics.
Localization
Easily localize and tailor the widget’s messages to suit your audience’s language preferences through the strings
property. This property holds a JSON-encoded string comprising translation entries for various widget messages:
Customize these messages to better resonate with your users or align with your branding. Adjust the wording, tone, or even links within these messages to offer a personalized and user-friendly experience.
Programmatic Configuration
To configure the widget programmatically, use the configure()
method:
All configuration properties are supported. To set the challenge object, use the challenge
configuration property. Refer to the README file for configuration properties and types.
Ensure that the configure()
method is called after the ALTCHA script loads, such as within window.addEventListener('load', ...)
.
Examples
Dark theme
CSS variables
Custom labels
The strings
attribute accepts a JSON-encoded string. In HTML, you also must encode the HTML entities (for example with html-entities). For simpler customization, consider using programmatic configuration instead.