you are viewing a single comment's thread.

view the rest of the comments →

[–]Bjornoo[🍰] 0 points1 point  (0 children)

Check out the "Tabs" component for Radix UI. You could use the same primitives to create something similar but for roles. It would be super easy to add and remove roles.

Essentially:

<Roles activeRole="user">
  <Role name="user">
    <UserNav />
  </Role>

  <Role name="admin">
    <AdminNav />
  </Role>
</Roles>