# Group switchers and members

When `ctx.group` is present, use its `name` for the selected group and its `label` for the noun (Household, Team or Group). A compact layout can put “Oak Street” beneath the date in an existing toolbar, leaving room on the right for a people icon beside the bell. Let long names wrap or truncate with the full name available to assistive technology. Omit group-specific controls when `ctx.group` is null.

![Plant Buddy design example. The household name sits under the date, with a people button beside the bell. The open sheet names the household and lists its members.](/workshop/sdk/household-members.webp)

## Switching groups

The compact picker pattern puts the current name and a chevron in the same control. Opening it reveals the available groups with a check beside the current one. Choosing another group opens that group's app and data.

After `nerd.ready()`, call `nerd.groups.bindSwitcher(button)` in hosted mode on a visible button labeled with the current group. Workshop opens its authorized picker at that button and hides the extra host link while the button is available. Call the returned cleanup when unmounting it. In standalone previews show the current sample group. Apps without a bound button keep the host link.

## Viewing members and inviting people

Give the two-person icon its own 44 × 44 px button, match the weight of nearby toolbar icons, and give it an accessible name such as “Members of Oak Street”. Open a `nerd.ui.sheet` titled “Members of Oak Street”. Show names and roles from `nerd.members.observe` and unsubscribe when the sheet closes. Inside the sheet, offer “Invite member” only when `ctx.group.canInvite` is true and call `nerd.groups.invite()` to open the host's email form. Previews simulate sending. Hosted owners can call `nerd.groups.manageMembers()` to open the member sheet with invitation, removal and revocation controls.
