Skip to main content

Banner Ready

Banners are way of displaying tightly fit call to action container.

Examples #

Open in new window
<duet-banner
size="auto"
icon="category-apartment"
image="https://www.duetds.com/assets/img/example-banner1.jpg"
>

<span slot="heading">
Kasko-vakuutus autosi turvaksi, lorem ipsum!
</span>
<span slot="description">
Optional paragraph. Kasko-vakuutus autosi turvaksi,
lorem ipsum dolor sit.
</span>
<duet-button
slot="action"
margin="none"
variation="primary"
icon="navigation-arrow-right"
icon-right
>

Call to action
</duet-button>
</duet-banner>
Open in new window
<div style="display: flex; flex-direction: row; flex-flow: wrap; gap: 16px; padding: 0 0 16px;">
<duet-banner
margin="none"
size="small"
image="https://www.duetds.com/assets/img/example-banner1.jpg"
icon="category-apartment"
>

<span slot="heading">
Kasko-vakuutus autosi turvaksi, lorem ipsum!
</span>
<span slot="description">
Optional paragraph. Kasko-vakuutus autosi turvaksi,
lorem ipsum dolor sit.
</span>
<duet-button
slot="action"
margin="none"
variation="primary"
icon="navigation-arrow-right"
icon-right
>

Call to action
</duet-button>
</duet-banner>
<duet-banner
margin="none"
size="small"
image="https://www.duetds.com/assets/img/example-banner1.jpg"
icon="category-apartment"
>

<span slot="heading">
Kasko-vakuutus autosi turvaksi, lorem ipsum!
</span>
<span slot="description">
Optional paragraph. Kasko-vakuutus autosi turvaksi,
lorem ipsum dolor sit.
</span>
<duet-button
slot="action"
margin="none"
variation="primary"
icon="navigation-arrow-right"
icon-right
>

Call to action
</duet-button>
</duet-banner>
<duet-banner
margin="none"
size="small"
image="https://www.duetds.com/assets/img/example-banner1.jpg"
icon="category-apartment"
>

<span slot="heading">
Kasko-vakuutus autosi turvaksi, lorem ipsum!
</span>
<span slot="description">
Optional paragraph. Kasko-vakuutus autosi turvaksi,
lorem ipsum dolor sit. Optional paragraph. Kasko-vakuutus autosi turvaksi,
lorem ipsum dolor sit.
</span>
<duet-button
slot="action"
margin="none"
variation="primary"
icon="navigation-arrow-right"
icon-right
>

Call to action
</duet-button>
</duet-banner>
</div>
Open in new window
<duet-banner
size="large"
image="https://www.duetds.com/assets/img/example-banner1.jpg"
icon="category-apartment"
>

<span slot="heading">
Kasko-vakuutus autosi turvaksi, lorem ipsum!
</span>
<span slot="description">
Optional paragraph. Kasko-vakuutus autosi turvaksi,
lorem ipsum dolor sit.
</span>
<duet-button
slot="action"
margin="none"
variation="primary"
icon="navigation-arrow-right"
icon-right
>

Call to action
</duet-button>
</duet-banner>

Properties #

Property Attribute Description Type Default
backgroundColor background-color Background color. string "primary-lighter"
headingLevel heading-level The actual heading level used in the HTML markup. "h1" | "h2" | "h3" | "h4" | "h5" | "h6" "h2"
icon icon Icon. string ""
iconBackgroundColor icon-background-color Icon background color. string "primary"
iconColor icon-color Icon color. string "gray-lightest"
image image Image. Example image is 512x341; string ""
margin margin Controls the margin of the component. "auto" | "none" "auto"
size size Size. "auto" | "large" | "small" "auto"
sources sources Array of sources for responsive images. Sources have the properties of element. This is an experimental feature and might be changed without notice. DuetSource[] | string undefined
textColor text-color Text color. string "secondary"
theme theme Theme. "" | "default" | "turva" ""

Slots #

Slot Description
"action" Slot for action button.
"description" Slot for description content.
"heading" Slot for heading content. Only span should be used in this slot.

Usage #

This section includes guidelines for designers and developers about the usage of this component in different contexts.

When to use #

  • When you need a call to action which customers can click to go quickly to the wanted resource.

When not to use #

  • Don't place a banner as a sole element in a page.

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.


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.

Integration guidelines


Tutorials

Follow these practical tutorials to learn how to build simple page layouts using Duet’s CSS Framework, Web Components and other features:

Tutorials

Building Layouts

Tutorials

Using CLI Tools

Tutorials

Creating Custom Patterns

Tutorials

Server Side Rendering

Tutorials

Sharing Prototypes

Tutorials

Usage With Markdown


Troubleshooting

If you experience any issues while using a component, please head over to the Support page for more guidelines and help.