{"id":15063098,"url":"https://github.com/element-plus/element-plus-nuxt","last_synced_at":"2025-04-05T23:12:28.966Z","repository":{"id":65177435,"uuid":"584647941","full_name":"element-plus/element-plus-nuxt","owner":"element-plus","description":"Element Plus module for Nuxt","archived":false,"fork":false,"pushed_at":"2024-04-04T07:29:14.000Z","size":288,"stargazers_count":108,"open_issues_count":5,"forks_count":14,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-14T09:04:51.774Z","etag":null,"topics":["element-plus","nuxt"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/element-plus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-01-03T06:35:59.000Z","updated_at":"2024-04-07T09:23:11.000Z","dependencies_parsed_at":"2023-02-16T15:01:23.154Z","dependency_job_id":"1d9f8e3d-c889-4435-aada-fb38638f5031","html_url":"https://github.com/element-plus/element-plus-nuxt","commit_stats":{"total_commits":47,"total_committers":6,"mean_commits":7.833333333333333,"dds":"0.12765957446808507","last_synced_commit":"4f31166b550c6292e7acc652e81ef430ca762fd9"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/element-plus%2Felement-plus-nuxt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/element-plus%2Felement-plus-nuxt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/element-plus%2Felement-plus-nuxt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/element-plus%2Felement-plus-nuxt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/element-plus","download_url":"https://codeload.github.com/element-plus/element-plus-nuxt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247305932,"owners_count":20917208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["element-plus","nuxt"],"created_at":"2024-09-24T23:51:10.373Z","updated_at":"2025-04-05T23:12:28.949Z","avatar_url":"https://github.com/element-plus.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg width=\"300px\" src=\"https://user-images.githubusercontent.com/10731096/95823103-9ce15780-0d5f-11eb-8010-1bd1b5910d4f.png\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@element-plus/nuxt\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/v/@element-plus/nuxt.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://npmcharts.com/compare/@element-plus/nuxt?minimal=true\"\u003e\n    \u003cimg src=\"https://img.shields.io/npm/dm/@element-plus/nuxt.svg\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# Element Plus Nuxt\n\n\u003e [Element Plus](https://element-plus.org) module for [Nuxt](https://nuxt.com)\n\n## Features\n\n- Automatically import components and styles on demand.\n- Automatically import directives and styles on demand.\n- Automatically import icons from [@element-plus/icons-vue](https://github.com/element-plus/element-plus-icons).\n- Automatically import of ElMessage, ElNotification and other methods.\n- Automatically inject the ID_INJECTION_KEY and ZINDEX_INJECTION_KEY into Vue.\n- Automatically inject the teleport markup into the correct location in the final page HTML.\n\n## Installation\n\n\u003e [!WARNING]\n\u003e Since the [dayjs](https://github.com/iamkun/dayjs) used internally by element-plus is not a [JavaScript modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules), in order to ensure that it can be converted into a JavaScript modules before startup, you need to add a `.npmrc` file to the root directory of the project and add the following configuration:\n\u003e ```\n\u003e shamefully-hoist=true\n\u003e ```\n\u003e Or install the `dayjs` dependency separately.\n\n```bash\nnpx nuxi@latest module add element-plus\n# or\nnpm i element-plus @element-plus/nuxt -D\n```\n\n```ts\nexport default defineNuxtConfig({\n  modules: [\n    '@element-plus/nuxt'\n  ],\n  elementPlus: { /** Options */ }\n})\n```\n\n## Usage\n\n```vue\n\u003ctemplate\u003e\n  \u003cel-button @click=\"ElMessage('hello')\"\u003ebutton\u003c/el-button\u003e\n  \u003cElButton :icon=\"ElIconEditPen\" type=\"success\"\u003ebutton\u003c/ElButton\u003e\n  \u003cLazyElButton type=\"warning\"\u003elazy button\u003c/LazyElButton\u003e\n\u003c/template\u003e\n```\n\nReference [Nuxt documentation](https://nuxt.com/docs/guide/directory-structure/components) and [playground](./playground/app.vue) use.\n\n## Options\n\n### importStyle\n\n- Type: `'css' | 'scss' | boolean`\n- Default: `css`\n\nimport style css or sass(scss) with components, disable automatically import styles with `false`.\n\n### themes\n\n- Type: `array`\n\nA list of themes that require import styles automatically.\n\ne.g. `['dark']`\n\n### icon\n\n- Type: `string | false`\n- Default: `ElIcon`\n\nIcon prefix name, disable automatically import icon with `false`.\n\n### namespace\n\n- Type: `string`\n- Default: `el`\n\nWhen you change the global namespace, you must change it here as well.\n\n### defaultLocale\n\n- Type: `string`\n\nReplace default locale, you can find locale list [here](https://github.com/element-plus/element-plus/tree/dev/packages/locale/lang)\n\ne.g. `'zh-cn'`\n\n### globalConfig\n\n- Type: `object`\n\nSet global configuration, such as modifying the default `size` and `z-index` of the component.\n\ne.g. `{ size: 'small', zIndex: 3000 }`\n\n### injectionID\n\n- Type: `object`\n- Default: `{ prefix: 1024, current: 0 }`\n\nAutomatically inject the ID_INJECTION_KEY into Vue.\n\n### injectionZIndex\n\n- Type: `object`\n- Default: `{ current: 0 }`\n\nAutomatically inject the Z_INDEX_INJECTION_KEY into Vue.\n\n### appendTo\n\n- Type: `array`\n\nWhen you modify the `append-to` props in all based on ElTooltip components, you need to add the value here.\n\n### components\n\n- Type: `array`\n\nIf there are components that are not imported automatically from Element Plus, you need to add the component name here.\n\ne.g. `['ElSubMenu']`\n\n### subComponents\n\n- Type: `object`\n\nA map of components that the definition file of subComponent is in its parent component.\n\n### directives\n\n- Type: `object`\n\nIf there are directives that are not imported automatically from Element Plus, you need to add the directive name here.\n\n### imports\n\n- Type: `array`\n\nIf you wish to add automatically import content from Element Plus, you can add it here.\n\ne.g. \n\n```ts\n[\n  ['useLocale', 'es/hooks/use-locale/index.mjs'],\n  [['castArray', 'unique'], 'es/utils/arrays.mjs']\n],\n```\n\n### noStylesComponents\n\n- Type: `array`\n\nWhen a component incorrectly loads styles, you need to add the component name here.\n\n### include\n\n- Type: `array`\n- Default: `[ /\\.vue$/, /\\.vue\\?vue/, /\\.vue\\?v=/, /\\.((c|m)?j|t)sx?$/]`\n\nInclude files that need to automatically import styles.\n\n### exclude\n\n- Type: `array`\n- Default: `[/[\\\\/]node_modules[\\\\/]/, /[\\\\/]\\.git[\\\\/]/, /[\\\\/]\\.nuxt[\\\\/]/]`\n\nExclude files that do not require the automatic import of styles.\n\n## Template\n\n[element-plus-nuxt-starter](https://github.com/element-plus/element-plus-nuxt-starter)\n\n## Development\n\n- Run `pnpm i` to install the dependencies.\n- Run `pnpm dev:prepare` to generate type stubs.\n- Run `pnpm dev` to start playground in development mode.\n- Run `pnpm dev:build` to build playground.\n- Run `pnpm dev:start` to locally preview playground.\n- Run `pnpm build` to build this project.\n","funding_links":[],"categories":["Resources"],"sub_categories":["Official Project"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felement-plus%2Felement-plus-nuxt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felement-plus%2Felement-plus-nuxt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felement-plus%2Felement-plus-nuxt/lists"}