+ | {post.title} |
+
+ {() => can('posts.update', post) && }
+ {() => can('posts.delete', post) && }
+ |
+
+ )
+}
+```
+
+### Multi-Tenant with Key Prefixes
+
+```tsx
+const can = createPermissions({
+ 'org:acme.admin': true,
+ 'ws:design.posts.*': true,
+ 'ws:engineering.posts.read': true,
+})
+
+can('ws:design.posts.delete') // true — wildcard match
+can('ws:engineering.posts.delete') // false — only read granted
+```
+
+### Reactive Role Switching
+
+```tsx
+const can = createPermissions(fromRole('viewer'))
+
+// Permissions automatically update in all components
+effect(() => {
+ can.set(fromRole(currentRole()))
+})
+
+// Every can() check in the app reacts to role changes
+```
+
+### With useQuery — Conditional Fetching
+
+```tsx
+const { data } = useQuery(() => ({
+ queryKey: ['users'],
+ queryFn: fetchUsers,
+ enabled: can('users.read'),
+}))
+```
+
+## Type Exports
+
+```tsx
+import type {
+ Permissions, // The callable permissions instance
+ PermissionMap, // Record