con un clic
rsuite
// Build web interfaces with React Suite — a suite of React components, sensible UI design, and a friendly development experience.
// Build web interfaces with React Suite — a suite of React components, sensible UI design, and a friendly development experience.
| name | rsuite |
| description | Build web interfaces with React Suite — a suite of React components, sensible UI design, and a friendly development experience. |
| version | 1.0.0 |
| license | MIT |
This skill helps AI assistants build user interfaces with React Suite v6+. When active, the assistant follows React Suite conventions for components, styling, theming, accessibility, and internationalization.
Activate this skill whenever the project depends on rsuite (check package.json) or the user asks to build UI with React Suite.
Install React Suite in the target project:
npm install rsuite
Import the stylesheet once at the application entry:
import 'rsuite/dist/rsuite.min.css';
For component-level imports (recommended for bundle size):
import Button from 'rsuite/Button';
import 'rsuite/Button/styles/index.css';
as and render* props. Most components accept as to change the rendered element and renderX props to override subparts.CustomProvider for global configuration (locale, theme, RTL, classPrefix).--rs-*), not by overriding class names.@rsuite/icons for iconography rather than ad-hoc SVGs.Form, Form.Group, Form.Control, and Schema from rsuite.aria-* for custom triggers, and keyboard handlers for interactive elements.import { CustomProvider } from 'rsuite';
import zhCN from 'rsuite/locales/zh_CN';
<CustomProvider theme="dark" locale={zhCN}>
<App />
</CustomProvider>;
import { Button } from 'rsuite';
<Button appearance="primary" size="md" onClick={handleClick}>
Submit
</Button>;
Valid appearance values: default | primary | link | subtle | ghost.
Valid size values: xs | sm | md | lg.
Valid color values: red | orange | yellow | green | cyan | blue | violet.
import { Form, Schema, Button } from 'rsuite';
const model = Schema.Model({
name: Schema.Types.StringType().isRequired('Name is required.'),
email: Schema.Types.StringType().isEmail('Invalid email.')
});
<Form model={model} onSubmit={handleSubmit}>
<Form.Group controlId="name">
<Form.ControlLabel>Name</Form.ControlLabel>
<Form.Control name="name" />
</Form.Group>
<Form.Group controlId="email">
<Form.ControlLabel>Email</Form.ControlLabel>
<Form.Control name="email" type="email" />
</Form.Group>
<Button type="submit" appearance="primary">Save</Button>
</Form>;
import { Table } from 'rsuite';
const { Column, HeaderCell, Cell } = Table;
<Table data={data} autoHeight>
<Column flexGrow={1}>
<HeaderCell>Name</HeaderCell>
<Cell dataKey="name" />
</Column>
<Column width={120}>
<HeaderCell>Age</HeaderCell>
<Cell dataKey="age" />
</Column>
</Table>;
import { useToaster, Message } from 'rsuite';
const toaster = useToaster();
toaster.push(<Message type="success">Saved.</Message>, { placement: 'topCenter' });
React Suite exposes CSS variables prefixed with --rs-. Override them in your root selector:
:root {
--rs-primary-500: #3498ff;
--rs-text-primary: #1f2d3d;
}
Switch themes at runtime through CustomProvider; the theme prop accepts "light", "dark", or "high-contrast".
See the full variable list at https://rsuitejs.com/guide/css-variables.
npm install @rsuite/icons
import SearchIcon from '@rsuite/icons/Search';
<Button startIcon={<SearchIcon />}>Search</Button>;
For live data on components, props, and hooks, prefer the official sources in this order:
@rsuite/mcp exposes get_component_props, list_components, list_hooks, search_components. See https://rsuitejs.com/guide/mcp-server.Utility scripts are included to fetch component data programmatically:
scripts/list_components.mjs — list all React Suite componentsscripts/get_component_props.mjs <ComponentName> — get props for a specific componentscripts/list_hooks.mjs — list all custom hooksscripts/search_components.mjs <query> — search components by nameRun with Node 18+:
node scripts/list_components.mjs
node scripts/get_component_props.mjs Button
rsuite/dist/rsuite.min.css once, globally.Form.Control (not raw Input) inside Form so validation is wired automatically.appearance/color values instead of inline styles for state.Dropdown, DatePicker, TreePicker.