v2.1.8
/
  • Get Started
  • Components
  • Composables
  • Typography
  • GitHub
  • Layout
  • App
  • Container
  • Error
  • SidebarLayout
  • Element
  • Advice
  • Alert
  • Avatar
  • AvatarGroup
  • Badge
  • Banner
  • Button
  • Calendar
  • Card
  • Chip
  • Collapsible
  • Countdown
  • FieldGroup
  • Kbd
  • Progress
  • Separator
  • Skeleton
  • Form
  • Checkbox
  • CheckboxGroup
  • ColorPicker
  • FileUpload
  • Form
  • FormField
  • Input
  • InputDate
  • InputMenu
  • InputNumber
  • InputTags
  • InputTime
  • PinInput
  • RadioGroup
  • Range
  • Select
  • SelectMenu
  • Switch
  • Textarea
  • Data
  • Accordion
  • DescriptionList
  • Empty
  • Table
  • TableWrapper
  • Timeline
  • User
  • Navigation
  • Breadcrumb
  • CommandPalette
  • Link
  • NavigationMenu
  • Pagination
  • Stepper
  • Tabs
  • Overlay
  • ContextMenu
  • DropdownMenu
  • Modal
  • Popover
  • Slideover
  • Toast
  • Tooltip
  • Page
  • PageCard
  • PageColumns
  • PageGrid
  • PageLinks
  • PageList
  • Dashboard
  • DashboardGroup
  • DashboardSearch
  • DashboardSearchButton
  • AI Chat
  • soonChatMessage
  • soonChatMessages
  • soonChatPalette
  • soonChatPrompt
  • soonChatPromptSubmit
  • Content
  • ContentSearch
  • ContentSearchButton
  • ContentSurround
  • ContentToc
  • Color Mode
  • ColorModeAvatar
  • ColorModeButton
  • ColorModeImage
  • ColorModeSelect
  • ColorModeSwitch
  • i18n
  • LocaleSelect
  • b24icons
  • b24jssdk
Use our Nuxt starter
v2.1.8
  • Docs
  • Components
  • Composables
  • Typography

Breadcrumb

A breadcrumb navigation component.
GitHub
Demo
Nuxt UI

Usage

Use the Breadcrumb component to show the current page's location in your site's hierarchy.

  1. Docs
  2. Components
  3. Breadcrumb
{
  "wait": "Loading client-side content..."
}

Items

Use the items prop as an array of objects with the following properties:

  • label?: string
  • icon?: IconComponent
  • avatar?: AvatarProps
  • slot?: string
  • class?: any
  • b24ui?: { item?: ClassNameValue, link?: ClassNameValue, linkLeadingIcon?: ClassNameValue, linkLeadingAvatar?: ClassNameValue, linkLabel?: ClassNameValue, separator?: ClassNameValue, separatorIcon?: ClassNameValue }

You can pass any property from the Link component such as to, target, etc.

  1. Docs
  2. Components
  3. Breadcrumb
{
  "wait": "Loading client-side content..."
}
A span is rendered instead of a link when the to property is not defined.

Separator Icon

Use the separator-icon prop to customize the Icon between each item.

  1. Docs
  2. Components
  3. Breadcrumb
{
  "wait": "Loading client-side content..."
}

Examples

With separator slot

Use the #separator slot to customize the separator between each item.

  1. Docs
  2. /
  3. Components
  4. /
  5. Breadcrumb
{
  "wait": "Loading client-side content..."
}

With custom slot

Use the slot property to customize a specific item.

You will have access to the following slots:

  • #{{ item.slot }}
  • #{{ item.slot }}-leading
  • #{{ item.slot }}-label
  • #{{ item.slot }}-trailing
  1. Home
  2. Components
  3. Breadcrumb
{
  "wait": "Loading client-side content..."
}
You can also use the #item, #item-leading, #item-label and #item-trailing slots to customize all items.

API

Props

Prop Default Type
as'nav'any

The element or component this component should render as.

items BreadcrumbItem[]
  • label?: string
  • icon?: IconComponent
  • avatar?: AvatarProps
  • slot?: string
  • class?: any
  • b24ui?: Pick<{ root?: ClassNameValue; list?: ClassNameValue; item?: ClassNameValue; link?: ClassNameValue; linkLeadingIcon?: ClassNameValue; linkLeadingAvatar?: ClassNameValue; linkLeadingAvatarSize?: ClassNameValue; linkLabel?: ClassNameValue; separator?: ClassNameValue; separatorIcon?: ClassNameValue; }, "separatorIcon" | "link" | "item" | "linkLeadingIcon" | "linkLeadingAvatar" | "linkLabel" | "separator">
  • as?: any

    The element or component this component should render as when not a link. Defaults to 'button'.

  • to?: string | RouteLocationAsRelativeGeneric | RouteLocationAsPathGeneric

    Route Location the link should navigate to when clicked on.

  • autofocus?: Booleanish
  • disabled?: boolean
  • name?: string
  • type?: "submit" | "reset" | "button"

    The type of the button when not a link. Defaults to 'button'.

  • download?: any
  • hreflang?: string
  • media?: string
  • ping?: string
  • target?: (string & {}) | "_blank" | "_parent" | "_self" | "_top" | null

    Where to display the linked URL, as the name for a browsing context.

  • referrerpolicy?: HTMLAttributeReferrerPolicy
  • active?: boolean

    Force the link to be active independent of the current route.

  • isAction?: boolean

    When true, uses special underlined styling.

  • trailingSlash?: "append" | "remove"

    An option to either add or remove trailing slashes in the href for this specific link. Overrides the global trailingSlash option if provided.

separatorIconicons.chevronRightIconComponent

The icon to use as a separator.

labelKey'label' string | number

The key used to get the label from the item.

b24ui { root?: ClassNameValue; list?: ClassNameValue; item?: ClassNameValue; link?: ClassNameValue; linkLeadingIcon?: ClassNameValue; linkLeadingAvatar?: ClassNameValue; linkLeadingAvatarSize?: ClassNameValue; linkLabel?: ClassNameValue; separator?: ClassNameValue; separatorIcon?: ClassNameValue; }

Slots

Slot Type
item{ item: BreadcrumbItem; index: number; active?: boolean | undefined; b24ui: object; }
item-leading{ item: BreadcrumbItem; index: number; active?: boolean | undefined; b24ui: object; }
item-label{ item: BreadcrumbItem; index: number; active?: boolean | undefined; }
item-trailing{ item: BreadcrumbItem; index: number; active?: boolean | undefined; }
separator{ b24ui: object; }

Theme

app.config.ts
export default defineAppConfig({
  b24ui: {
    breadcrumb: {
      slots: {
        root: 'relative min-w-0',
        list: 'flex items-center gap-[6px]',
        item: 'flex min-w-0',
        link: 'group relative flex items-center gap-[6px] text-(length:--ui-font-size-sm) min-w-0 -mt-px focus-visible:outline-(--ui-color-accent-main-primary)',
        linkLeadingIcon: 'shrink-0 size-[20px]',
        linkLeadingAvatar: 'shrink-0',
        linkLeadingAvatarSize: '2xs',
        linkLabel: 'truncate',
        separator: 'flex',
        separatorIcon: 'shrink-0 size-[20px] text-(--ui-color-base-6)'
      },
      variants: {
        active: {
          true: {
            link: 'text-(--ui-color-design-selection-content) hover:text-(--ui-color-accent-main-primary-alt-2) hover:underline font-(--ui-font-weight-semi-bold)'
          },
          false: {
            link: 'text-(--b24ui-typography-legend-color) font-(--ui-font-weight-medium)'
          }
        },
        disabled: {
          true: {
            link: 'cursor-not-allowed opacity-30'
          }
        },
        to: {
          true: ''
        }
      },
      compoundVariants: [
        {
          disabled: false,
          active: false,
          to: true,
          class: {
            link: 'hover:text-(--ui-color-accent-main-primary-alt-2) hover:underline transition-colors'
          }
        }
      ]
    }
  }
})
vite.config.ts
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import bitrix24UIPluginVite from '@bitrix24/b24ui-nuxt/vite'

export default defineConfig({
  plugins: [
    vue(),
    bitrix24UIPluginVite({
      b24ui: {
        breadcrumb: {
          slots: {
            root: 'relative min-w-0',
            list: 'flex items-center gap-[6px]',
            item: 'flex min-w-0',
            link: 'group relative flex items-center gap-[6px] text-(length:--ui-font-size-sm) min-w-0 -mt-px focus-visible:outline-(--ui-color-accent-main-primary)',
            linkLeadingIcon: 'shrink-0 size-[20px]',
            linkLeadingAvatar: 'shrink-0',
            linkLeadingAvatarSize: '2xs',
            linkLabel: 'truncate',
            separator: 'flex',
            separatorIcon: 'shrink-0 size-[20px] text-(--ui-color-base-6)'
          },
          variants: {
            active: {
              true: {
                link: 'text-(--ui-color-design-selection-content) hover:text-(--ui-color-accent-main-primary-alt-2) hover:underline font-(--ui-font-weight-semi-bold)'
              },
              false: {
                link: 'text-(--b24ui-typography-legend-color) font-(--ui-font-weight-medium)'
              }
            },
            disabled: {
              true: {
                link: 'cursor-not-allowed opacity-30'
              }
            },
            to: {
              true: ''
            }
          },
          compoundVariants: [
            {
              disabled: false,
              active: false,
              to: true,
              class: {
                link: 'hover:text-(--ui-color-accent-main-primary-alt-2) hover:underline transition-colors'
              }
            }
          ]
        }
      }
    })
  ]
})

User

A component to display user details, including their name, bio, and profile picture.

CommandPalette

A searchable command palette powered by Fuse.js for fast, fuzzy text search.

On this page

  • Usage
    • Items
    • Separator Icon
  • Examples
    • With separator slot
    • With custom slot
  • API
    • Props
    • Slots
  • Theme
Releases
Published under MIT License.

Copyright © 2024-present Bitrix24