Skip to content

PubBreadcrumb

This is a component for displaying a breadcrumb navigation. It provides a list of links to navigate between different pages or sections of a website.

Default breadcrumb

vue
<template>
    <pub-breadcrumb>
        <pub-breadcrumb-item home href="#"> Home </pub-breadcrumb-item>
        <pub-breadcrumb-item href="#"> Projects </pub-breadcrumb-item>
        <pub-breadcrumb-item> Flowbite </pub-breadcrumb-item>
    </pub-breadcrumb>
</template>

<script setup>
import { PubBreadcrumb, PubBreadcrumbItem } from "vuelicity";
</script>

Solid breadcrumb

Prop - solid Usage

The solid prop can be used to change the background color of the breadcrumb.

vue
<template>
    <pub-breadcrumb solid>
        <pub-breadcrumb-item home href="#"> Home </pub-breadcrumb-item>
        <pub-breadcrumb-item href="#"> Projects </pub-breadcrumb-item>
        <pub-breadcrumb-item> Flowbite </pub-breadcrumb-item>
    </pub-breadcrumb>
</template>

<script setup>
import { PubBreadcrumb, PubBreadcrumbItem } from "vuelicity";
</script>

Custom Icons

Slot - arrow-icon and home-icon Usage

The arrow-icon and home-icon slots can be used to customize the icons used in the breadcrumb.

vue
<template>
    <pub-breadcrumb>
        <pub-breadcrumb-item home href="#">
            <template #home-icon>
                <pub-icon name="folder" />
            </template>
            Home
        </pub-breadcrumb-item>
        <pub-breadcrumb-item href="#">
            <template #arrow-icon>
                <pub-icon name="arrow-right" />
            </template>
            Projects
        </pub-breadcrumb-item>
        <pub-breadcrumb-item>
            <template #arrow-icon>
                <pub-icon name="arrow-right" />
            </template>
            Flowbite
        </pub-breadcrumb-item>
    </pub-breadcrumb>
</template>

<script setup>
import { PubBreadcrumb, PubBreadcrumbItem, PubIcon } from "vuelicity";
</script>

Reference

PubBreadcrumb

Properties

NameTypeDefaultDescriptionOptions
solidBooleanfalseWhether the breadcrumb should have a solid background.

Slots

NameDescription
defaultSlot for PubBreadcrumbItem components.

PubBreadcrumbItem

Properties

NameTypeDefaultDescriptionOptions
hrefStringnullThe URL to navigate to when the link is clicked.
homeBooleanfalseThe icon to display next to the link text.

Slots

NameDescription
defaultSlot for the link text.
home-iconSlot for the home icon.
arrow-iconSlot for the arrow icon.

Released under the MIT License.