项目作者: tableau

项目描述 :
React UI components that have the look-and-feel of Tableau.
高级语言: CSS
项目地址: git://github.com/tableau/tableau-ui.git
创建时间: 2018-08-27T21:54:23Z
项目社区:https://github.com/tableau/tableau-ui

开源协议:Other

下载


Tableau UI

Tableau Supported

Tableau UI

Tableau UI is a React component library containing UI components which have the look-and-feel of Tableau.

Add Tableau UI

npm install @tableau/tableau-ui

Using Tableau UI

Tableau UI requires React. If you aren’t familiar with React, check out their Getting Started document.

If you have a TypeScript project you can simply import the components and prop interfaces that you want to use, e.g.:

  1. import * as React from 'react';
  2. import { Button, ButtonProps } from '@tableau/tableau-ui';
  3. const buttonProps: ButtonProps = { kind: 'outline', children: 'OK' };
  4. const button = React.createElement(Button, buttonProps);

If you’re using JSX, this example might look more like:

  1. import * as React from 'react';
  2. import { Button } from '@tableau/tableau-ui';
  3. const button = <Button kind='outline'>OK</Button>

Or, you could also choose to include the bundled javascript file in your web project just as you would any other javascript library. You will then be able to reference tableau-ui with the global TableauUI variable, e.g.:

  1. <script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script>
  2. <script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
  3. <script src="tableau-ui.min.js"></script>
  4. const button = React.createElement(TableauUI.Button, { kind: 'outline', children: 'OK' });

API Documentation and Samples

Please refer to Tableau UI Components for documentation and samples.