Installation
Package Managers
You can install ruio using your preferred package manager:
# npm
npm install ruio
# yarn
yarn add ruio
# bun
bun add ruioRequirements
React: 16.8+ (hooks support required)
Node.js: 14+ recommended
TypeScript: 4.0+ (optional, but types are included)
TypeScript Setup
ruio is written in TypeScript and includes type definitions out of the box. No additional @types package is needed.
Verification
After installation, verify the package is installed correctly:
Root Element Detection
ruio automatically detects your application's root element using common patterns. It tries to find elements in this order:
User's saved selection (from previous session via localStorage)
Custom
defaultRootSelectorprop (if provided)#root(most common in React apps)#app(alternative common pattern)[data-reactroot](older React versions)body > div:first-child(universal fallback)
Standard Setup
Most React apps work out of the box with no configuration:
Custom Setup
For non-standard app structures, pass the defaultRootSelector prop:
Troubleshooting
Peer Dependency Warnings
If you see peer dependency warnings, ensure you have React installed:
Version Conflicts
If you encounter version conflicts with React:
Check your React version:
npm list reactEnsure React is 16.8 or higher
Update React if needed:
npm install react@latest react-dom@latest
Module Not Found
If you get "Module not found" errors:
Clear your package manager cache:
Delete
node_modulesand reinstall:
Root Element Not Found
If you see a console warning about not finding a root element:
Check your HTML: Ensure you have a root element with
id="root"orid="app"Use custom selector: Pass the
defaultRootSelectorprop with your actual root element's selectorUse element selection mode: Click the crosshair icon in the ruio UI to manually select a root element
Next Steps
Once installed, head over to the Usage Guide to get started with ruio.
Last updated
Was this helpful?
