NEW: Try out the Theme Playground to visually customize and preview your themes.
- Themes
- Custom CSS
Themes
You can use the Theme Playground to customize and preview the themes fast.CSS Variables
- You can customize:
- Border radius
- Spacing
- Typography
- Colors for light and dark modes
- Z-Index
- Set CSS variables on your
<body>tag to customize all Velt components:
- Border Radius
- Spacing
- Typography
- Colors - Light Mode
- Colors - Dark Mode
- Z-Index
Dark Mode
- Enable dark mode globally or per component.
- Most components accept a
darkModeprop (dark-mode="true"for non-React). - Some components that are not directly injected by you like dialogs and pins use specific props (e.g.
dialogDarkMode,pinDarkMode). You can add these props to the root component responsible for injecting them. - Check each component’s UI customization documentation for its dark mode props.
- React / Next.js
- Other Frameworks
Custom CSS or libraries
You can use your own CSS or libraries like Tailwind CSS to style the Velt components. You will need to disable the Shadow DOM to apply your styles.1. Using CSS on rendered components
- Inspect the DOM using browser dev tools to find the class names and selectors of the target Velt components.
- Override the styles using your CSS.
- Make sure to disable the Shadow DOM to apply your styles.
- React / Next.js
- Other Frameworks
2. Using CSS on Wireframes
- Add the relevant wireframe component.
- Add class or inline styles to the wireframe component like you would on a normal HTML element.
- When the actual component is rendered, the styles will be applied to that component.
- Make sure to disable the Shadow DOM to apply your styles.
- Passing
classNameorstyledirectly to Velt components does not change their UI; apply styling in the Wireframe template (or your own elements within it).
- React / Next.js
- Other Frameworks
Component-Specific CSS Classes
Certain Velt components include CSS classes for specific states that you can target for custom styling. For example, the assign dropdown checkbox includes a CSS class to indicate the selected state on checkboxes. To target the selected state, inspect the assign dropdown checkbox element in your browser dev tools to find the specific class name, then apply your custom styles. Make sure to disable the Shadow DOM first.- React / Next.js
- Other Frameworks
Disable Shadow DOM
- By default, Velt components use Shadow DOM to isolate their styles from your application’s CSS. This ensures that styles don’t conflict with each other.
- If you want your application’s CSS to affect the styling of Velt components, you can disable the Shadow DOM.
- Most components accept a
shadowDomprop (shadow-dom="false"for non-React). - Some components that are not directly injected by you like dialogs and pins use specific props (e.g.
dialogShadowDom,pinShadowDom). - Check each component’s UI customization documentation for its shadow DOM props.
- React / Next.js
- Other Frameworks
Disable Global Styles
When implementing custom themes, you can disable Velt’s default global CSS styles by settingglobalStyles: false in the SDK configuration. This prevents conflicts with your custom styling.
- React / Next.js
- Other Frameworks
Conditional Classes
Apply classes conditionally based available template variables. Syntax:- React / Next.js
- Other Frameworks
- class-name: The class name to apply. This should be within single quotes
'. - template-variable: The template variable to evaluate. This should be within curly braces
{}. - operator: The operator to use for the comparison. This should be one of the following:
===,!==,>,>=,<,<=. You can also use&&and||to combine multiple conditions. - value: The value to compare the template variable to. This should be within single quotes
'.
- React / Next.js
- Other Frameworks

