We have released a new major version of Crayons, with support for more than 18 new components, and a set of new features:
- Existing components from v2 now support additional customisation by modifying
props
- Framework bindings for React — allowing React apps to listen and react to events emitted by Crayons components
- Framework support and usage examples for Vue and Angular
- Internationalization (i18n) support — allowing you to build multi-lingual interfaces with Crayons
- New CSS utilties for typography, spacing, border, layout, card and color.
- Ability to add external icons
- Accessibility (a11y) support for all components
- Style customization using CSS variables
- Tree-shakeable bundle for components — allowing reduction in bundle sizes
Breaking changes for Crayons v2 users
Important changes to CDN URLs for Crayons
Important: The default CDN URL serving Crayons now serves v3. As a result, existing apps using Crayons v2 must either migrate to v3, or change the CDN URL of Crayons to continue on v2.
To stay on v2, change the CDN URL to the following (notice the @2
in the URL):
<script
type="module"
src="https://unpkg.com/@freshworks/crayons@2/dist/crayons/crayons.esm.js">
</script>
<script
nomodule
src="https://unpkg.com/@freshworks/crayons@2/dist/crayons/crayons.js">
</script>
Warning: If you intend to stay on v2, then publishing a new version of an app without changing the CDN URL to point to @2
will break your app!
Update (April 6, 2022): The default URL, the one without a version tag, now points to Crayons v2
. So, apps that use Crayons v2 today with the default URL will receive Crayons v2, and not break. For v3
, use the @v3
URL as mentioned in the Crayons installation documentation.
Other breaking changes
Please see the list of all breaking changes from Crayons v2 to v3.
Migrating to v3
Please follow the guide on Migrating to v3.