Components
A component uses "component" as its root key (instead of "document") and declares a metadata.name — the handle authors reference:
{
"component": {
"metadata": { "name": "company-header" },
"styles": {
"companyName": { "fontSize": 18, "fontWeight": "bold", "color": "#1A1A2E" }
},
"content": [
{ "p": "$data.company.name", "style": "companyName" },
{ "separator": { "lineType": "solid", "width": 1, "color": "#1A1A2E" } }
]
}
}
A component supports everything a document supports — styles, content, $data, even a header/footer/pageSetup (useful for a letterhead). The metadata.name is location-independent: the file name and folder don't matter, only the declared name.
Once a component exists, reference it from any document or other component — see Reusability.