-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: Breadcrumb | ||
description: Displays the path to the current resource using a hierarchy of links. | ||
--- | ||
|
||
import { Steps } from "@astrojs/starlight/components"; | ||
import { Tabs, TabItem, Code } from "@astrojs/starlight/components"; | ||
|
||
<ComponentPreview name="breadcrumb-demo" /> | ||
|
||
## Installation | ||
|
||
<Tabs> | ||
<TabItem label="CLI"> | ||
```bash frame="code" | ||
npx shadcn-ng@latest add breadcrumb | ||
``` | ||
</TabItem> | ||
|
||
<TabItem label="Manual"> | ||
<Steps> | ||
1. Copy and paste the following code into your project. | ||
<ComponentSource name="breadcrumb" /> | ||
|
||
2. Update the import paths to match your project setup. | ||
</Steps> | ||
|
||
</TabItem> | ||
</Tabs> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { Component } from "@angular/core"; | ||
|
||
import { | ||
UbBreadcrumbDirective, | ||
UbBreadcrumbListDirective, | ||
UbBreadcrumbItemDirective, | ||
UbBreadcrumbLinkDirective, | ||
UbBreadcrumbSeparatorComponent, | ||
UbBreadcrumbEllipsisComponent, | ||
UbBreadcrumbPageDirective, | ||
} from "@/registry/default/ui/breadcrumb.directive"; | ||
|
||
@Component({ | ||
standalone: true, | ||
imports: [ | ||
UbBreadcrumbDirective, | ||
UbBreadcrumbListDirective, | ||
UbBreadcrumbItemDirective, | ||
UbBreadcrumbLinkDirective, | ||
UbBreadcrumbSeparatorComponent, | ||
UbBreadcrumbEllipsisComponent, | ||
UbBreadcrumbPageDirective, | ||
], | ||
template: ` | ||
<nav ubBreadcrumb> | ||
<ol ubBreadcrumbList> | ||
<li ubBreadcrumbItem> | ||
<a ubBreadcrumbLink>Home</a> | ||
</li> | ||
<li ubBreadcrumbSeparator></li> | ||
<li ubBreadcrumbItem> | ||
<span ubBreadcrumbEllipsis></span> | ||
</li> | ||
<li ubBreadcrumbSeparator></li> | ||
<li ubBreadcrumbItem> | ||
<a ubBreadcrumbLink>Components</a> | ||
</li> | ||
<li ubBreadcrumbSeparator></li> | ||
<li ubBreadcrumbItem> | ||
<span ubBreadcrumbPage>Breadcrumb</span> | ||
</li> | ||
</ol> | ||
</nav> | ||
`, | ||
}) | ||
export class BreadcrumbDemoComponent {} | ||
|
||
export default BreadcrumbDemoComponent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { Component } from "@angular/core"; | ||
|
||
import { | ||
UbBreadcrumbDirective, | ||
UbBreadcrumbListDirective, | ||
UbBreadcrumbItemDirective, | ||
UbBreadcrumbLinkDirective, | ||
UbBreadcrumbSeparatorComponent, | ||
UbBreadcrumbEllipsisComponent, | ||
UbBreadcrumbPageDirective, | ||
} from "@/registry/new-york/ui/breadcrumb.directive"; | ||
|
||
@Component({ | ||
standalone: true, | ||
imports: [ | ||
UbBreadcrumbDirective, | ||
UbBreadcrumbListDirective, | ||
UbBreadcrumbItemDirective, | ||
UbBreadcrumbLinkDirective, | ||
UbBreadcrumbSeparatorComponent, | ||
UbBreadcrumbEllipsisComponent, | ||
UbBreadcrumbPageDirective, | ||
], | ||
template: ` | ||
<nav ubBreadcrumb> | ||
<ol ubBreadcrumbList> | ||
<li ubBreadcrumbItem> | ||
<a ubBreadcrumbLink>Home</a> | ||
</li> | ||
<li ubBreadcrumbSeparator></li> | ||
<li ubBreadcrumbItem> | ||
<span ubBreadcrumbEllipsis></span> | ||
</li> | ||
<li ubBreadcrumbSeparator></li> | ||
<li ubBreadcrumbItem> | ||
<a ubBreadcrumbLink>Components</a> | ||
</li> | ||
<li ubBreadcrumbSeparator></li> | ||
<li ubBreadcrumbItem> | ||
<span ubBreadcrumbPage>Breadcrumb</span> | ||
</li> | ||
</ol> | ||
</nav> | ||
`, | ||
}) | ||
export class BreadcrumbDemoComponent {} | ||
|
||
export default BreadcrumbDemoComponent; |