Skip to main content

UI component library

Root provides a library of pre-built UI components designed to integrate seamlessly with the Root platform. These components handle common patterns like user selection, role management, and platform-specific styling.

Installation

The component library is published as @rootsdk/client-app-ui on npm. Add it to your client's package.json:

{
"dependencies": {
"@rootsdk/client-app-ui": "^0.1.0",
"lit": "^3.2.1",
"lit-element": "^4.1.1"
}
}

The lit and lit-element packages are peer dependencies required by the component library.

Usage

Import components directly in your TypeScript or JavaScript code:

import '@rootsdk/client-app-ui';

Then use the custom elements in your HTML:

<rootsdk-user-role-selector
mode="multi"
></rootsdk-user-role-selector>

Available components

  • UserRoleSelector - A searchable dropdown for selecting users and community roles