Section
A component that groups related information horizontally with an optional accessory.
The Section component helps organize related information in a horizontal layout. It can contain multiple components (typically text) and optionally include an accessory element like a thumbnail that appears alongside the main content.
Component Structure
A Section is defined by its ability to display components horizontally and optionally include an accessory component. It's commonly used to pair text with related media or icons.
Creating a Section
To create a section, you need to create a class that extends the Section
class:
Usage Example
Here's how you might use a Section in a command:
The Section component is particularly useful when you want to:
- Group related text and media together
- Create a consistent layout for information
- Add visual context to text content
Edit on GitHub
Last updated on