\n \u003C/template>\n\n \u003Ctemplate v-else>\n \u003CDynamicRenderer :config=\"slotContent\" :key=\"slotContent.name || slotName\" />\n \u003C/template>\n \u003C/template>\n \u003C/component>\n\u003C/template>\n```\n\n\n\n#### `index.vue`\n```vue\n\u003Cscript setup lang=\"ts\">\nimport { UButton, UCard, UContainer, UForm, UFormField, UInput } from '#components'\n\nconst config = {\n component: UContainer,\n class: 'h-screen flex justify-center items-center',\n slots: {\n default: [\n {\n component: UCard,\n slots: {\n default: [{\n component: UForm,\n class: 'space-y-4',\n slots: {\n default: [\n {\n component: UFormField,\n label: 'Username',\n name: 'username',\n required: true,\n slots: {\n default: [\n {\n component: UInput,\n placeholder: 'Enter Username',\n value: 'hh'\n }\n ]\n }\n },\n {\n component: UFormField,\n label: 'Password',\n name: 'password',\n required: true,\n slots: {\n default: [\n {\n component: UInput,\n type: 'password',\n placeholder: 'Enter Password',\n value: 'hh'\n }\n ]\n }\n },\n {\n component: UButton,\n label: 'Login',\n icon: 'i-lucide-user',\n variant: 'soft',\n type: 'submit',\n block: true\n }\n ]\n }\n }]\n }\n }\n ]\n }\n}\n\u003C/script>\n\n\u003Ctemplate>\n \u003CDynamicRenderer :config=\"config\" />\n\u003C/template>\n```\n\n### Result \n\n\nIt would also be great if using this approach could eliminate the need to manually import components like:\n\n```ts\nimport { UButton, UCard, UContainer, UForm, UFormField, UInput } from '#components'\n```\n\nand instead rely on automatic resolution by the renderer itself.\n\nThanks for your work on Nuxt UI – it’s a fantastic toolkit!\n\n### Additional context\n\n_No response_",[2904,2907],{"name":2905,"color":2906},"enhancement","a2eeef",{"name":2908,"color":2909},"triage","ffffff",4138,"nuxt","ui","open","✨ Feature Request: Add `\u003CDynamicRenderer>` component for config-driven UI rendering","2025-05-12T16:36:30Z","https://github.com/nuxt/ui/issues/4138",0.73083234,{"description":2919,"labels":2920,"number":2926,"owner":2911,"repository":2912,"state":2913,"title":2927,"updated_at":2928,"url":2929,"score":2930},"### Description\n\nI propose the addition of a UTheme component which would allow scoped theming of components to reduce repeated styling that's error prone when refactoring.\n\n## Example\nThe Dashboard template has a bunch of forms that have horizontal form fields (label left, input right).\n\nBefore:\n```html\n\u003CUForm ...>\n \u003CUFormField ... class=\"flex max-sm:flex-col justify-between items-center gap-4\">\n ...\n \u003CUFormField>\n \u003CUFormField ... class=\"flex max-sm:flex-col justify-between items-center gap-4\">\n ...\n \u003CUFormField>\n\u003CUForm/>\n```\n\nAfter:\n```html\n\u003C!-- `ui` prop is the same as `app.config.ts` theming config\n\u003CUTheme :ui=\"{\n formField: {\n\t slots: {\n\t root: \"flex max-sm:flex-col justify-between items-center gap-4\",\n\t},\n },\n}\">\n \u003CUForm ...>\n \u003CUFormField ...>\n ...\n \u003CUFormField>\n \u003CUFormField ...>\n ...\n \u003CUFormField>\n \u003CUForm/>\n\u003C/UTheme>\n```\n\n## Benefits\n- Easily componentized. I could create a `AppForm` component which contains the `UTheme` usage with a slot, so now its 1 line to get the exact theming that I want. This makes consistency across the app really easy.\n- Nestable - If implemented with provide/inject, you could have an infinite number of UTheme's nested and it would take the latest one\n\n## Implementation\nI'd tentatively be willing to implement this. My approach would be:\n- Create `UTheme`, it should have a `ui` and `uiPro` prop, each of which take the same type as the `app.config.ts`\n- `provide()` those props\n- `inject()` those props into each component and merge with passed in `ui` field.\n- Theme priority order should be:\n 1. `ui` prop passed to component\n 2. `ui` prop coming from UTheme component\n 3. `ui` config coming from `app.config.ts`\n\n### Additional context\n\n_No response_",[2921,2922,2925],{"name":2905,"color":2906},{"name":2923,"color":2924},"v3","49DCB8",{"name":2908,"color":2909},4250,"UTheme component","2025-05-28T22:24:36Z","https://github.com/nuxt/ui/issues/4250",0.74063087,{"description":2932,"labels":2933,"number":2938,"owner":2911,"repository":2912,"state":2913,"title":2939,"updated_at":2940,"url":2941,"score":2942},"### Description\n\nIs it possible to use a UForm within a UModal, but have the submit button in the modal's footer? I tried to wrap the whole modal with no success:\n\n```vue\n\u003Ctemplate>\n \u003CUForm :schema=\"userCreateSchema\" :state @submit=\"onSubmit\">\n \u003CUModal title=\"Create user\">\n \u003Ctemplate #body>\n \u003CUFormField label=\"First name\" name=\"givenName\" required>\n \u003CUInput v-model=\"state.givenName\" />\n \u003C/UFormField>\n\n \u003CUFormField label=\"Last name\" name=\"familyName\" required>\n \u003CUInput v-model=\"state.familyName\" />\n \u003C/UFormField>\n \u003C/template>\n\n \u003Ctemplate #footer>\n \u003CUButton label=\"Save\" type=\"submit\" />\n \u003C/template>\n \u003C/UModal>\n \u003C/UForm>\n\u003C/template>\n```",[2934,2937],{"name":2935,"color":2936},"question","d876e3",{"name":2923,"color":2924},4401,"How to use a UForm within a UModal with footer?","2025-06-26T12:51:18Z","https://github.com/nuxt/ui/issues/4401",0.7415467,{"description":2944,"labels":2945,"number":2951,"owner":2911,"repository":2912,"state":2913,"title":2952,"updated_at":2953,"url":2954,"score":2955},"### Environment\n\n- Operating System: `Windows_NT`\n- Node Version: `v22.13.1`\n- Nuxt Version: `3.16.1`\n- CLI Version: `3.23.1`\n- Nitro Version: `2.11.7`\n- Package Manager: `yarn@1.22.22`\n- Builder: `-`\n- User Config: `compatibilityDate`, `extends`, `modules`, `css`, `app`, `linkChecker`, `build`, `schemaOrg`, `sitemap`, `robots`, `future`, `runtimeConfig`, `imports`, `ui`, `image`, `dayjs`, `prismic`\n- Runtime Modules: `@nuxtjs/prismic@4.1.0`, `nuxt-swiper@2.0.0`, `dayjs-nuxt@2.1.11`, `@nuxt/ui@3.0.0`, `@zadigetvoltaire/nuxt-gtm@0.0.13`, `@nuxtjs/seo@3.0.1`, `@nuxt/scripts@0.11.2`\n- Build Modules: `-`\n\n\n### Is this bug related to Nuxt or Vue?\n\nNuxt\n\n### Version\n\n3.0.0\n\n### Reproduction\n\nnot needed\n\n### Description\n\nThe header with a lot of text in mobile is getting squashed. I believe the problem is the min-h-16 utility.\n\n\n\n### Additional context\n\n_No response_\n\n### Logs\n\n```shell-script\n\n```",[2946,2949,2950],{"name":2947,"color":2948},"bug","d73a4a",{"name":2923,"color":2924},{"name":2908,"color":2909},3635,"UModal Header height clipped","2025-03-20T13:20:49Z","https://github.com/nuxt/ui/issues/3635",0.74327654,{"description":2957,"labels":2958,"number":2960,"owner":2911,"repository":2912,"state":2961,"title":2962,"updated_at":2963,"url":2964,"score":2965},"### For what version of Nuxt UI are you asking this question?\n\nv2.x\n\n### Description\n\nI have a form like the following example:\n```vue\n\u003Ctemplate>\n \u003Cdiv>\n \u003Ch1>Training Form\u003C/h1>\n \u003C/div>\n \u003CUForm :state=\"state\" :schema=\"schema\" @submit=\"handleSubmit\">\n \u003CUFormGroup label=\"Name\" name=\"name\">\n \u003CUInput v-model=\"state.name\" />\n \u003C/UFormGroup>\n \u003CUFormGroup label=\"Training Week\" name=\"trainingWeek\">\n \u003Cdiv v-for=\"(day, index) in state.trainingWeek\" :key=\"index\">\n \u003CUFormGroup label=\"Day\" name=\"trainingWeek[' + index + '].day\">\n \u003CUInput v-model=\"day.day\" />\n \u003C/UFormGroup>\n \u003CUFormGroup label=\"Exercises\" name=\"trainingWeek[' + index + '].exercises\">\n \u003Cdiv v-for=\"(exercise, exerciseIndex) in day.exercises\" :key=\"exerciseIndex\">\n \u003CUInput v-model=\"exercise.exerciseName\" />\n \u003C/div>\n \u003C/UFormGroup>\n \u003Cdiv class=\"mt-4 flex justify-end\">\n \u003CUButton @click=\"addExercise(index)\">Add Exercise\u003C/UButton>\n \u003C/div>\n \u003C/div>\n \u003C/UFormGroup>\n \u003Cdiv class=\"mt-4 flex justify-end\">\n \u003CUButton @click=\"addDay\">Add Day\u003C/UButton>\n \u003CUButton type=\"submit\">Submit\u003C/UButton>\n \u003C/div>\n \u003C/UForm>\n\u003C/template>\n\n\u003Cscript setup lang=\"ts\">\nimport { z } from \"zod\";\nimport type { FormSubmitEvent } from \"#ui/types\";\nconst state = reactive({\n name: \"\",\n trainingWeek: [\n {\n day: \"\",\n exercises: [\n {\n exerciseName: \"\",\n },\n ],\n },\n ],\n});\n\nconst schema = z.object({\n name: z.string().min(1, \"Required field\"),\n trainingWeek: z.array(\n z.object({\n day: z.string().min(1, \"Required field\"),\n exercises: z.array(\n z.object({\n exerciseName: z.string().min(1, \"Required field\"),\n }),\n ),\n }),\n ),\n});\n\ntype Schema = z.infer\u003Ctypeof schema>;\n\nconst handleSubmit = (event: FormSubmitEvent\u003CSchema>) => {\n console.log(JSON.stringify(event.data, null, 2));\n};\n\nconst addExercise = (index: number) => {\n state.trainingWeek[index].exercises.push({ exerciseName: \"\" });\n};\n\nconst addDay = () => {\n state.trainingWeek.push({ day: \"\", exercises: [{ exerciseName: \"\" }] });\n};\n\u003C/script>\n\n```\n\nI render the form based on state and dynamically add fields.\n\nThe form automatically sets up errors for name ( or any first level fields ) but doesn't set up errors for nested ones like day or exerciseName in the above example\n\nWhat's the proper way to create dynamic forms and avail error setting ? \n\nI'm able to get the following:\n```json\nprofile.vue:68 ZodError: [\n {\n \"code\": \"too_small\",\n \"minimum\": 1,\n \"type\": \"string\",\n \"inclusive\": true,\n \"exact\": false,\n \"message\": \"Required field\",\n \"path\": [\n \"trainingWeek\",\n 0,\n \"day\"\n ]\n },\n {\n \"code\": \"too_small\",\n \"minimum\": 1,\n \"type\": \"string\",\n \"inclusive\": true,\n \"exact\": false,\n \"message\": \"Required field\",\n \"path\": [\n \"trainingWeek\",\n 0,\n \"exercises\",\n 0,\n \"exerciseName\"\n ]\n }\n]\n```\noutput by parsing schema \n```js\nwatchEffect(() => {\n try {\n schema.parse(state);\n } catch (error) {\n console.error(error);\n }\n});\n```\n\n",[2959],{"name":2935,"color":2936},2674,"closed","How to ensure UForm and UFormGroup auto assigns errors for nested dynamic form.","2024-11-18T16:59:59Z","https://github.com/nuxt/ui/issues/2674",0.68505937,{"description":2967,"labels":2968,"number":2975,"owner":2911,"repository":2912,"state":2961,"title":2976,"updated_at":2977,"url":2978,"score":2979},"### For what version of Nuxt UI are you asking this question?\n\nv2.x\n\n### Description\n\nHow can i use [Zod](https://zod.dev/) to validate an [UInput file field](https://ui.nuxt.com/components/input#type)? \n\nLet's say you have the following code:\n(I found the example over [here](https://blog.stackademic.com/upgrade-your-full-stack-form-validation-with-zod-and-react-hook-form-in-next-js-107b014628a3).)\n\n```vue\n\u003CUForm :schema=\"schema\" :state=\"state\" @submit=\"onSubmit\">\n\n \u003CUFormGroup name=\"picture\" label=\"Picture\">\n \u003CUInput v-model=\"state.picture\" type=\"file\" @change=\"onChangeFile\"/>\n \u003C/UFormGroup>\n\n \u003CUButton type=\"submit\">\n Submit\n \u003C/UButton>\n\n\u003C/UForm>\n```\n\n```ts\n\u003Cscript setup lang=\"ts\">\n import { z } from 'zod';\n\n const state = reactive({\n picture: undefined,\n })\n\n const schema = z.object({\n picture: z.custom\u003CFileList>()\n .transform((val) => {\n if (val instanceof File) return val;\n if (val instanceof FileList) return val[0];\n return null;\n })\n .superRefine((file, ctx) => {\n if (!(file instanceof File)) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n fatal: true,\n message: 'Not a file',\n });\n return z.NEVER;\n }\n if (file.size > 5 * 1024 * 1024) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Max file size allowed is 5MB',\n });\n }\n if (\n !['image/jpeg', 'image/png', 'image/webp', 'image/jpg'].includes(\n file.type\n )\n ) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'File must be an image (jpeg, jpg, png, webp)',\n });\n }\n })\n });\n\n type Schema = z.infer\u003Ctypeof schema>;\n\n async function onSubmit (event: FormSubmitEvent\u003CSchema>) {\n console.log(event.data);\n }\n\u003C/script>\n```\n\nAs aspected the following onChange function logs a FileList\n\n```ts\nfunction onChangeFile(event: Event) {\n console.log(event)\n}\n```\n\nBut when I log val in the transform function of Zod\n\n```ts\n.transform((val) => {\n console.log(val);\n if (val instanceof File) return val;\n if (val instanceof FileList) return val[0];\n return null;\n})\n```\n\nI get a string like this:\n\n```\nC:\\fakepath\\Screenshot 2024-10-25 at 10.26.36.png\n```\n\nCan someone please help me out, i'm looking for a few days now for a solution.",[2969,2970,2973],{"name":2935,"color":2936},{"name":2971,"color":2972},"closed-by-bot","ededed",{"name":2974,"color":2972},"stale",2462,"UInput with type='file', how to validate with Zod?","2025-06-18T09:05:55Z","https://github.com/nuxt/ui/issues/2462",0.6896463,{"description":2981,"labels":2982,"number":2986,"owner":2911,"repository":2912,"state":2961,"title":2987,"updated_at":2988,"url":2989,"score":2990},"### Environment\n\n- Operating System: Darwin\n- Node Version: v20.18.3\n- Nuxt Version: 3.16.2\n- CLI Version: 3.24.1\n- Nitro Version: 2.11.9\n- Package Manager: bun@1.1.28\n- Builder: -\n- User Config: devtools, modules, css, future, compatibilityDate\n- Runtime Modules: @nuxt/ui@3.0.2, @nuxt/eslint@1.3.0\n- Build Modules: -\n\n### Is this bug related to Nuxt or Vue?\n\nNuxt\n\n### Version\n\nv3.0.2\n\n### Reproduction\n\nhttps://stackblitz.com/edit/github-s2opq2ko?file=app/pages/index.vue\n\n### Description\n\nGiven this component nesting:\n\n- `UForm`\n - `UModal`\n - `UForm`\n\nThis is rendered as the following html:\n\n- `UForm` -> `form` - ✅\n - `UModal` -> `div` - ✅ (teleported to root)\n - `UForm` -> `div` - ❌ I am expecting `form`.\n\nI couldn't find a mention in the documentation that this is expected behaviour.\n\nTo reproduce:\n1. Run reproduction\n2. Click \"Open modal\" button\n3. Inspect the nested form element. It's a `div`:\n\n\nI am happy to have a crack at a PR, if you're willing to point me in the right direction 😌\n\n\n### Additional context\n\nFor context, this is our use case:\n* User fills out an onboarding form\n* One field in the onboarding form is business details\n* User has option to populate business details via business number (eg. [DUNS](https://www.dnb.com/en-us/smb/duns.html))\n* Business number field open in modal\n* User can enter business number in form in modal\n* User submits form, it populates state in parent form\n\n### Logs\n\n```shell-script\n\n```",[2983,2984,2985],{"name":2947,"color":2948},{"name":2923,"color":2924},{"name":2908,"color":2909},3913,"[Form] Nested `UForm` in `UModal` is not rendered as `form`","2025-04-16T08:34:48Z","https://github.com/nuxt/ui/issues/3913",0.7107878,{"description":2992,"labels":2993,"number":2997,"owner":2911,"repository":2912,"state":2961,"title":2998,"updated_at":2999,"url":3000,"score":3001},"### Environment\n\nOperating System: mac os\nNode Version: v22.14.0\nLaravel Version: 12.12.0\nNitro Version: -\nPackage Manager: bun 1.2.11\nBuilder: -\nUser Config: -\nRuntime Modules: -\nBuild Modules: -\n\n### Is this bug related to Nuxt or Vue?\n\nVue\n\n### Version\n\nv3.1.1\n\n### Reproduction\n\nN/A\n\n### Description\n\nI'm using the example from the documentation for implementing a login and the button behaves like a link. I've already tried as=\"button\" and it doesn't work.\n\n```\n\u003Cscript setup lang=\"ts\">\nimport * as z from 'zod'\nimport type { FormSubmitEvent } from '@nuxt/ui'\n\nconst schema = z.object({\n email: z.string().email('Invalid email'),\n password: z.string().min(8, 'Must be at least 8 characters')\n})\n\ntype Schema = z.output\u003Ctypeof schema>\n\nconst state = reactive\u003CPartial\u003CSchema>>({\n email: undefined,\n password: undefined\n})\n\nconst toast = useToast()\nasync function onSubmit(event: FormSubmitEvent\u003CSchema>) {\n toast.add({ title: 'Success', description: 'The form has been submitted.', color: 'success' })\n console.log(event.data)\n}\n\u003C/script>\n\u003Ctemplate>\n \u003CUForm :schema=\"schema\" :state=\"state\" class=\"space-y-4\" @submit=\"onSubmit\">\n \u003CUFormField label=\"Email\" name=\"email\">\n \u003CUInput v-model=\"state.email\" />\n \u003C/UFormField>\n \u003CUFormField label=\"Password\" name=\"password\">\n \u003CUInput v-model=\"state.password\" type=\"password\" />\n \u003C/UFormField>\n \u003CUButton type=\"submit\">\n Submit\n \u003C/UButton>\n \u003C/UForm>\n\u003C/template>\n```\n\n### Additional context\n\n\n\n### Logs\n\n```shell-script\n\n```",[2994,2995,2996],{"name":2947,"color":2948},{"name":2923,"color":2924},{"name":2908,"color":2909},4095,"UButton works as a link in Inertia","2025-05-07T08:12:17Z","https://github.com/nuxt/ui/issues/4095",0.7146808,{"description":3003,"labels":3004,"number":3008,"owner":2911,"repository":2912,"state":2961,"title":3009,"updated_at":3010,"url":3011,"score":3012},"### Description\n\nI’d like to import Zod schemas for all built-in Nuxt UI components from the `@nuxt/ui` package so that my frontmatter validation in `content.config.ts` is accurate, DRY, and immediately usable.\n\n**Use case**\n\n- **Accurate frontmatter validation** for Nuxt Studio\n Pull in ready-to-use schemas for:\n\n - **Enums** like button `variant` or `color`\n - **Common elements** such as `Image`\n - **Complex components** like `PageSection`\n\n**Alternatives considered**\n\n* Manually recreating every enum, element, and component shape in custom Zod files (error-prone and high maintenance).\n *See a manual example here:*\n [https://github.com/nuxt-ui-pro/saas/blob/main/content.config.ts](https://github.com/nuxt-ui-pro/saas/blob/main/content.config.ts)\n\n**Proposed solution**\n\n- Publish each component’s Zod schema under `@nuxt/ui/schemas/{ComponentName}.ts` (e.g. `@nuxt/ui/schemas/PageSection.ts`)\n- Provide a barrel file for easy imports:\n\n ```ts\n import {\n colorEnum \n createImageSchema,\n createLinkSchema,\n createPageSectionSchema,\n } from '@nuxt/ui'\n ```\n\n### Additional context\n\n_No response_",[3005,3006,3007],{"name":2905,"color":2906},{"name":2923,"color":2924},{"name":2908,"color":2909},4161,"Export Zod schemas for Nuxt UI component props for use in content.config.ts","2025-05-28T13:02:08Z","https://github.com/nuxt/ui/issues/4161",0.71702814,{"description":3014,"labels":3015,"number":3021,"owner":2911,"repository":2912,"state":2961,"title":3022,"updated_at":3023,"url":3024,"score":3025},"### Description\n\nHow to dynamically acces the state without getting a inherit warning?\n\nI have a template with a UForm\n```\n\u003Ctemplate>\n \u003Cb> form \u003C/b>\n \u003CUForm :state=\"state\" @submit=\"onSubmit()\">\n \u003CUFormField v-for=\"(item, index) in items\" :key=\"index\" :label=\"item.name\" :name=\"item.name\">\n \u003CUColorPicker v-if=\"item.type == 'color'\" v-model=\"state[item.name]\" v-bind=\"item\" />\n \u003CUSlider v-else-if=\"item.type == 'range'\" v-model=\"state[item.name]\" v-bind=\"item\" />\n \u003CUTabs v-else-if=\"item.type == 'tabs'\" v-model=\"state[item.name]\" v-bind=\"item\" />\n \u003CUInput v-else-if=\"typeof state[index] == 'boolean'\" :type=\"item.type || 'checkbox'\" :value=\"item.name\" :checked=\"item\" />\n \u003CUInput v-else v-model=\"state[item.name]\" v-bind=\"item\" />\n \u003C/UFormField>\n \u003C/UForm>\n \u003Cb> state\u003C/b>\n \u003Cpre> {{ state }} \u003C/pre>\n \u003Cb> items\u003C/b>\n \u003Cpre> {{ items }} \u003C/pre>\n\u003C/template>\n```\nWhich is rendered as expected\n\n\nBut returns a inherit warning on every event\n\n\n\n\n",[3016,3017,3020],{"name":2935,"color":2936},{"name":3018,"color":3019},"needs reproduction","CB47CF",{"name":2923,"color":2924},3991,"State handling with UForm","2025-05-15T15:49:24Z","https://github.com/nuxt/ui/issues/3991",0.72195023,["Reactive",3027],{},["Set"],["ShallowReactive",3030],{"$fTRc1wZytZ_XrK4EfJfei_Sz-An4H4Yy6syhVxH_PVJc":-1,"$fJk2Z-7pKxSaJd4sOmAFSpMOftq7K9YRLQ2NiJ7jpbPk":-1},"/nuxt/ui/4402"]