fluent-ui-react
Build modern, responsive, and accessible UIs with Microsoft Fluent UI React v9 (@fluentui/react-components) for Word add-ins and Office extensions. Use when: (1) Creating or modifying Word add-in task pane UI, (2) Writing React components using Fluent UI v9 components, (3) Styling with Griffel (makeStyles/makeResetStyles/mergeClasses), (4) Working with Fluent design tokens and theming, (5) Building accessible Office add-in interfaces, (6) Implementing the v9 hooks-based component architecture (useComponent/useComponentStyles/renderComponent pattern), or (7) Any task involving @fluentui/react-components imports.
What this skill does
# Fluent UI React v9 for Word Add-ins
## Quick Start
Wrap the app root with `FluentProvider` and a theme:
```tsx
import { FluentProvider, webLightTheme } from '@fluentui/react-components';
Office.onReady(() => {
createRoot(document.getElementById('container')!).render(
<FluentProvider theme={webLightTheme}>
<App />
</FluentProvider>
);
});
```
## Core Concepts
### Component Architecture
v9 components separate behavior, styling, and rendering into hooks:
```tsx
const MyComponent = React.forwardRef((props, ref) => {
const state = useMyComponent(props, ref); // behavior
useMyComponentStyles(state); // styling
return renderMyComponent(state); // render
});
```
This enables **recomposition** - reassemble hooks to create custom variants without forking.
### Styling with Griffel
```tsx
import { makeStyles, makeResetStyles, mergeClasses, shorthands, tokens } from '@fluentui/react-components';
// Base styles (single monolithic class - use for base/default state)
const useBaseClassName = makeResetStyles({
display: 'flex',
padding: '8px 12px', // CSS shorthands OK in makeResetStyles
color: tokens.colorNeutralForeground1,
':hover': { backgroundColor: tokens.colorNeutralBackground1Hover },
});
// Variant styles (atomic classes - use for conditional overrides)
const useStyles = makeStyles({
primary: {
backgroundColor: tokens.colorBrandBackground,
color: tokens.colorNeutralForegroundOnBrand,
},
small: { ...shorthands.padding('4px', '8px') }, // Must use shorthands.* in makeStyles
});
function MyButton({ appearance, size, className }) {
const base = useBaseClassName();
const styles = useStyles();
return (
<button className={mergeClasses(
base,
appearance === 'primary' && styles.primary,
size === 'small' && styles.small,
className, // consumer override always last
)} />
);
}
```
**Critical rules:**
- Never concatenate Griffel classes with `+`; always use `mergeClasses()`
- Call `mergeClasses()` once per element, not nested
- Use `tokens.*` for all colors, spacing, typography; never raw values
- `makeResetStyles` allows CSS shorthands; `makeStyles` requires `shorthands.*` helpers
### Slots
Slots let consumers customize component parts:
```tsx
// Props to a slot
<Button icon={{ className: styles.icon, 'aria-hidden': true }}>Click</Button>
// JSX element as slot content
<Button icon={<MyIcon />}>Click</Button>
// Disable a slot
<Button icon={null}>No icon</Button>
// Render function (escape hatch - replaces the slot element entirely)
<Button icon={{ children: (Component, props) => <b>!</b> }}>Alert</Button>
```
### Event Handlers
v9 uses the `(event, data)` convention:
```tsx
<Input onChange={(ev, data) => console.log(data.value)} />
<Checkbox onChange={(ev, data) => console.log(data.checked)} />
<Dropdown onOptionSelect={(ev, data) => console.log(data.selectedOptions)} />
```
## Reference Files
Consult these for detailed guidance:
- **[v9-component-architecture.md](references/v9-component-architecture.md)** - Complete v9 architecture docs: hooks pattern, slots system, FluentProvider, theming, design tokens, recomposition, custom styling hooks, props conventions, accessibility. Read when building custom components or needing deeper architectural understanding.
- **[griffel-styling.md](references/griffel-styling.md)** - Full Griffel API reference: `makeStyles`, `makeResetStyles`, `mergeClasses`, `shorthands.*`, RTL handling, `@noflip`, nested selectors, performance rules, `tokens` usage. Read when styling components or troubleshooting CSS issues.
- **[word-addin-patterns.md](references/word-addin-patterns.md)** - Word add-in specific patterns: task pane layout, responsive design (300-600px), Office theme detection, forms, lists, toolbars, dialogs, message bars, progress states, Office JS API integration, accessibility and focus management. Read when building Word add-in UI.
## Key Component Reference
### Layout
`FluentProvider`, `Card`, `Divider`, `Drawer`, `TabList`/`Tab`
### Input
`Button`, `Input`, `Textarea`, `Select`, `Dropdown`/`Option`, `Checkbox`, `Switch`, `RadioGroup`/`Radio`, `Slider`, `SpinButton`, `DatePicker`, `Combobox`
### Data Display
`Avatar`, `Badge`, `Tag`, `DataGrid`, `Table`, `Tree`, `Accordion`, `Text`, `Title*`, `Subtitle*`, `Body*`, `Caption*`
### Feedback
`Spinner`, `ProgressBar`, `MessageBar`, `Toast`, `Dialog`, `Popover`, `Tooltip`, `Alert`
### Navigation
`Toolbar`/`ToolbarButton`, `Menu`/`MenuItem`, `Breadcrumb`, `Link`, `Nav`/`NavItem`
### Icons
Import from `@fluentui/react-icons`: `import { AddRegular, DeleteRegular } from '@fluentui/react-icons'`
Icon naming: `{Name}{Style}` where Style is `Regular`, `Filled`, or size variants like `20Regular`.
## Word Add-in Guidelines
### Task Pane Defaults
- Width: ~320px (resizable 300-600px); design mobile-first
- Use `height: 100vh` with flex column layout
- Scrollable content area with fixed header/footer
- Match Office host theme via `FluentProvider`
### Accessibility Requirements
- All interactive elements must be keyboard accessible
- Use `role="status"` with `aria-live="polite"` for operation feedback
- Return focus to the task pane after Word API operations
- Support high contrast via `@media (forced-colors: active)` with system colors
- Use semantic HTML (`<button>`, `<input>`) over styled `<div>`s
### Performance
- Define `makeStyles`/`makeResetStyles` at module scope, not inside components
- Use `React.lazy` for heavy panels to keep initial load fast
- Tree-shake icons with direct imports: `import { AddRegular } from '@fluentui/react-icons'`
- Memoize callbacks that interact with the Word API
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.