This React.js application creates a hierarchical visualization of users, user groups, and roles similar to the image you provided.
- Hierarchical Structure: Displays a clear hierarchy from User → User Groups → Roles
- Interactive UI: Hover effects on user icons and add buttons
- Responsive Design: Clean, modern interface with proper spacing and layout
- Sidebar Navigation: Options to view by User, Role, or User Group
- Tab Navigation: Multiple management tabs (currently showing Role-User Hierarchy)
src/
├── components/
│ ├── RoleUserHierarchy.js # Main hierarchy component
│ ├── HierarchyNode.js # Individual node component
│ ├── UserIcon.js # User avatar component
│ └── *.css # Component styles
├── App.js # Main app component
└── index.js # Entry point
-
Install dependencies:
npm install
-
Start the development server:
npm start
-
Open your browser: Navigate to
http://localhost:3000to view the application.
- User Level: Shows a single admin user at the top
- User Group Level: Displays three user groups (Managers, Developers, Analysts)
- Role Level: Shows three roles (Admin, Editor, Viewer)
- Connection Lines: Visual lines connect the hierarchy levels
- Add Buttons: Circular "+" buttons for adding new items
You can easily modify the hierarchy data in RoleUserHierarchy.js by updating the hierarchyData state object to add/remove users, groups, or roles.
- React.js 18.2.0
- CSS3 (Flexbox, Grid)
- SVG Icons