Breadcrumbs Ready
Breadcrumbs are used to visualize the path to the currently open resource. It is designed to be used with header or footer.
Examples #
<duet-breadcrumbs class="duet-example-without-padding">
<duet-breadcrumb icon="action-arrow-left-small" icon-size="xxx-small" href="/edut-ja-kampanjat">
Edut ja kampanjat
</duet-breadcrumb>
</duet-breadcrumbs>
<script>
const breadcrumb = document.querySelector("duet-breadcrumb")
breadcrumb.addEventListener("click", e => {
e.preventDefault()
console.log("Default prevented")
})
</script>
Properties #
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
color | color | Custom color to be used for text, as a design token entered in camelCase or kebab-case. Example: "color-primary". | string | "" |
theme | theme | Theme | "" | "default" | "turva" | "" |
variation | variation | Variation | "footer" | "header" | "plain" | "header" |
Usage #
This section includes guidelines for designers and developers about the usage of this component in different contexts.
When to use #
- When you need to show a path to the currently open page.
- When you want to to give an easy to way to navigate back to previous resources.
- When you have deep navigation structures.
When not to use #
- Don't replace heading or footer elements with breadcrumbs.
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.
- Its an ordered list which makes it easy to know how many bredcrumbs there are.
- Breadcrumbs has
navigation
role which makes sure that its a navigation landmark recognized by assistive technoglogies. - The visual separator arrows have been hidden from assistive technologies by using
aria-hidden="true"
.
SSR #
Until it's fixed in the StencilJS framework every duet-breadcrumb component needs to be wrapped in a html element to render properly on the server side.
More details: https://github.com/ionic-team/stencil/issues/3413#issuecomment-1834616059
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.