MCPcopy Index your code
hub / github.com/ElemeFE/element-react

github.com/ElemeFE/element-react @1.4.33

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1.4.33 ↗ · + Follow
1,959 symbols 3,900 edges 343 files 2 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Element React

Element was initially written in Vue, which has many elegant UI components, but we also love React, so we forked it for the React community.

Getting Started

Install

npm install element-react --save

Before the building, you need a style theme, here we recommend you to pick up element-theme-default.

npm install element-theme-default --save

Usage

We are die hard fans of ECMAScript 6, so we recommend you writing code in modern javascript.

import { Button } from 'element-react';

Also we provide an advanced way to tree shaking the code with Rollup.js and Webpack 2

import { Button } from 'element-react/next';

Config

With webpack, you need additional loaders to build with element-react.

const webpack = require('webpack');

module.exports = {
  entry: {
    src: 'path/to/src'
  },
  output: {
    path: 'path/to/output'
    publicPath: '/public',
    chunkFilename: '[chunkhash:12].js',
    filename: '[chunkhash:12].js'
  },
  plugins: [
    new webpack.DefinePlugin({ 'process.env.NODE_ENV': JSON.stringify('production') }),
    new webpack.optimize.UglifyJsPlugin({
      output: {
        comments: false
      }
    })
  ],
  resolve: {
    extensions: ['.js', '.jsx']
  },
  module: {
    loaders: [
      {
        test: /\.jsx?$/,
        loader: 'babel-loader',
        include: ['path/to/src']
      },
      {
        test: /\.css$/,
        loaders: ['style-loader', 'css-loader']
      },
      {
        test: /\.(ttf|eot|svg|woff|woff2)(\?.+)?$/,
        loader: 'file-loader?name=[hash:12].[ext]'
      }
    ]
  }
}

Contributing

Please make sure to read the Contributing Guide before making a pull request.

Acknowledgments

  • @doxiaodong for adding typescript ambient declarations.
  • @cuining for building the live code editor.

Credits

  • Element Desktop UI elements for Vue.js 2.0.

License

MIT

Extension points exported contracts — how you extend this code

RadioProps (Interface)
(no doc) [11 implementers]
typings/index.d.ts
BasePickerProps (Interface)
(no doc)
src/date-picker/Types.js
RadioGroupProps (Interface)
(no doc) [11 implementers]
typings/index.d.ts
RateProps (Interface)
(no doc) [11 implementers]
typings/index.d.ts
InputNumberProps (Interface)
(no doc) [11 implementers]
typings/index.d.ts
CheckboxProps (Interface)
(no doc) [11 implementers]
typings/index.d.ts

Core symbols most depended-on inside this repo

classNames
called by 101
libs/component/index.js
use
called by 62
typings/index.d.ts
className
called by 58
libs/component/index.js
hasClass
called by 55
src/rate/Rate.jsx
style
called by 53
libs/component/index.js
t
called by 39
typings/index.d.ts
filter
called by 38
src/tree/Tree.jsx
onChange
called by 28
typings/index.d.ts

Shape

Method 1,173
Class 548
Function 168
Interface 70

Languages

TypeScript100%

Modules by API surface

typings/index.d.ts274 symbols
src/select/Select.jsx45 symbols
src/date-picker/BasePicker.jsx32 symbols
src/date-picker/panel/DateRangePanel.jsx29 symbols
src/date-picker/panel/DatePanel.jsx28 symbols
src/tree/model/tree-store.js27 symbols
src/cascader/Cascader.jsx27 symbols
src/tree/model/node.js26 symbols
src/carousel/Carousel.jsx25 symbols
src/tree/Tree.jsx24 symbols
src/table/TableStore.jsx24 symbols
src/upload/Upload.jsx23 symbols

For agents

$ claude mcp add element-react \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact