Settings Panel Presets

A collection of preset components in Notion settings panel.

Installation

npm install pnpm add @notion-kit/settings-panel

Components


Sessions Table

A table to display all active sessions in the workspace.

API Reference

PropTypeDescription
data*SessionRow[]All active sessions.
currentSessionIdstringUnique identifier of the current session.
onLogout(deviceName: string, token: string) => voidHandler that is called when a session is revoked.

Connections Table

A table to display all established connections.

API Reference

PropTypeDescription
data*Connection[]Current connections.

Members Table

A table to display all members (except guests) in the workspace.

API Reference

PropTypeDescription
scopes*Set<Scope>Current scopes.
data*MemberRow[]Current members and owners.
userIdstringUnique identifier of the current user.
searchstringCurrent search string.
onUpdate(data: {id: string, memberId: string, role: Role}) => voidHandler that is called when the role of the member is changed.
onDelete(data: MemberRow) => voidHandler that is called when the member is removed.
onTeamspaceSelect(teamspaceId: string) => voidHandler that is called when the teamspace is selected.

Guests Table

A table to display all guests in the workspace.

API Reference

PropTypeDescription
scopes*Set<Scope>Current scopes.
data*GuestRow[]Current guests.
searchstringCurrent search string.
onUpdate(data: {id: string, memberId: string, role: Role}) => voidHandler that is called when the role of the guest is changed.
onDelete(data: GuestRow) => voidHandler that is called when the guest is removed.

Invitations Table

A table to display all invitations in the workspace.

API Reference

PropTypeDescription
scopes*Set<Scope>Current scopes.
data*InvitationRow[]Current invitations.
onCancel(id: string) => voidHandler that is called when the invitation is canceled.

Teamspaces Table

A table to display all teamspaces in the workspace.

API Reference

PropTypeDescription
workspace*stringName of the current workspace.
data*TeamspaceRow[]Current teamspaces.
onRowSelect(teamspace: TeamspaceRow) => void | Promise<void>Handler that is called when the teamspace is selected.
onUpdate(data: {id: string, name?: string, icon?: IconData, description?: string, permission?: TeamspacePermission}) => void | Promise<void>Handler that is called when the teamspace is updated.
onArchive(teamspace: TeamspaceRow) => void | Promise<void>Handler that is called when the teamspace is archived.
onLeave(teamspace: TeamspaceRow) => void | Promise<void>Handler that is called when the user leaves the teamspace.

Plans Table

A table to display all possible plans and their corresponding features.

API Reference

PropTypeDescription
canUpgradebooleanWhether the current plan is updatable.