diff --git a/docs/app/components/content/examples/breadcrumb/BreadcrumbCustomSlotExample.vue b/docs/app/components/content/examples/breadcrumb/BreadcrumbCustomSlotExample.vue new file mode 100644 index 00000000..b5adde51 --- /dev/null +++ b/docs/app/components/content/examples/breadcrumb/BreadcrumbCustomSlotExample.vue @@ -0,0 +1,32 @@ + + + diff --git a/docs/app/components/content/examples/breadcrumb/BreadcrumbExample.vue b/docs/app/components/content/examples/breadcrumb/BreadcrumbExample.vue new file mode 100644 index 00000000..97a57269 --- /dev/null +++ b/docs/app/components/content/examples/breadcrumb/BreadcrumbExample.vue @@ -0,0 +1,18 @@ + + + diff --git a/docs/app/components/content/examples/breadcrumb/BreadcrumbSeparatorExample.vue b/docs/app/components/content/examples/breadcrumb/BreadcrumbSeparatorExample.vue new file mode 100644 index 00000000..cb709294 --- /dev/null +++ b/docs/app/components/content/examples/breadcrumb/BreadcrumbSeparatorExample.vue @@ -0,0 +1,16 @@ + + + diff --git a/docs/app/components/content/examples/breadcrumb/BreadcrumbSeparatorSlotExample.vue b/docs/app/components/content/examples/breadcrumb/BreadcrumbSeparatorSlotExample.vue new file mode 100644 index 00000000..2d31ccc8 --- /dev/null +++ b/docs/app/components/content/examples/breadcrumb/BreadcrumbSeparatorSlotExample.vue @@ -0,0 +1,20 @@ + + + diff --git a/docs/content/3.components/breadcrumb.md b/docs/content/3.components/breadcrumb.md index 8135a361..01f8ab0e 100644 --- a/docs/content/3.components/breadcrumb.md +++ b/docs/content/3.components/breadcrumb.md @@ -8,8 +8,45 @@ links: ## Usage +Use the `items` prop as an array of objects with the following properties: + +- `label?: string`{lang="ts-type"} +- `icon?: string`{lang="ts-type"} +- `avatar?: AvatarProps`{lang="ts-type"} +- `slot?: string`{lang="ts-type"} + +You can also pass any property from [NuxtLink](https://nuxt.com/docs/api/components/nuxt-link#props) component such as `to`, `target`, etc. + +:component-example{name="breadcrumb-example"} + +::tip +A `span` will be rendered instead of a link when the `to` property is not defined. +:: + +### Separator + +Use the `separatorIcon` prop to customize the icon between each item. Defaults to `i-heroicons-chevron-right-20-solid`. + +:component-example{name="breadcrumb-separator-example"} + +::tip +You can customize this icon globally in your `app.config.ts` under `ui.icons.chevronRight` key. +:: + ## Examples +### With separator slot + +Use the `#separator` slot to customize the separator between each item. + +:component-example{name="breadcrumb-separator-slot-example"} + +### With custom slot + +Use the `slot` property to customize a specific item. + +:component-example{name="breadcrumb-custom-slot-example"} + ## API ### Props