📅  最后修改于: 2023-12-03 14:46:58.167000             🧑  作者: Mango
React Suite 是一个基于 React 的企业级 UI 组件库,提供了一系列高质量、可定制和易使用的组件,能够帮助程序员快速构建现代化的 Web 应用。
import { Button } from 'rsuite';
<Button appearance="primary">Primary Button</Button>
import { Input } from 'rsuite';
<Input placeholder="Enter your name" />
import { Table } from 'rsuite';
const data = [
{ id: 1, name: 'John Smith', age: 28 },
{ id: 2, name: 'Jane Doe', age: 32 },
];
<Table data={data} virtualized>
<Table.Column flexGrow={1} align="left" sortable>
<Table.HeaderCell>Name</Table.HeaderCell>
<Table.Cell dataKey="name" />
</Table.Column>
<Table.Column flexGrow={1} align="left" sortable>
<Table.HeaderCell>Age</Table.HeaderCell>
<Table.Cell dataKey="age" />
</Table.Column>
</Table>
import { LineChart, CartesianGrid, XAxis, YAxis, Line } from 'rsuite';
const data = [
{ name: 'Jan', value: 100 },
{ name: 'Feb', value: 200 },
{ name: 'Mar', value: 150 },
];
<LineChart data={data}>
<CartesianGrid />
<XAxis dataKey="name" />
<YAxis />
<Line type="monotone" dataKey="value" stroke="#8884d8" />
</LineChart>
通过 npm 进行安装:
npm install rsuite --save
import { Button } from 'rsuite';
import 'rsuite/dist/styles/rsuite-default.css';
<Button appearance="primary">Primary Button</Button>
React Suite 是一个功能强大、易用且高度可定制的 React 组件库,适用于构建各种类型的 Web 应用。程序员可以根据项目需求,灵活选择和配置所需的组件,提高开发效率与用户体验。