diff --git a/docs/content/docs/2.components/input-menu.md b/docs/content/docs/2.components/input-menu.md index 74d8c77615..3f5382ef36 100644 --- a/docs/content/docs/2.components/input-menu.md +++ b/docs/content/docs/2.components/input-menu.md @@ -231,6 +231,43 @@ You can customize this icon globally in your `vite.config.ts` under `ui.icons.cl ::: :: +### Collapse tags +With ``multiple`` enabled, you can set a maximum number of selected items to display as tags. Any additional selected items will be shown in a counter. + +::component-code +--- +prettier: true ignore: +- modelValue : + - backlog + - Todo +- mutliple external: +- collapse-tags: 2 +- items : + - Backlog + - Todo + - In Progress + - Done +--- +:: +### Collapse hover +With ``multiple`` and ``collapse-tags`` enabled, hovering over the counter in the tags will display the remaining selected items. + +::component-code +--- +prettier: true ignore: +- modelValue: + - backlog + - Todo +- multiple external: +- collapse-tags: 2 +- collapse-hover external: +- items : + - Backlog + - Todo + - In Progress + - Done +--- +:: ### Placeholder Use the `placeholder` prop to set a placeholder text. diff --git a/playgrounds/nuxt/app/pages/components/input-menu.vue b/playgrounds/nuxt/app/pages/components/input-menu.vue index 67f434d0c2..4d97aecc00 100644 --- a/playgrounds/nuxt/app/pages/components/input-menu.vue +++ b/playgrounds/nuxt/app/pages/components/input-menu.vue @@ -59,6 +59,7 @@ const { data: users, status } = await useFetch('https://jsonplaceholder.typicode const value = ref('Apple') const valueMultiple = ref([fruits[0]!, vegetables[0]!]) +const valueMaxValue = ref([fruits[0]!, fruits[1]!, vegetables[0]!, vegetables[1]!])