Back to Tooljet

Breadcrumb — Rocket Design Spec

frontend/src/components/ui/Rocket/Breadcrumb/Breadcrumb.spec.md

3.20.154-lts3.5 KB
Original Source

Breadcrumb — Rocket Design Spec

<!-- figma: https://www.figma.com/design/XQdM9x8x9YHcj1lUK8abUG/Rocket-components?node-id=128-55224 --> <!-- synced: 2026-03-25 -->

Overview

Navigation breadcrumb trail showing the user's current location within a hierarchy. Compound component (Shape E) wrapping shadcn breadcrumb primitives. No variants, no sizes — one consistent visual treatment.

Sub-components

Sub-componentshadcn baseRocket wrapper?Notes
BreadcrumbBreadcrumb (nav)Re-exportStructural root, no styling needed
BreadcrumbListBreadcrumbList (ol)YesToken-styled container
BreadcrumbItemBreadcrumbItem (li)Re-exportStructural wrapper, no styling needed
BreadcrumbLinkBreadcrumbLink (a/Slot)YesStyled link with hover/disabled states
BreadcrumbPageBreadcrumbPage (span)YesCurrent page — distinct styling
BreadcrumbSeparatorBreadcrumbSeparator (li)YesSeparator icon with token color
BreadcrumbEllipsisBreadcrumbEllipsis (span)YesCollapsed items indicator

Props

PropTypeValuesDefault
asChildbooleanfalse
disabledbooleanfalse
PropTypeValuesDefault
childrenReactNodecustom separator iconChevronRightIcon
PropTypeValuesDefault
childrenReactNodecustom ellipsis contentMoreHorizontalIcon

States

StateApplies toBehaviour
defaultBreadcrumbLinkNormal link appearance
hoverBreadcrumbLinkText darkens to text-default
disabledBreadcrumbLinkReduced opacity, no pointer events
current (page)BreadcrumbPageNon-interactive, text-default, font-medium

Token Mapping

ElementStateToolJet tokenTailwind class
link textdefaulttext-placeholdertw-text-text-placeholder
link texthovertext-defaulthover:tw-text-text-default
link textdisabledtext-disabledtw-text-text-disabled
page textcurrenttext-defaulttw-text-text-default
page textcurrentfont-title-smalltw-font-title-small
separator icondefaulticon-defaulttw-text-icon-default
ellipsis icondefaulticon-defaulttw-text-icon-default
ellipsis containerhoverinteractive-hoverhover:tw-bg-interactive-hover
list containerfont-body-smalltw-font-body-small tw-gap-1.5 tw-flex-wrap

Slots

  • separator (optional, ReactNode) — custom separator icon, defaults to ChevronRightIcon
  • ellipsis (optional, ReactNode) — custom ellipsis content, defaults to MoreHorizontalIcon

CVA Shape

Shape E — compound/multi-part

  • No sub-component needs CVA (no variants, no sizes)
  • All sub-components use static cn() with ToolJet token classes
  • Structural sub-components (Breadcrumb, BreadcrumbItem) are re-exported directly

Notes

  • Breadcrumb uses tw-font-body-small (11px/16px, regular) for links and tw-font-title-small (11px/16px, medium) for current page — uses typography plugin tokens, never manual font combos
  • BreadcrumbLink supports asChild via shadcn's Slot — allows wrapping React Router <Link> etc.
  • BreadcrumbEllipsis gets a rounded hover background for interactive affordance
  • Separator defaults to ChevronRightIcon but can be overridden with any icon or string (e.g. "/")
  • tw-border-solid not needed — no borders in this component