Professional React SDK for building Discord Components v2 with visual editor, drag & drop, and TypeScript support.
- MessageBuilder - Complete visual editor with drag & drop
- Live Preview - Real-time Discord-style preview
- Undo/Redo - Full history management
- Themes - Dark/Light mode support
- Core: Button, TextDisplay, StringSelect, Container, ActionRow, Separator
- Advanced: Dialog, EmojiPicker, ColorPicker, FileUpload, MediaGallery, MarkdownPreview
- Utility: Thumbnail, SortableItem, Icon, MessageBuilder
- ๐ค Export - JSON, Discord.js, TypeScript, Python
- ๐ฅ Import - From JSON with validation
- ๐จ Drag & Drop - Reorder components visually
- โฎ๏ธ History - Undo/redo system
- โจ๏ธ Keyboard - Customizable shortcuts
- ๐ Search - Find components quickly
- โ Validation - Discord API limits
- ๐ Clipboard - Copy/paste components
- ๐ฏ Analytics - Usage tracking
- ๐ฆ Batch - Mass operations
- ๐ Markdown - Discord markdown support
- ๐จ Theme - Custom themes
- โก Performance - Optimized hooks
- โ 305 Tests - 100% passing, 85% coverage
- ๐ Full TypeScript - Complete type safety
- ๐ฏ Tree-shakeable - Import only what you need
- โฟ Accessible - WCAG compliant
- ๐๏ธ Modular - Clean architecture
npm install @chumadev/discord-components-pro
# or
yarn add @chumadev/discord-components-pro
# or
pnpm add @chumadev/discord-components-proimport { MessageBuilder } from '@chumadev/discord-components-pro';
import '@chumadev/discord-components-pro/discord-components-pro.css';
function App() {
return (
<MessageBuilder
theme="dark"
editable
/>
);
}import { Button, ButtonStyle } from '@chumadev/discord-components-pro';
function MyComponent() {
return (
<Button
style={ButtonStyle.Primary}
label="Click Me"
customId="my-button"
/>
);
}import { MessageBuilder, useComponentStore } from '@chumadev/discord-components-pro';
function Editor() {
const { components } = useComponentStore();
return (
<div>
<MessageBuilder theme="dark" editable />
<pre>{JSON.stringify(components, null, 2)}</pre>
</div>
);
}import { useExport } from '@chumadev/discord-components-pro';
function ExportButton() {
const { exportToFormat } = useExport();
const handleExport = () => {
const result = exportToFormat(components, { format: 'discord.js' });
console.log(result.content);
};
return <button onClick={handleExport}>Export</button>;
}import { useKeyboardShortcuts } from '@chumadev/discord-components-pro';
function MyComponent() {
useKeyboardShortcuts([
{ key: 's', ctrl: true, action: () => save() },
{ key: 'z', ctrl: true, action: () => undo() },
]);
return <div>Press Ctrl+S to save</div>;
}{
"type": 2,
"style": 1,
"label": "Click me",
"custom_id": "button_1"
}new ButtonBuilder()
.setStyle(ButtonStyle.Primary)
.setLabel('Click me')
.setCustomId('button_1')const button: ButtonComponent = {
type: 2,
style: 1,
label: 'Click me',
custom_id: 'button_1'
};button = {
"type": 2,
"style": 1,
"label": "Click me",
"custom_id": "button_1"
}| Format | Size | Gzipped |
|---|---|---|
| ES Module | 998 KB | 240 KB |
| UMD | 830 KB | 217 KB |
| CSS | 27 KB | 4.5 KB |
Tree-shakeable - Import only what you need!
src/
โโโ components/ # 16 React components
โโโ features/ # 13 feature modules
โ โโโ export/ # Export to multiple formats
โ โโโ import/ # Import with validation
โ โโโ dnd/ # Drag & drop system
โ โโโ history/ # Undo/redo
โ โโโ keyboard/ # Keyboard shortcuts
โ โโโ validation/ # Discord API validation
โ โโโ ... # 7 more modules
โโโ hooks/ # React hooks
โโโ store/ # Zustand state management
โโโ types/ # TypeScript definitions
โโโ utils/ # Utility functions
# Install
npm install
# Dev server (playground)
npm run dev
# Build
npm run build
# Tests
npm test
# Type check
npm run typecheck
# Lint
npm run lint- 305 tests - 100% passing
- 85% coverage - All critical paths covered
- Vitest - Fast unit testing
- React Testing Library - Component testing
npm test # Run all tests
npm test -- --watch # Watch mode
npm run test:coverage # Coverage report- Chrome/Edge 90+
- Firefox 88+
- Safari 14+
- Modern browsers with ES2020
MIT ยฉ 2026 ChumaDev
Built with:
- React - UI library
- @dnd-kit - Drag and drop
- Zustand - State management
- Vitest - Testing framework
- TypeScript - Type safety
This is an independent community project, NOT affiliated with Discord Inc. or Discord.js.
Made with โค๏ธ by ChumaDev