Skip to content
Discussion options

You must be logged in to vote

Thank you for the question! Below is a breakdown of how rbac works across different runtimes and how it compares to libraries like CASL.

Multi-Runtime Support

Although the rbac project’s README highlights Node.js, the core is pure TypeScript/JavaScript with no dependencies on Node-only APIs (fs, process, etc.), so it works in any environment that supports ESM modules.

Browser

Yes — the library runs fully in the browser and is suitable for UI-level authorization (show/hide UI elements, conditional rendering, feature gating, etc.).

Live React example:
https://codesandbox.io/p/sandbox/rbac-rbac-react-example-cltmmh

Bundle size (ESM output):

  • ~73.3 kB unminified
  • ~16.5 kB minified
  • ~16.5 kB min…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by phellipeandrade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #57 on January 06, 2026 00:18.