AI Integration
For AI AssistantsGuide for using Forge with AI assistants like Claude, GPT, and others. This page explains best practices for generating Forge code with AI.
Overview
Forge is designed to be AI-friendly. The design system provides a comprehensive guide document that AI assistants should read before generating code. This ensures consistent, correct, and maintainable output.
AI Integration Guide
Complete markdown documentation (2500+ lines) with all components, examples, and rules.
Quick Setup
The basic structure every Forge app needs:
1import { ForgeProvider, ToastProvider, NotificationProvider } from 'wss3-forge'2 3function App() {4 return (5 <ForgeProvider mode="dark">6 <ToastProvider position="bottom-right">7 <NotificationProvider>8 <YourApp />9 </NotificationProvider>10 </ToastProvider>11 </ForgeProvider>12 )13}Rules for AI
DO
Always use Fluent UI 2 icons (@fluentui/react-icons)
Use CSS variables for all colors (var(--text-primary), etc.)
Import all components from a single source
Wrap your app with ForgeProvider
Use ToastProvider and NotificationProvider for feedback
Follow the component API exactly as documented
Use responsive hooks (useIsMobile, useBreakpoint)
Test in both light and dark modes
DON'T
Never use other icon libraries (Lucide, react-icons, etc.)
Never hardcode colors (#ffffff, rgb(), etc.)
Never deep import from component paths
Never mix Forge with other UI libraries
Never create custom components when Forge has one
Never skip the ForgeProvider wrapper
Never use inline colors for theming
Never ignore TypeScript errors on props
Icons
1// Correct - Fluent UI 2 icons2import {3 Add20Regular, // Outline style4 Add20Filled, // Solid style5 Settings24Regular, // Different size6 Home16Regular // Small size7} from '@fluentui/react-icons'8 9// Icon naming: {Name}{Size}{Style}10// Sizes: 12, 16, 20, 24, 28, 32, 4811// Styles: Regular (outline), Filled (solid)12 13<Button icon={<Add20Regular />}>Add Item</Button>14<IconButton icon={<Settings24Regular />} />Colors
Always use CSS variables for colors. This ensures themes work correctly.
1// Correct - CSS Variables2<div style={{3 backgroundColor: 'var(--bg-secondary)',4 color: 'var(--text-primary)',5 borderColor: 'var(--border-color)'6}}>7 8// Available color variables:9// --bg-primary, --bg-secondary, --bg-tertiary, --bg-active10// --text-primary, --text-secondary, --text-muted11// --brand-primary, --brand-secondary12// --border-color, --border-subtle13// --success, --warning, --error, --infoUsing Components
Import all components from a single source. Check the documentation for correct props.
1import {2 Button, Card, Input, Modal,3 VStack, HStack, Grid,4 Text, Heading, Badge,5 useToast, useNotification6} from 'wss3-forge'7 8function MyComponent() {9 const { toast } = useToast()10 11 return (12 <Card padding="lg">13 <VStack gap="md">14 <Heading level={3}>Form Title</Heading>15 <Input16 label="Email"17 placeholder="Enter email"18 type="email"19 />20 <Button21 variant="primary"22 onClick={() => toast.success('Saved!')}23 >24 Submit25 </Button>26 </VStack>27 </Card>28 )29}Prompt Template
Add this to your AI instructions or system prompt when working with Forge:
1When using Forge design system:2 31. Read the AI guide first: packages/wss3-forge/FORGE_AI_GUIDE.md42. Only use Fluent UI 2 icons from @fluentui/react-icons53. Use CSS variables for colors, never hardcode64. Import components from 'wss3-forge' (single source)75. Always wrap with ForgeProvider86. Check component props in documentation before usingBest Practices
Read the Guide First
Before generating any code, AI should read FORGE_AI_GUIDE.md for the complete component reference. This prevents errors and ensures correct API usage.
Check Props Before Using
Each component has specific props. Don't assume - check the documentation. For example, Button has variant, size, icon props but not color or type.
Use Theme Creator for Custom Themes
Need custom colors? Use the Theme Creator to generate ForgeProvider configuration instead of manually defining CSS variables.
Leverage Existing Components
Forge has 100+ components. Before creating custom UI, check if a component already exists. StatCard, ImageCard, Timeline, etc. cover many use cases.
Explore Components
See all available components in the documentation.
Previous
Watermark
Next
Changelog
Last updated: December 2025