Component Styling
Clasp gives you complete control over the look and feel of the components your embedding
Theme Object
you can provide a Partial<ClaspTheme>
to any ClaspView
. This is the easiest and most consistent way of changing the styling of a clasp component
the most important styles to change are
ClaspTheme.fontFamily
: to align the font family with your application’s
CSS File
if you need more granular management of styles you can create your own css file and override the styles found in the clasp-components/dist/styles.css
The best way of finding the style you want to override is to inspect the element in the browser to find the appropriate class name or id
ClaspStyleOverride.css
Font Family
you can pass any font family to the clasp-components as long as it has been previously imported or is web safe font
Positioning
the clasp-components views attempt to be unopinionated about positioning, so there is no padding / alignment attached to the views.
As such, wherever you implement a Clasp view you should position it as you want
Here’s an example using flex to position the SDK in the middle with a padding of 24px