Install Velt
Customization starts from a working Velt installation: SDK installed, user authenticated, document set, and Velt’s default UI (comments, sidebar, …) rendering in your app.Not there yet? Follow the Quickstart (or use the Installation Plugin), then come back.
Recommended: use the UI Customization Plugin
If your design is in Figma and you use Cursor or Claude Code, install the UI Customization Plugin: it picks the approach, builds the customization in your app, and verifies the result against your design in a real browser (comments and notifications today).If your design isn’t in Figma, or you prefer building by hand, continue with the manual steps below.
Choose your shadow DOM strategy
Velt can render inside a shadow DOM (an isolated DOM bubble). That isolation blocks your stylesheets, so decide up front how your CSS reaches Velt:Option B: keep shadow DOM on and inject your CSS into the shadow root (keeps Velt’s style isolation):If you do neither, your
- Variable-only theming (you only override
--velt-*tokens): works regardless of shadow DOM; variables cross the boundary. Nothing to change. - Selector-based CSS (class/element selectors) or styled wireframes: these cannot reach inside the shadow DOM. Pick one of two supported options:
- React / Next.js
- Other Frameworks
- React / Next.js
- Other Frameworks
--velt-* overrides still apply but your class-based CSS won’t reach inside, so it looks like “my CSS does nothing.”Rule of thumb: anything beyond pure variable theming ⇒ shadow DOM off or injectCustomCss. (Details: CSS.)Set up the folder structure
This structure keeps your app code, Velt setup, and Velt UI customization cleanly separated. Use it as-is.Why this works:
- One place to look. Anyone (or any tool) finds all customization under
components/velt/ui-customization/. - App UI stays separate from Velt UI: no tangling.
- One stylesheet for all Velt CSS variables/classes, not scattered across components.
- One
<VeltWireframe>root (inVeltCustomization.tsx): easy to find.
Keep exactly one
<VeltWireframe> in the whole app. It feeds a global registry; extra roots merge first-with-content-wins, which is order-dependent and conflict-prone. VeltCustomization.tsx is its one home.Build your customization
Open the page for your chosen approach:
CSS, Wireframes, Primitives, or Headless. Mixing layers on one surface? See Combining approaches.As you build, handle accessibility, i18n, RTL, responsive behavior, and testing alongside each surface, not at the end: see
Cross-cutting concerns.
