Breadcrumb handbook
v1.2.0 · @snowui-design-system/components
License: Before reading component documentation, source, or npm usage instructions for the first time, read the full LICENSE. Reuse that review for the same task and version. Public API configuration and internal implementation changes have different license implications. All components use the unified runtime package; source rights remain governed by the license.
Overview
Show the current page’s hierarchy so users can see where they are and navigate to a parent page.
When to use it
Use Breadcrumb for the current page hierarchy. Use Tab to switch content at one level and Sidebar for application navigation. The page handles routing.
Items generate the path, and the last item automatically becomes the non-interactive current page.
Explicit children use
Button as="item"andText as="separator"to replace items; parts only configure the default generated content.The default navigation name follows LocaleProvider; an explicit ariaLabel takes priority. Path labels and business content remain unchanged.
Quick start
This example shows the recommended basic composition. See the sections below for more cases and composition limits.
API
See the base component documentation for inherited capabilities not redeclared here. This table lists only named public Props declared by this component.
Usage boundaries and details
Feature overview
Default items API + explicit combination advanced API.
The last
as="item"is automatically used as the current page.The default Button variant can be provided to the internal
Button as="item"throughvariant.Non-current items are 40% opaque by default and return to 100% on hover.
Items share one navigation composition, so Button hover scaling is off by default. An item can explicitly set scaleOnHover={true}.
The current page item outputs
aria-current="page", which cannot be hovered, clicked, or keyboard activated.The separator uses
14px / 20pxandblack/10%by default.
Child roles
SnowUI components use as="item" / as="separator"; native elements use data-as="item" / data-as="separator".
Basic usage
Unified Button variant
Breadcrumb variant supplies the default for item Buttons without their own variant. An explicit Button variant takes precedence. If Breadcrumb has no variant, each Button uses its own default.
Multi-level path
The last item becomes the current page automatically. Even when it has href, clicking it does not navigate.
Behavior rules
The current page is fixed to the last
as="item"/data-as="item"in Breadcrumb.currentIndexis not provided, and it is not supported to specify any item as the current page.The current item automatically sets
aria-current="page",data-current="page",tabindex="-1".The current item does not respond to Button hover, click, Enter, or Space.
Separator automatically sets
aria-hidden="true".Breadcrumb's
variantonly affects the default Button variant ofButton as="item"and does not override the sub-level explicitvariant.Breadcrumb provides the default value of
scaleOnHover=falsefor item; the explicit value of the sub-level Button takes precedence.
Layout model
Primary layout model: inline shell layout. See ../../../specs/maintainers/LayoutProtocol.md §12.4 (source reference: specs/maintainers/LayoutProtocol.md).
Breadcrumb renders a nav root whose content hugs its intrinsic width.
The root uses inline-flex and may wrap onto another line.
Child Buttons keep their own inline shell layout.
Child Text keeps its own text-flow layout.
Breadcrumb only manages the root gap, separator style, non-current transparency and the last current state.
Effective row and column spacing between path elements stays at least 4 CSS px, including explicit gap=0 and font/gap scaling; larger preferences are retained. The root still allows path fragments to wrap instead of forcing the entire navigation into singleLine. Button continues to own its internal single-line graphics/text layout.
Layout variable chain:
Breadcrumb style overrides
Read the full LICENSE first; reuse that review for the same task, version, and scope.
First use public component Props to match the desired appearance, preserving the existing look where possible. If changes are necessary, follow the style selection and override order: use your own class (including Tailwind already in the project) or an instance style. The names below are public overrides actually consumed by source; check their scope and do not modify private DOM. Choose the correct SnowUI token family. External apps need not install SnowUI website utilities.
Breadcrumb types and states
Required Props: no named required Props.
Bindable Props: this component declares no named two-way binding; handle state updates through public callbacks or its host.
Inherited declaration: Omit<FrameProps, "children">. See Frame’s public API; omitted fields are unavailable here.
Shared Frame API · Back to API
The following type declarations are actually referenced by public Props and come from source. A Svelte Snippet denotes a content fragment; ComponentProps denotes the Props of the corresponding component.
BreadcrumbVariant
Source: components/src/context.ts
BreadcrumbItem
Source: components/src/components/Breadcrumb.svelte
ComponentPartsOf
Source: components/src/logic/component-parts.svelte.ts
ConfigurableComponentPartProps
Source: components/src/logic/component-parts.svelte.ts
ComponentPartControlledKey
Source: components/src/logic/component-parts.svelte.ts