Drilldown

Horizontal pill-style navigation for quick category switching.

Overview

The Drilldown block displays sibling or child collections as horizontal pills. Includes optional back and "All" links for navigating the hierarchy.

Type: App Block (collection pages only)

Example: [ ← Men's ] [ All ] [ Shirts ] [ Pants ] [ Shoes ]

Adding the block

  1. Go to Online StoreThemesEdit theme
  2. Navigate to a collection page template
  3. Click Add section or Add block
  4. Select Drilldown
  5. Enter your Tree ID (find it in the TreeNav app dashboard)
  6. Configure settings and save

Note: This block only appears on collection pages (enforced via enabled_on in schema).


Content settings

SettingDescriptionDefault
Tree IDThe ID of your navigation tree. Find this in the TreeNav app dashboard.
HeadingOptional title above the pills. Leave blank to hide.
Sticky headingKeep heading visible while scrolling pills. Only visible when Heading is set.Off
Back link textLink to grandparent collection (two levels up). Supports [parent] placeholder. Leave blank to hide.
All link textLink to parent collection (one level up). Leave blank to hide."All"

Placeholder example

[parent] is replaced with the target collection name:

  • Back link: "← [parent]" becomes "← Men's"

Layout settings

SettingOptions/RangeDefaultDescription
AlignmentLeft, CenterLeftHorizontal alignment of pills
Display modeSlider, StackedSliderSlider: horizontal scroll. Stacked: wrap to multiple lines.
Show scroll arrowsOn/OffOnShow navigation arrows when content overflows. Only visible in Slider mode.
Arrows positionInline, RightRightInline: arrows on each side. Right: both arrows grouped on right with fade effect. Only visible when arrows enabled.
Arrows border radius0-100px4pxRoundness of arrow buttons. Only visible when arrows enabled.
Item gap4-16px8pxSpace between pills
Top padding0-24px8pxPadding above the block
Bottom padding0-24px8pxPadding below the block
Border radius0-100px2pxRoundness of pill buttons

Arrow colors (Slider mode only)

These settings only appear when Display mode is Slider and Show scroll arrows is enabled:

SettingDefaultDescription
Fade background#ffffffGradient fade color when arrows are positioned Right. Only visible when Arrows position is Right.
Arrow color#303030Arrow icon color
Arrow background#ffffffArrow button background
Arrow border#e5e7ebArrow button border color

Typography settings

SettingRangeDefaultDescription
Font size12-16px13pxText size for pill labels

Color settings

Default state

SettingDefaultDescription
Text color#303030Pill text color
Background color#f3f4f6Pill background
Border color#e5e7ebPill border

Hover state

SettingDefaultDescription
Hover text color#000000Text color on mouse hover
Hover background#e5e7ebBackground on mouse hover
Hover border#d1d5dbBorder on mouse hover

Active state (current collection)

SettingDefaultDescription
Active text color#ffffffCurrent collection text
Active background#303030Current collection background
Active border#303030Current collection border

Display modes

Slider (default)

Pills scroll horizontally. Arrow buttons appear when content overflows.

Arrow positions

PositionBehavior
InlineLeft arrow on left edge, right arrow on right edge
RightBoth arrows grouped on right with gradient fade effect over pills

Stacked

Pills wrap to multiple lines. Scroll arrows are automatically hidden in this mode.


How it works

TreeNav determines what to display based on the current collection's position in your tree:

Decision logic

  1. Find the current collection in your tree
  2. If current has children → show children
  3. If current is a leaf (no children) → show siblings
  4. If current is at root level → show root siblings
  5. If current not in tree → show root nodes

Navigation links

LinkNavigates toWhen shown
Back linkGrandparent (two levels up)When grandparent exists and back_link_text is set
All linkParent (one level up)When parent exists and all_link_text is set
Pill linksSibling or child collectionsAlways (when items exist)

Example scenarios

Current locationShows
Men's → Shirts → CasualBack: Men's | All: Shirts | Siblings: Casual*, Formal, Polo
Men's → Shirts (has children)Back: (root) | All: Men's | Children: Casual, Formal, Polo
Men's (root level)Root siblings: Men's*, Women's, Kids

* = active/current item


Keyboard navigation

KeyAction
TabMove between pills and arrows
/ Navigate between pills when focused
EnterNavigate to collection

Accessibility

  • <nav aria-label="Sub-categories"> landmark
  • aria-labelledby links nav to heading when present
  • aria-current="page" on active pill
  • Scroll buttons have aria-label for screen readers
  • Hidden buttons use hidden attribute (removed from tab order)

Troubleshooting

  • Check that the current collection exists in your tree
  • Verify Tree ID is correct in block settings
  • Collections at root level with no siblings show root nodes
  • Deleted collections are automatically filtered out
  • The current collection might be an only child
  • Add more collections at the same level in your tree
  • Enable Show scroll arrows in settings
  • Arrows only appear when content overflows the container
  • Switch Display mode to Slider (Stacked mode hides arrows)
  • Fade only appears with Arrows position set to Right
  • Adjust Fade background color to match your theme background

CSS customization

Override default styles using these CSS classes:

ClassElement
.treenav-drilldownMain container
.treenav-drilldown--centerCenter-aligned modifier
.treenav-drilldown--stackedStacked mode modifier
.treenav-drilldown--arrows-rightRight arrows modifier
.treenav-drilldown__headingHeading element
.treenav-drilldown__heading--stickySticky heading modifier
.treenav-drilldown__listPills container (ul)
.treenav-drilldown__itemPill link
.treenav-drilldown__item--backBack link pill
.treenav-drilldown__item--allAll link pill
.treenav-drilldown__item--activeCurrent collection pill
.treenav-drilldown__scrollScroll arrow button
.treenav-drilldown__scroll--leftLeft arrow
.treenav-drilldown__scroll--rightRight arrow

CSS custom properties

.treenav-drilldown {
  --dd-gap: 8px;
  --dd-font-size: 13px;
  --dd-radius: 2px;
  --dd-arrows-radius: 4px;
  --dd-padding-top: 8px;
  --dd-padding-bottom: 8px;

  /* Default state */
  --dd-text: #303030;
  --dd-bg: #f3f4f6;
  --dd-border: #e5e7eb;

  /* Hover state */
  --dd-text-hover: #000000;
  --dd-bg-hover: #e5e7eb;
  --dd-border-hover: #d1d5db;

  /* Active state */
  --dd-text-active: #ffffff;
  --dd-bg-active: #303030;
  --dd-border-active: #303030;

  /* Arrows */
  --dd-fade: #ffffff;
  --dd-arrow: #303030;
  --dd-arrow-bg: #ffffff;
  --dd-arrow-border: #e5e7eb;
}

More questions? See the FAQ & Troubleshooting guide or contact us.