Themed components
Learn how to apply custom styles to components at global level.
Component identifier
To customize a component globally, specify the component identifier (import name) inside the components prop of ThemeProvider.
- Use defaultPropsto change the default SolidJS props of the component.
- Use slotClassesto apply CSS classes to each component parts (slots).- Every Pigment component contains the rootslot.
 
- Every Pigment component contains the 
Visit the components-config.tsx file to see all component identifiers.
tsx
tsx
Default props
The values specified as defaultProps affect all instances of the component:
tsx
tsx
Slot classes
To apply additional CSS classes based on a given prop, use a callback as value of the slotClasses node. The argument passed in contains the component props.
tsx
tsx