Skip to Content
FAQ

FAQ

Common questions about spacing-ui.

Does it work with SSR?

Yes. Every primitive is safe to render on the server. Portals, focus management, and layout effects are guarded behind a mounted check so the server-rendered HTML matches the initial client render.

What’s the bundle size?

@spacing-ui/core is tree-shakeable. Importing a single primitive pulls in only that primitive and a tiny shared utility layer — around 2–4 KB gzipped per component.

Do I need to add TypeScript types?

No. All primitives ship with types. Controlled/uncontrolled props are inferred from usage, and callback signatures narrow to the exact value type of each primitive.

How does this compare to Radix UI?

Same headless philosophy, smaller surface. spacing-ui ships eight primitives with zero runtime deps beyond React, and the API tends to be a hair smaller. Pick whichever fits your project — the mental model is nearly identical.

Last updated on