<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5HGSQD2L" height="0" width="0" style="display:none;visibility:hidden" title="GTM"></iframe>

Component Utilities

SWAN provides various utilities that can help a developer in creating a variety of UI patterns and rendering the page layout with ease.

Core props

SWAN provides some core props that are available to every SWAN component, including props for spacing, typography, color, display, and more. Refer to Core Props for more details.

Constants

SWAN provides JavaScript constants for many values (URLs, paths, class names, color and spacing tokens, and screen sizes) for use in your code. Refer to Constants for more details.

Error Boundary

An error boundary is a React feature that lets you wrap part of your UI, and if an error occurs within that boundary, you display some fallback UI (such as an error message for the user).

SWAN provides a component utility for this; refer to Error Boundary for more details.

Was this page useful?

Thanks for your feedback!

Feel free to include your name if you wish to have a follow up conversation.


Published: Jul 28, 2022Last updated: Sep 3, 2024