Panels
Panels are a type of container that provide a means of grouping and arranging sections of content in a visually pleasing manner. Panels may contain a variety of content (images, text, tables, forms, etc.) and can be implemented in a variety of layouts to accommodate the needs of different application and screen types.
Standard Panel Example
When to Use
- Use a panel to group and arrange content that does not appear in another type of container, such as a table or tabbed set.
- A panel may also be used for organizing small and/or unevenly sized tables on a screen to provide a more organized and harmonious layout.
When Not to Use
- It is not necessary to display large tables and tabbed sets inside of a panel.
Variations
- Standard Panel (shown above)
- Expand/Collapse Panel
- Image Panel
Usage and Display
- Panel headings may appear inside or outside of the panel, except when using expand/collapse panels, which always display the heading inside of the panel.
- Panels should have a 4-pixel corner radius.
- Include 24 pixels of padding within the panels.
- When a sequence of panels appear in a side-by-side arrangement, make sure that they have consistent heights.
- Align panels to the grid.
Variations
Expand/Collapse Panel
Use an expand/collapse panel to allow expand/collapse functionality of an entire panel.
See Expand/Collapse for details.
Image Panel Example
This may be used when images are used to distinguish blocks of content on a page.
Developer Notes
Standard Panel
A panel is created by adding the .spark-panel
class to an element. These cards are best sized using the responsive grid. The content for the panel should be placed inside of an element with a class of .spark-panel__body
. Optionally, a header can be defined using the .spark-panel__header
element.
Expand/Collapse Panel
Image Heading Panel
For a panel with a masthead image at the top wrap imagery in an element with a class of .spark-panel__masthead
.