Panel Review
Generic container to make sections of content easier to distinguish.
<duet-grid grid-template="medium">
<div>
<duet-panel>
<strong>Default variation is with white background - usually some other variation is wanted.</strong>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</duet-panel>
<duet-panel variation="accent">
<strong>Accent variation.</strong>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</duet-panel>
<duet-panel border padding="large">
<strong>Default variation with border and large padding.</strong>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</duet-panel>
<duet-panel variation="secondary">
<strong>Secondary variation.</strong>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</duet-panel>
<duet-panel variation="accent-secondary">
<strong>Accent secondary variation.</strong>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</duet-panel>
<duet-panel variation="accent-secondary" border padding="small">
<strong>Accent secondary variation with border and small padding.</strong>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
</duet-panel>
</div>
</duet-grid> Properties #
| Property | Attribute | Description | Type | Default |
|---|---|---|---|---|
accessibleDescribedBy | accessible-described-by | Indicates the id of a component that describes the panel. | string | undefined |
accessibleLabel | accessible-label | Adds accessible label for the panel that is only shown for screen readers. | string | undefined |
accessibleLabelledBy | accessible-labelled-by | Indicates the id of a component that labels the panel. | string | undefined |
border | border | Set this attribute to draw a border around the panel. | boolean | undefined |
margin | margin | Controls the margin of the component. | "auto" | "none" | "auto" |
padding | padding | Controls the padding of the component. Padding is automatically responsive. | "large" | "medium" | "small" | "medium" |
theme | theme | Theme of the panel. | "" | "default" | "turva" | "" |
variation | variation | The color variation of the panel. Combination of palette ("default", "accent") and palette variation ("primary", "secondary"). You can ommit "default" and "primary" - they are the defaults. | "" | "accent" | "accent-primary" | "accent-secondary" | "default" | "default-primary" | "default-secondary" | "primary" | "primary-accent" | "primary-default" | "secondary" | "secondary-accent" | "secondary-default" | "" |
Usage #
This section includes guidelines for designers and developers about the usage of this component in different contexts.
When to use #
- When you want to distinguish sections of content
When not to use #
- When you need to convey other semantics than just generic section
Accessibility #
This component has been validated to meet the WCAG 2.1 AA accessibility guidelines. You can find additional information regarding accessibility of this component below.
- Panel is a normal section element with content inside.
- There are three attributes
accessible-label,accessible-labelled-by, andaccessible-described-bythat can be used to give users of assistive technologies indication of the content of the Panel, which sighted users may see from the usage context.
Integration
For integration, event and theming guidelines, please see Using Components. This documentation explains how to implement and use Duet’s components across different technologies like Angular, React or Vanilla JavaScript.
Tutorials
Follow these practical tutorials to learn how to build simple page layouts using Duet’s CSS Framework, Web Components and other features:
Building Layouts
TutorialsUsing CLI Tools
TutorialsCreating Custom Patterns
TutorialsServer Side Rendering
TutorialsSharing Prototypes
TutorialsUsage With Markdown
Troubleshooting
If you experience any issues while using a component, please head over to the Support page for more guidelines and help.