- Name
scope- Kind
- parameter
- Type
PartScope- Requirement
- required
DocsAPI referenceHeadlesspart-scope
part-scope headless API
The core connector and vanilla mount are always visible. Use the framework choice to inspect native composition, props, outputs, context and hooks for the selected adapter.
@grassroot/ui-headless-core/part-scope
Core connector and vanilla API
createPartRelationshipRef
functionRegisters a target part and keeps its conditional IDREF attributes synced when related parts mount or unmount. The ref owns the subscription lifetime, so no listener survives the target's null cleanup.
declare function createPartRelationshipRef(scope: PartScope, part: string, relationships: readonly PartScopeRelationship[]): (node: Element | null) => void;scopePartScopepartstringrelationshipsreadonly PartScopeRelationship[]return(node: Element | null) => void- Name
part- Kind
- parameter
- Type
string- Requirement
- required
- Name
relationships- Kind
- parameter
- Type
readonly PartScopeRelationship[]- Requirement
- required
- Name
return- Kind
- return value
- Type
(node: Element | null) => void- Requirement
- n/a
createPartScope
functiondeclare function createPartScope(options: { seed: string; root?: () => Document | ShadowRoot | HTMLElement | null;}): PartScope;options{
seed: string;
root?: () => Document | ShadowRoot | HTMLElement | null;
}returnPartScope- Name
options- Kind
- parameter
- Type
{ seed: string; root?: () => Document | ShadowRoot | HTMLElement | null; }- Requirement
- required
- Name
return- Kind
- return value
- Type
PartScope- Requirement
- n/a
createScopeSeed
functiondeclare function createScopeSeed(counterRef?: { current: number;}): string;counterRef{
current: number;
}returnstring- Name
counterRef- Kind
- parameter
- Type
{ current: number; }- Requirement
- optional
- Name
return- Kind
- return value
- Type
string- Requirement
- n/a
PartScopeRelationship
interfaceinterface PartScopeRelationship { readonly attribute: string; readonly part: string;}attributestringpartstring- Name
attribute- Kind
- property
- Type
string- Requirement
- required
- Name
part- Kind
- property
- Type
string- Requirement
- required
Framework adapters
Each panel keeps its adapter's public vocabulary. React compound exports, Vue composables, standalone Angular declarations, Svelte components, and Solid hooks stay native to their framework.
This entry is core-only. No framework adapter package ships for part-scope yet — mount it through the vanilla API above.