mirror of
https://github.com/hunvreus/basecoat.git
synced 2026-11-12 13:18:22 +00:00
57 lines
2.1 KiB
Plaintext
57 lines
2.1 KiB
Plaintext
---
|
|
layout: layouts/component.njk
|
|
title: Breadcrumb
|
|
description: Displays the path to the current resource using a hierarchy of links.
|
|
toc:
|
|
- label: Usage
|
|
id: usage
|
|
---
|
|
|
|
{% from "macros/code_preview.njk" import code_preview %}
|
|
{% from "macros/code_block.njk" import code_block %}
|
|
{% from "components/dropdown-menu.njk" import dropdown_menu %}
|
|
|
|
<div class="alert mb-6">
|
|
{% lucide "circle-alert" %}
|
|
<h2>There is no dedicated breadcrumb component in Basecoat.</h2>
|
|
</div>
|
|
|
|
{% set code %}<ol class="text-muted-foreground flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5">
|
|
<li class="inline-flex items-center gap-1.5">
|
|
<a href="#" class="hover:text-foreground transition-colors">Home</a>
|
|
</li>
|
|
<li>{% lucide "chevron-right", { "class": "size-3.5" } %}</li>
|
|
<li class="inline-flex items-center gap-1.5">
|
|
{% set trigger %}
|
|
{% lucide "ellipsis" %}
|
|
{% endset %}
|
|
{% call dropdown_menu(
|
|
id="demo-breadcrumb-menu",
|
|
trigger=trigger,
|
|
trigger_attrs={"class": "flex size-9 items-center justify-center h-4 w-4 hover:text-foreground cursor-pointer"}
|
|
) %}
|
|
<nav role="menu">
|
|
<button type="button" role="menuitem">Documentation</button>
|
|
<button type="button" role="menuitem">Themes</button>
|
|
<button type="button" role="menuitem">GitHub</button>
|
|
</nav>
|
|
{% endcall %}
|
|
</li>
|
|
<li>{% lucide "chevron-right", { "class": "size-3.5" } %}</li>
|
|
<li class="inline-flex items-center gap-1.5">
|
|
<a href="#" class="hover:text-foreground transition-colors">Components</a>
|
|
</li>
|
|
<li>{% lucide "chevron-right", { "class": "size-3.5" } %}</li>
|
|
<li class="inline-flex items-center gap-1.5">
|
|
<span class="text-foreground font-normal">Breadcrumb</span>
|
|
</li>
|
|
</ol>{% endset %}
|
|
{{ code_preview("dropdown-menu", code | prettyHtml) }}
|
|
|
|
<h2 id="usage"><a href="#usage">Usage</a></h2>
|
|
|
|
<section class="prose my-6">
|
|
<p>Using Tailind and the <a href="/components/dropdown-menu" class="font-medium underline underline-offset-4">Dropdown Menu</a> component you can get a breadcrumb component:</p>
|
|
</section>
|
|
|
|
{{ code_block(code | prettyHtml) }} |