When to Use Block Content Type vs. Components
Last updated: September 25, 2024
When designing your content model, you may wonder whether to use Block Content Type or Components. This article explains the key differences and provides guidance on when to use each.
Block Content Type
Block Content Type is useful when:
The content can't exist independently of its parent component
You want to avoid cluttering the structure panel
Example: In a form component, individual field options (like radio buttons or dropdown items) could be implemented as blocks.
Components
Components are preferable when:
You need more flexibility in content reuse
It is desired for the element to be visible in the structure panel
Personalization at a granular level is required
You're creating patterns that need to be editable on the composition page
Considerations
Personalization: Blocks within a component can't be individually personalized. You can show/hide the entire parent component, but not individual blocks.
Pattern Editing: When creating patterns, blocks can't be edited on the composition page, whereas components can.
Performance: Using components over blocks generally doesn't have a significant impact on application performance. Choose the approach that best suits your content structure and editing needs.
Conclusion
In most cases, using components provides more flexibility and is often the preferred approach. However, for tightly coupled, configuration-heavy content, blocks can be a good choice. Consider your specific use case, personalization needs, and editing workflow when making the decision.