ReScript Shadcn
Get started
  • Installation
Components
  • Accordion
  • Alert
  • AlertDialog
  • AspectRatio
  • Attachment
  • Avatar
  • Badge
  • Breadcrumb
  • Bubble
  • Button
  • ButtonGroup
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Collapsible
  • Combobox
  • Command
  • ContextMenu
  • DataTable
  • DatePicker
  • Dialog
  • Direction
  • Drawer
  • DropdownMenu
  • Empty
  • Field
  • HoverCard
  • Input
  • InputGroup
  • InputOtp
  • Item
  • Kbd
  • Label
  • Marker
  • Menubar
  • Message
  • MessageScroller
  • NativeSelect
  • NavigationMenu
  • Pagination
  • Popover
  • Progress
  • RadioGroup
  • Resizable
  • ScrollArea
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Skeleton
  • Slider
  • Sonner
  • Spinner
  • Switch
  • Table
  • Tabs
  • Textarea
  • Toast
  • Toggle
  • ToggleGroup
  • Tooltip
  • Typography

Breadcrumb

Displays the path to the current resource using a hierarchy of links.

  1. Home
  2. Components
  3. Breadcrumb

Installation#

npx shadcn@latest add @rescript-shadcn/Breadcrumb

Usage#

<Breadcrumb>
  <Breadcrumb.List>
    <Breadcrumb.Item>
      <Breadcrumb.Link render={<a href="/" />}> {"Home"->React.string} </Breadcrumb.Link>
    </Breadcrumb.Item>
    <Breadcrumb.Separator />
    <Breadcrumb.Item>
      <Breadcrumb.Link render={<a href="/components" />}>
        {"Components"->React.string}
      </Breadcrumb.Link>
    </Breadcrumb.Item>
    <Breadcrumb.Separator />
    <Breadcrumb.Item>
      <Breadcrumb.Page> {"Breadcrumb"->React.string} </Breadcrumb.Page>
    </Breadcrumb.Item>
  </Breadcrumb.List>
</Breadcrumb>

Examples#

Basic#

A basic breadcrumb with a home link and a components link.

  1. Home
  2. Components
  3. Breadcrumb

Custom separator#

Use a custom component as children for <BreadcrumbSeparator /> to create a custom separator.

  1. Home
  2. Components
  3. Breadcrumb

Dropdown#

You can compose <BreadcrumbItem /> with a <DropdownMenu /> to create a dropdown in the breadcrumb.

  1. Home
  2. Breadcrumb

Collapsed#

We provide a <BreadcrumbEllipsis /> component to show a collapsed state when the breadcrumb is too long.

  1. Home
  2. More
  3. Components
  4. Breadcrumb

Link component#

To use a custom link component from your routing library, you can use the render prop on <BreadcrumbLink />.

  1. Home
  2. Components
  3. Breadcrumb

API Reference#

Breadcrumb#

The Breadcrumb component is the root navigation element that wraps all breadcrumb components.

PropTypeDefault
classNamestring-

BreadcrumbList#

The BreadcrumbList component displays the ordered list of breadcrumb items.

PropTypeDefault
classNamestring-

BreadcrumbItem#

The BreadcrumbItem component wraps individual breadcrumb items.

PropTypeDefault
classNamestring-

BreadcrumbLink#

The BreadcrumbLink component displays a clickable link in the breadcrumb.

PropTypeDefault
classNamestring-

BreadcrumbPage#

The BreadcrumbPage component displays the current page in the breadcrumb (non-clickable).

PropTypeDefault
classNamestring-

BreadcrumbSeparator#

The BreadcrumbSeparator component displays a separator between breadcrumb items. You can pass custom children to override the default separator icon.

PropTypeDefault
childrenReact.element-
classNamestring-

BreadcrumbEllipsis#

The BreadcrumbEllipsis component displays an ellipsis indicator for collapsed breadcrumb items.

PropTypeDefault
classNamestring-
@react.component
let make = () =>
  <Breadcrumb>
@react.component
let make = () =>
  <Breadcrumb>
@react.component
let make = () =>
  <Breadcrumb>
@react.component
let make = () =>
  <Breadcrumb>
@react.component
let make = () =>
  <Breadcrumb>
@react.component
let make = () =>
  <Breadcrumb>