component-design
Component design
Help the user extend their own component set with calm, clear interfaces and composable contracts. Follow the host repository’s instructions, installed components and theme; Ghost-specific choices below apply when adopting Ghost’s conventions. This skill is self-contained: it does not install React components or require Ghost’s internal tooling, a sibling skill, Paper, a particular coding agent or a hosted runtime.
Start with the task and evidence
- State the caller’s job and the smallest result that demonstrates it. Find the existing component, utility, token and composition before adding a public name.
- Choose composition, an extension of the current owner, or a new component with a distinct reusable job. A different product title or an extra example does not create a component variant.
- Read the current source, types, styles and a real consumer. Verify uncertain behavior with the installed upstream documentation. A competing API is research, not proof that Ghost supports it.
- Pin inputs, defaults, callbacks, state ownership and relevant failure states before polishing appearance. Use a visual prototype only when it helps settle a visual or interaction decision.
When an interaction is uncertain, research the actual action sequence before multiplying states. Distinguish what was observed, what to adopt, what to challenge and what remains unknown. Download counts and a familiar screenshot do not prove how editing, reordering or recovery works. Compare current primary sources before claiming an advantage; name the demonstrated improvement and its tradeoff.
Keep one owner for each job
Use Component for a maintained reusable UI API, including AI interfaces. A component can compose primitives and other components. Parts belong to its public composition. A primitive supplies focused behavior or structure and can also expose a public component API.
A block assembles components with task-specific content, state and actions. A template adds application structure and setup. A library groups related components, utilities and contracts. A pattern describes a reusable solution. Components, blocks and templates can implement it. An example demonstrates any of these objects. Keep one example source and link to it from related pages. Variants, configurations and states describe the object's supported choices and conditions. Theme tokens supply shared visual values.