Requires the
spaces bundle. Spaces are only available when the spaces bundle is installed on your project (space-level chat additionally needs the chat bundle). See Bundles to add it.In This Section
Provider & Hook
Load a space into context and access its state and operations
Membership
Join/leave spaces, approval workflows, role management
Moderation
Approve or remove content, handle member and content reports
Rules
Create and display community rules for members
Space Lists
Browse and paginate spaces with filtering and sorting
Core Architecture
Spaces follow the provider + hook pattern used throughout Sublay. Wrap your space UI with aSpaceProvider and access everything via useSpace.
Permission Model
Each space has two independent permission settings, which your app enforces:readingPermission—"anyone"or"members". Who may read content.postingPermission—"anyone","members", or"admins". Who may post.
useSpace exposes their resolved permissions (canPost, canRead, canModerate, isAdmin, isModerator).
Separately, each space has a visibility setting — "public" (default), "unlisted", or "private" — that controls who can find and see the space, independent of the permission model above. "unlisted" hides a space from discovery and search but keeps it reachable by direct link; it is not access control. "private" hides the space, and the spaces under it, from everyone except its active members — it answers 404 like a nonexistent space and can’t be joined. The content inside a space stays readable in v7 whatever its visibility and readingPermission; in v8, private spaces and readingPermission: "members" protect it too (v8 Space data model). See the Space data model.
Hierarchy
Spaces can be nested up to 10 levels deep. A child space is created by passing aparentSpaceId to useCreateSpace. Only admins of the parent space can create child spaces. Parent admins and moderators are automatically cascaded into new child spaces with their existing roles.

