Installation

Compatibility 2.5.0

Element Plus can run on browsers that support last 2 versions.

If you really need to support outdated browsers, please add Babel and Polyfill yourself.

Since Vue 3 no longer supports IE11, Element Plus does not support IE either.

versionChrome
Chrome
IE
Edge
Firefox
Firefox
Safari
Safari
< 2.5.0Chrome ≥ 64Edge ≥ 79Firefox ≥ 78Safari ≥ 12
2.5.0 +Chrome ≥ 85Edge ≥ 85Firefox ≥ 79Safari ≥ 14.1

Sass

Version 2.8.5 and later, the minimum compatible version of Sass is 1.79.0.

If your terminal prompts legacy JS API Deprecation Warning, you can configure the following code in vite.config.ts.

ts
css: {
  preprocessorOptions: {
    scss: { api: 'modern-compiler' },
  }
}

Version

Element Plus is currently in a rapid development iteration. ElementPlus version badge

In addition, every commit and PR on the dev branch will be published to pkg.pr.new, if you want to use some unpublished content, you can refer to here.

Using Package Manager

We recommend using the package manager (NPM, Yarn, pnpm) to install Element Plus, so that you can utilize bundlers like Vite and webpack.

shell
# Choose a package manager you like.

# NPM
$ npm install element-plus --save

# Yarn
$ yarn add element-plus

# pnpm
$ pnpm install element-plus

If your network environment is not good, it is recommended to use a mirror registry cnpm or Alibaba.

Import in Browser

Import Element Plus through browser HTML tags directly, and use global variable ElementPlus.

According to different CDN providers, there are different introduction methods. Here we use unpkg and jsDelivr as example. You can also use other CDN providers.

unpkg

html
<head>
  <!-- Import style -->
  <link rel="stylesheet" href="//unpkg.com/element-plus/dist/index.css" />
  <!-- Import Vue 3 -->
  <script src="//unpkg.com/vue@3"></script>
  <!-- Import component library -->
  <script src="//unpkg.com/element-plus"></script>
</head>

jsDelivr

html
<head>
  <!-- Import style -->
  <link
    rel="stylesheet"
    href="//cdn.jsdelivr.net/npm/element-plus/dist/index.css"
  />
  <!-- Import Vue 3 -->
  <script src="//cdn.jsdelivr.net/npm/vue@3"></script>
  <!-- Import component library -->
  <script src="//cdn.jsdelivr.net/npm/element-plus"></script>
</head>

TIP

We recommend using CDN to import Element Plus users to lock the version on the link address, so as not to be affected by incompatible updates when Element Plus is upgraded in the future. Please check unpkg.com for the method to lock the version.

Due to the limitations of native HTML parsing behavior, single-closed tags may cause some exceptions, so please use double-closed tags, reference

html
<!-- examples -->
<el-table>
  <el-table-column></el-table-column>
  <el-table-column></el-table-column>
</el-table>

Hello World

With CDN, we can easily use Element Plus to write a Hello World page. Online Demo

If you are installing via package manager and want to use it with a packaging tool, please read the next section: Quick Start.