diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index b7d79ae..35faa13 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -47,7 +47,8 @@ export default defineConfig({ { text: "Single Select", link: "/demo/single-select" }, { text: "Multiple Select", link: "/demo/multiple-select" }, { text: "Custom Option Slot", link: "/demo/custom-option-slot" }, - { text: "Pre-Selected Values (single & multi)", link: "/demo/pre-selected-values" }, + { text: "Custom Tag Slot", link: "/demo/custom-tag-slot" }, + { text: "Pre-Selected Values", link: "/demo/pre-selected-values" }, { text: "Disabled Options", link: "/demo/disabled-options" }, { text: "With Menu Header", link: "/demo/with-menu-header" }, { text: "With Complex Menu Filter", link: "/demo/with-complex-menu-filter.md" }, diff --git a/docs/demo/custom-tag-slot.md b/docs/demo/custom-tag-slot.md new file mode 100644 index 0000000..192cd1c --- /dev/null +++ b/docs/demo/custom-tag-slot.md @@ -0,0 +1,106 @@ +--- +title: 'Custom Tag Slot' +--- + +# Custom Tag Slot + +The following example demonstrates how to use the `VueSelect` component with a custom slot `#tag` when using the `isMulti` prop. + +::: info +Read more about available [slots here](../slots.md) and the `isMulti` prop [here](../props.md#isMulti). +::: + + + + + + + + + +## Demo source-code + +```vue + + + + + + + +``` diff --git a/docs/slots.md b/docs/slots.md index f41e841..8093e2b 100644 --- a/docs/slots.md +++ b/docs/slots.md @@ -14,7 +14,7 @@ If you are not familiar with Vue's slots, you can read more about them [here](ht **Type**: `slotProps: { option: Option }` -Customize the rendered HTML of an option inside the menu. You can use the slot props to retrieve the current menu option that will be rendered. +Customize the rendered template of an option inside the menu. You can use the slot props to retrieve the current menu option that will be rendered. ```vue