Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
188 commits
Select commit Hold shift + click to select a range
52c129e
fix: support label node in compact text input (#293)
hcopp Jan 16, 2026
40d5510
chore: new internal code connect lint rule (#311)
cb-ekuersch Jan 17, 2026
9fec112
feat: add chip links to docs (#303)
hcopp Jan 20, 2026
f333f51
fix: clarify contributing requirements (#312)
hcopp Jan 21, 2026
de719bb
chore: Improve code connect workflow & setup (#318)
cb-ekuersch Jan 21, 2026
85721f5
fix(docs): prevent Playground preview content from overflowing contai…
samcartersmith Jan 21, 2026
bed1b16
feat: support styling default scrubber beacon (#315)
hcopp Jan 22, 2026
33b84a0
feat: improve various docs (#320)
hcopp Jan 22, 2026
db2c90f
fix: add missing storybook links (#321)
hcopp Jan 22, 2026
ddb633e
fix: Update `<FocusTrap>` to handle single focusable child element (#…
maximo-macchi-cb Jan 22, 2026
270d704
fix: destructure unused props from default horizontal stepper compone…
cb-ekuersch Jan 22, 2026
58a7b5c
fix: Spacing props not working properly on web Button (#319)
stacysun-cb Jan 22, 2026
ad739fb
fix: fill our subcomponent docs (#323)
hcopp Jan 23, 2026
a2018c5
fix: Improve aria-labels and Tab key navigation for `<Select>` and `<…
maximo-macchi-cb Jan 23, 2026
cae344f
fix(CDS-1170): Radiocell duplicate tab targets (#326)
samcartersmith Jan 26, 2026
a25b2cd
feat: chart legend (#302)
hcopp Jan 26, 2026
0b71577
fix: Add optional "elevation" prop to all Control components (#325)
sverg-cb Jan 27, 2026
3d4d559
fix: make custom beacon chart stable in visreg (#331)
hcopp Jan 27, 2026
b41d8d3
feat: carousel loop (#327)
hcopp Jan 27, 2026
8cd384c
fix: support padded tabs (#330)
hcopp Jan 28, 2026
96b48c3
chore: add myself (sverg) as a cds contributor (#334)
sverg-cb Jan 28, 2026
2b0e62f
feat: Add token manager logos (#336)
stacysun-cb Jan 28, 2026
f3e766c
fix(DEX2-874): Fix every context rendering a second time in CDS Chart…
avocado-cb Jan 29, 2026
138ffc5
chore: descriptive names for generic types (#341)
adrienzheng-cb Jan 29, 2026
97177b9
feat: Publish icons 2026/01/29 (#342)
stacysun-cb Jan 29, 2026
da72e04
feat: web vis export cartesian chart context (#340)
hcopp Jan 29, 2026
b85efd1
feat: Publish illustrations 2026-01-29 (#344)
maximo-macchi-cb Jan 30, 2026
190cb1e
fix illo release (#347)
stacysun-cb Jan 30, 2026
a45242a
chore: drop illo/icon codeowners (#345)
hcopp Jan 30, 2026
fc11ca8
Add React Aria to competitor-research and organize reports in subdire…
cb-ekuersch Jan 30, 2026
4d6949c
fix(mobile): add Math.round to ProgressCircle accessibilityValue (#354)
eccentricdz Feb 2, 2026
284214b
fix: carousel blocks scrolling on y axis (#358)
adrienzheng-cb Feb 3, 2026
3320487
fix: add padding to tooltip target in input labels (#360)
hcopp Feb 3, 2026
cd79a5b
Clean up example (#362)
maximo-macchi-cb Feb 3, 2026
8284ffc
release (#363)
stacysun-cb Feb 3, 2026
6ab2a05
feat: Publish illustrations 2026-02-03 (#364)
adrienzheng-cb Feb 3, 2026
48cc2a7
feat: Add `align` prop to `<Select>` and `<Combobox>` (#348)
maximo-macchi-cb Feb 4, 2026
889d602
feat: support preferred side for scrubber beacon label group (#366)
hcopp Feb 4, 2026
2bda81f
feat: all cards (#329)
adrienzheng-cb Feb 5, 2026
5fa3628
feat: Publish icons 2026/02/05 (#367)
adrienzheng-cb Feb 5, 2026
1eaa327
feat: add Tamagui to competitor-research claude command (#368)
cb-ekuersch Feb 6, 2026
890f489
chore: bump code conenct package (#373)
cb-ekuersch Feb 6, 2026
992a591
feat: Carousel autoplay (#361)
hcopp Feb 6, 2026
0d5a5b0
fix: mobile chart scrubber animation (#374)
hcopp Feb 6, 2026
94f9e43
feat: component docs styles tab (#328)
hcopp Feb 9, 2026
58d9d8a
fix: allow contenteditable elements to be focusable in Modals (#371)
mortenson Feb 9, 2026
6287fa4
feat: `<Select>` Figma Code Connect files (#380)
maximo-macchi-cb Feb 9, 2026
203dba2
feat: docs performance enhancements (#379)
hcopp Feb 9, 2026
598277c
feat: Tray refactor (#349)
hcopp Feb 9, 2026
a7ff03c
fix: doc styles and carousel examples (#382)
hcopp Feb 10, 2026
6f62150
feat: improve doc styles tab notes and order (#384)
hcopp Feb 10, 2026
73b3508
fix: address the misbehaving negative margin issue for Banner (#383)
haoruikun-cb Feb 10, 2026
3ae8fbc
fix: Tray elastic value on web and add styles tab (#385)
hcopp Feb 10, 2026
a592731
feat: Add reduce motion support to `<Tray>` (#386)
maximo-macchi-cb Feb 12, 2026
1cb8cd0
chore: update CI workflow to trigger on pull requests to cds v9 featu…
cb-ekuersch Feb 12, 2026
d979432
chore: run CI on pushes to cds version feature branches (#394)
cb-ekuersch Feb 12, 2026
274f5a2
feat: add open/close visibility delays to Tooltip (#234)
sverg-cb Feb 12, 2026
9de63fc
chore: run depcheck/bundle stats jobs on master or PRs to master only…
cb-ekuersch Feb 12, 2026
82e0054
fix: (DX-5052) (#397)
cb-ekuersch Feb 12, 2026
75bc87f
feat: figma code connect and doc updates (#392)
hcopp Feb 17, 2026
f2a6486
feat: expo template (#402)
hcopp Feb 17, 2026
e149175
chore: custom slash command for breaking change review (#409)
cb-ekuersch Feb 18, 2026
5cff7b9
feat: pass text props down to internal Text for Button (#408)
haoruikun-cb Feb 19, 2026
0d24d5a
fix: tray regression (#414)
hcopp Feb 19, 2026
2616804
fix: card root background color (#405)
adrienzheng-cb Feb 19, 2026
6755313
feat: support reference price chart (#416)
hcopp Feb 20, 2026
aeff42a
feat: docs open in sandbox (#399)
hcopp Feb 20, 2026
40aaa8a
fix: Prevent `<TextInput type="number">` from changing value on scrol…
maximo-macchi-cb Feb 23, 2026
31eaf4c
fix: set paddingStart on Input for compact label (#423)
hcopp Feb 23, 2026
27961f5
feat: enhance Tag component with icon support and custom nodes (#421)
sverg-cb Feb 24, 2026
da7229c
feat: improve link docs (#428)
hcopp Feb 24, 2026
e4422e6
feat: chart transitions (#400)
hcopp Feb 25, 2026
9ba7cb2
feat: add range bar chart examples (#435)
hcopp Feb 25, 2026
3e768fa
fix: Truncate multi-select chip labels mid-word (#412)
maximo-macchi-cb Feb 25, 2026
b64aea4
chore: rename charts docs (#440)
hcopp Feb 25, 2026
71b3635
chore: deprecate useStatusBarHeight hook (#445)
stacysun-cb Feb 26, 2026
d02fa35
chore: Bump packages for security request (#422)
maximo-macchi-cb Feb 26, 2026
6f276e6
fix: allow arrow up/down keys within focus trapped text area (#417)
bpk9 Feb 26, 2026
9c0b3dc
feat: audit peer deps in ci (#437)
hcopp Feb 26, 2026
c959dbd
feat: tabs styles classnames (#438)
hcopp Feb 27, 2026
37da354
chore: add android to clean-expo command, remove duplicate (#444)
sverg-cb Feb 27, 2026
e99c198
fix: various typos (#456)
hcopp Mar 2, 2026
0bce89e
fix: various chart bugs (#463)
hcopp Mar 3, 2026
ea5a8a1
feat: Publish icons 2026-03-03 (#461)
cb-ekuersch Mar 3, 2026
ce54c04
feat: Publish illustrations 2026-03-03 (#466)
cb-ekuersch Mar 3, 2026
d18d603
feat: improve chart transition speed (#464)
hcopp Mar 4, 2026
cb15262
chore: fix code connect file (#470)
cb-ekuersch Mar 5, 2026
cf2ca85
fix: spread tabs props at end for Tabs (#472)
hcopp Mar 5, 2026
7087c03
feat: improve deprecation notice in ListCell (#411)
haoruikun-cb Mar 6, 2026
a0469f2
feat: add iconSize prop to IconButton for customizable icon sizes (#474)
haoruikun-cb Mar 6, 2026
4dff312
fix: Tooltip focus issue (#469)
adrienzheng-cb Mar 9, 2026
9ec435a
chore: refresh agentic setup around skills (#482)
cb-ekuersch Mar 9, 2026
5ca0047
feat: add new scrubber matchup example (#484)
hcopp Mar 9, 2026
ba60c15
fix: run visreg only when code files are changed (#486)
hcopp Mar 9, 2026
884baf4
feat: add accessibility support to loading state components (#388)
adrienzheng-cb Mar 10, 2026
baf7945
feat: chart layout (#483)
hcopp Mar 10, 2026
843bd06
chore: remove all JIRA references from version bump script (#335)
sverg-cb Mar 11, 2026
f8ec10f
fix: update chip docs (#491)
hcopp Mar 11, 2026
6b95d18
fix: Add keyboard scrolling support to `<Tray>` and `<Modal>` (#481)
maximo-macchi-cb Mar 11, 2026
38f0f5c
feat: support borderWidth on Checkbox and Radio (#457)
hcopp Mar 11, 2026
798efac
chore: update SelectChip docs (#494)
hcopp Mar 11, 2026
f981229
chore: add docs for SegmentedControl and mark deprecated (#493)
hcopp Mar 11, 2026
ba0348c
feat: Publish illustrations 2026-03-11 (#495)
stacysun-cb Mar 11, 2026
85bd403
feat: Publish icons 2026-03-11 (#496)
stacysun-cb Mar 12, 2026
6d65811
fix: mobile chart accessibility (#492)
hcopp Mar 12, 2026
a873e21
feat: Add Storybook a11y testing (#467)
maximo-macchi-cb Mar 12, 2026
e522175
feat: deploy Figma audit HTML report to GitHub Pages on master push (…
cb-ekuersch Mar 16, 2026
2a9644f
feat: add freeSolo Combobox example (#498)
hcopp Mar 17, 2026
d8230b4
chore: update Checkbox borderRadius to match design (#509)
hcopp Mar 17, 2026
dc88b76
Update chip docs (#510)
hcopp Mar 17, 2026
8128bb2
feat: Publish illustrations 2026-03-17 (#511)
adrienzheng-cb Mar 17, 2026
63f7999
fix: update RemoteImageGroup excess bg color (#512)
hcopp Mar 17, 2026
290fd92
chore: update readme files (#515)
hcopp Mar 17, 2026
514a958
chore: add debug workflow for branch testing (#518)
cb-ekuersch Mar 18, 2026
1333df7
feat: add guides to docs and migration guide (#519)
hcopp Mar 18, 2026
f2d2b06
fix: minimatch version (#516)
adrienzheng-cb Mar 18, 2026
4aafeb8
fix: expo glob patch for minimatch 10 (#521)
adrienzheng-cb Mar 18, 2026
e2d4b40
feat: add Calendar component and replace mobile native date picker (#…
sverg-cb Mar 19, 2026
f70078e
fix: tray examples (#522)
adrienzheng-cb Mar 19, 2026
4f93401
feat: add feature-planner skill for non-technical contributors (#525)
cb-ekuersch Mar 20, 2026
1e29b4b
feat: Publish illustrations 2026-03-20 (#526)
adrienzheng-cb Mar 20, 2026
7de0d51
fix: inconsistent icon font rendering (#527)
adrienzheng-cb Mar 23, 2026
3f2c0e0
fix: pin version of tar and koa (#535)
adrienzheng-cb Mar 23, 2026
9e3c385
chore: enforce target version for removal in deprecation annotations …
cb-ekuersch Mar 23, 2026
2ea3bea
chore: reorder eslintSimpleImportSort import (#538)
adrienzheng-cb Mar 23, 2026
3027761
feat: support modal subcomponent customization (#534)
hcopp Mar 23, 2026
62beb56
fix: Combobox space key issue (#523)
adrienzheng-cb Mar 24, 2026
51c52f9
feat: support focusedBorderWidth on TextInput (#537)
hcopp Mar 24, 2026
a9a8d02
fix: bar chart enter animation & min size (#540)
hcopp Mar 25, 2026
f64c266
fix: [CDS-1690] Fix Tooltip accessible name for interactive trigger (…
maximo-macchi-cb Mar 25, 2026
4e3186f
feat: support inputFont on inputs (#545)
hcopp Mar 27, 2026
60a9527
feat: add mobile-visreg package with maestro test suite (#517)
cb-ekuersch Mar 27, 2026
2459045
feat: Add new a11y lint rules (#528)
maximo-macchi-cb Mar 27, 2026
b0897d9
feat: Add rule creation docs to eslint plugin (#549)
maximo-macchi-cb Mar 27, 2026
7387c21
feat: Publish illustrations 2026-03-27 (#552)
haoruikun-cb Mar 27, 2026
9d8db0e
feat: customize radio controlSize & dotSize (#546)
hcopp Mar 28, 2026
5e05424
chore: improve reliability and speed of mobile visreg test suite (#555)
cb-ekuersch Mar 28, 2026
25a3e7f
chore: pin bn.js version (#557)
adrienzheng-cb Mar 29, 2026
cfc7c5e
feat: add indeterminate ProgressCircle (#501)
adrienzheng-cb Mar 29, 2026
3a8aba2
chore: deprecate CardGroup (#560)
hcopp Mar 30, 2026
daaf755
feat: added cds skills for distribution (#561)
haoruikun-cb Mar 30, 2026
ebc706f
chore: deprecate old card (#562)
adrienzheng-cb Mar 30, 2026
07b80dd
chore: reduce frequency of mobile visreg runs by sharing logic with w…
cb-ekuersch Mar 30, 2026
3e2cc69
feat: component height adjustments (#565)
hcopp Mar 31, 2026
32faee4
feat: component level theming (#507)
hcopp Mar 31, 2026
28bf7b7
fix: scrubber beacon label immediate updates (#570)
hcopp Mar 31, 2026
a93fbd5
fix: mobile scrubber initial load glitch (#573)
hcopp Apr 1, 2026
c93ab12
feat: Cds skills improvement (#574)
haoruikun-cb Apr 1, 2026
db36a26
fix: [CDS-1798] Remove usage of `Array.prototype.at()` (#575)
maximo-macchi-cb Apr 1, 2026
9798e04
[StepSecurity] Apply security best practices (#572)
stepsecurity-app[bot] Apr 1, 2026
bb350a9
feat: add script to generate concatenated docs for llm (#576)
adrienzheng-cb Apr 1, 2026
36fdae7
feat: [CDS-1575] Add type focus to `<Select>` (#571)
maximo-macchi-cb Apr 2, 2026
7e37585
feat: add DefaultTab and DefaultTabsActiveIndicator. (#558)
adrienzheng-cb Apr 2, 2026
9a32573
chore: revert debug workflow to its correct state (#581)
cb-ekuersch Apr 2, 2026
bf12750
chore: docs navigation fix for links with hashes (#589)
sverg-cb Apr 7, 2026
0a60a0b
chore: update README for cds-icons and cds-illustrations (#591)
sverg-cb Apr 7, 2026
16add9b
feat: adds standardized customization options to Tour (#592)
cb-ekuersch Apr 8, 2026
b84d6f6
ci: skip mobile visreg on PR rebuilds when relevant files haven't cha…
cb-ekuersch Apr 8, 2026
7773e2e
feat: Publish icons 2026-04-08 (#596)
sverg-cb Apr 8, 2026
aef29a6
feat: Publish illustrations 2026-04-08 (#597)
sverg-cb Apr 8, 2026
2caec47
fix: Mobile Cell testID missing in iOS (#568)
sverg-cb Apr 8, 2026
819da9f
fix: patch expo prebuild and pin annotation-jvm to restore Android bu…
sverg-cb Apr 9, 2026
5e55756
fix: Stepper animation with react-spring ^10.0.1 (#603)
adrienzheng-cb Apr 9, 2026
5ae2663
chore: update svg map (#604)
adrienzheng-cb Apr 9, 2026
1502a1f
feat: Color pairing tool (#524)
nicoledbelcher Apr 9, 2026
6037368
feat: add color switch to docs (#605)
adrienzheng-cb Apr 10, 2026
fbeacf6
fix: web Toast enter animation in React 19 StrictMode (#607)
sverg-cb Apr 10, 2026
da55093
chore: Agent skills cleanup (#608)
cb-ekuersch Apr 11, 2026
05576f7
docs: add README for the Color Pairing Tool widget (#610)
cb-ekuersch Apr 13, 2026
6faf11c
chore: undo test refactors from #568 (#611)
sverg-cb Apr 13, 2026
092a4a2
feat: add enter opacity transition to bars (#612)
hcopp Apr 13, 2026
8d5db5a
feat: PercentageBarChart (#550)
sverg-cb Apr 14, 2026
1019311
chore: drop animated percentage bar chart stories (#615)
hcopp Apr 15, 2026
1ccede7
chore: Add PercentageBarChart examples to DataCard docs (#616)
sverg-cb Apr 16, 2026
1472de0
fix: remove extra padding on combobox input (#617)
hcopp Apr 16, 2026
e98f46a
feat: [CDS-1801] Add customization for text in `<ModalHeader>` (#613)
maximo-macchi-cb Apr 16, 2026
255d7a8
feat: Publish icons 2026-04-16 (#619)
hcopp Apr 16, 2026
4036dc1
feat: Publish illustrations 2026-04-16 (#620)
hcopp Apr 16, 2026
35d5eb4
feat: PopoverPanel + Dropdown deprecation (#566)
adrienzheng-cb Apr 16, 2026
9b0c803
fix: support strict mode on charts (#618)
hcopp Apr 16, 2026
779dff3
chore: update sandbox dependency and fix npm publish (#621)
hcopp Apr 17, 2026
80224bf
feat: slack notifications (#625)
hcopp Apr 20, 2026
cfa9012
chore: update icon code connect (#629)
adrienzheng-cb Apr 20, 2026
90373b2
chore: update code connect again. (#630)
adrienzheng-cb Apr 20, 2026
df840f6
fix: bar chart enter animation (#631)
hcopp Apr 21, 2026
c006ca9
feat: add cds-docs skill (#635)
cb-ekuersch Apr 22, 2026
6741441
feat: add styles tab for web legend (#636)
hcopp Apr 22, 2026
49e4484
feat: add chart baseline (#502)
hcopp Apr 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
45 changes: 27 additions & 18 deletions .claude/agents/design-system-researcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,24 @@ These are the projects you may be tasked to research:
- packages/@mantine/charts/src/
- packages/@mantine/modals/src/

### React Aria

- Name: React Aria
- Docs: https://react-aria.adobe.com/
- Repo: https://github.com/adobe/react-spectrum.git
- Branch: main
- Component Paths:
- packages/react-aria-components/src/

### Tamagui

- Name: Tamagui
- Docs: https://tamagui.dev/docs/intro/introduction
- Repo: https://github.com/tamagui/tamagui.git
- Branch: master
- Component Paths:
- code/ui/

## Research Methodology

Follow this systematic approach:
Expand All @@ -81,19 +99,8 @@ Follow this systematic approach:
- If the theme of the research goal cannot be found within the project source code, abandon the research task

2. **Environment Preparation**
- Check if the project's repository has already been cloned:
```bash
ls temp/repo-cache | grep {{REPO NAME}}
```
- If the repository has already been cloned, update it to the latest commit:
```bash
cd temp/repo-cache/{{PROJECT NAME}} && git pull --quiet
```
- If the repository has not been cloned, clone it:
```bash
git clone --depth 1 {{PROJECT REPO URL}} temp/repo-cache/{{PROJECT NAME}} --quiet
```
- **NEVER** clone another repository outside of the SINGLE project you are researching.
- Use the `git.repo-manager` skill (`.claude/skills/git.repo-manager/SKILL.md`) to ensure the project's repository is cloned and up to date in `temp/repo-cache/`.
- Only manage the single repository you are researching.

3. **Deep Technical Analysis**
- Examine actual source code implementations, not just documentation
Expand Down Expand Up @@ -175,11 +182,13 @@ Create a comprehensive markdown report with the following structure:

## File Management

1. Create your report in the `.claude/research/` directory
2. Use a descriptive filename format: `[project]-[topic]-[date].md`
- Example: `material-ui-theming-2024-01-15.md`
3. Ensure the directory exists before writing (create if needed)
4. After completing your research and writing the report, explicitly communicate the filename to the parent agent
1. Reports should be organized in subdirectories within `.claude/research/` based on the research goal
2. Convert the research goal into a kebab-case directory name (e.g., "theming architecture" → `theming-architecture`)
3. Create your report in the research goal subdirectory: `.claude/research/[research-goal]/`
4. Use a descriptive filename format: `[project]-[date].md`
- Example: `.claude/research/theming-architecture/material-ui-2024-01-15.md`
5. Ensure the directory exists before writing (create if needed)
6. After completing your research and writing the report, explicitly communicate the full file path to the parent agent

## Quality Standards

Expand Down
46 changes: 0 additions & 46 deletions .claude/commands/competitor-research.md

This file was deleted.

8 changes: 0 additions & 8 deletions .claude/commands/component-docs.md

This file was deleted.

9 changes: 0 additions & 9 deletions .claude/commands/figma.audit-connect.md

This file was deleted.

10 changes: 0 additions & 10 deletions .claude/commands/figma.create-connect.md

This file was deleted.

7 changes: 0 additions & 7 deletions .claude/commands/ktlo.md

This file was deleted.

8 changes: 0 additions & 8 deletions .claude/commands/summarize-commits.md

This file was deleted.

8 changes: 0 additions & 8 deletions .claude/skills/cds-components/SKILL.md

This file was deleted.

186 changes: 186 additions & 0 deletions .claude/skills/components.best-practices/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
---
name: components.best-practices
description: Use this skill whenever working on CDS React components in any package.
user-invocable: false
---

# React Component Development Rules

## Component Development Workflow

1. Research similar reference components and given requirements/description
2. Optionally, ask clarifying questions about the component's requirements & behavior
3. Implement the component with unit tests & stories on web first before proceeding to mobile if both platforms were requested.
4. Never write figma code connect files unless explicitly instructed to do so.
5. Follow remaining general coding standards and guidelines you've been given.

## Reference Components

These high quality components demonstrate proper use of patterns/conventions:

- **Select** (alpha/): generics, controlled/uncontrolled, compound architecture
- **Stepper**: props-based defaults, metadata generics, compound components
- **Carousel** (web): compound components, imperative handle, context + hook
- **RollingNumber**: animation config extraction, measurement patterns
- **SlideButton** (mobile): gesture handling, spring animations, accessibility actions

## Organization

### File Structure

Every main CDS component should live within its own folder:

```
ComponentName/
├── ComponentName.tsx # Main component file
├── SubComponent.tsx # Supporting component (if needed)
├── index.ts # Re-exports for public API
├── __stories__/ # Storybook stories
│ └── ComponentName.stories.tsx
├── __tests__/ # Unit tests
│ └── ComponentName.test.tsx
├── __figma__/ # Figma Code Connect files
│ └── ComponentName.figma.tsx
```

### Component Categories

Organize components into category folders:

- `buttons` - Button, IconButton, SlideButton
- `controls` - TextInput, Select, Checkbox, Radio, Switch
- `cards` - Card, DataCard, ContentCard
- `overlays` - Modal, Toast, Alert, Drawer
- `layout` - Box, Stack, Divider
- `typography` - Text, Heading
- `icons` - Icon
- `navigation` - Tabs, Breadcrumb

## Component Conventions

- **Memoize**: Always memoize components with React's memo HOC
- **refs**: All components should accept a ref via React's forwardRef pattern
- **Props documentation**: Every prop that does not have a falsy default must have JSDoc comments with `@default` tags
- **Type exports**: Export both a `*BaseProps` and `*Props` type (e.g., `ButtonBaseProps`, `ButtonProps`)
- **Style overrides**: All components MUST support a way to override styles (varries by web/mobile platform)
- **testID**: Support `testID` prop on root element for every component
- **Use design tokens**: Reference packages/common/src/core/theme.ts:57-331 as the definitive source for available token names
- **Padding over margin**: Use padding in combination with flex gap to achieve spacing instead of margin.

## Design Token System

### Token Categories

Design tokens are defined in `packages/common/src/core/theme.ts`:

- **Color**: fg, fgMuted, fgInverse, fgPrimary, bgPrimary, bgSecondary, bgNegative, bgPositive, etc.
- **Space**: 0, 0.25, 0.5, 0.75, 1, 1.5, 2, 3, 4, 5, 6, 7, 8, 9, 10 (8px base unit)
- **IconSize**: xs (12px), s (16px), m (24px), l (32px)
- **AvatarSize**: s, m, l, xl, xxl, xxxl
- **BorderWidth**: 0, 100, 200, 300, 400, 500
- **BorderRadius**: 0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000
- **Font**: display1-3, title1-4, headline, body, label1-2, caption, legal
- **Shadow**: elevation1, elevation2

### Semantic Color System

Colors use a spectrum system with hue + step notation:

- **Hues**: blue, green, orange, yellow, gray, indigo, pink, purple, red, teal, chartreuse
- **Steps**: 0, 5, 10, 15, 20, 30, 40, 50, 60, 70, 80, 90, 100
- **Example**: blue60 = Coinbase brand blue (#0052FF)

Semantic tokens map to spectrum colors and adapt to light/dark mode:

- `fgPrimary`: blue60 (light) / blue70 (dark)
- `bgPrimary`: blue60 (light) / blue70 (dark)
- `bgNegative`: red60 (both modes)
- `bgPositive`: green60 (both modes)

### Space Scale

```typescript
space: {
'0': 0, // 0px
'0.25': 2, // 2px
'0.5': 4, // 4px
'0.75': 6, // 6px
'1': 8, // 8px - base unit
'1.5': 12, // 12px
'2': 16, // 16px
'3': 24, // 24px
'4': 32, // 32px
'5': 40, // 40px
// ... up to 10 (80px)
}
```

## Component Patterns

### Compound Components

- Break components down into discrete subcomponents (i.e. "slots")
- Use this pattern for complex components with clear, distinct parts
- Accept optional subcomponent props with sensible defaults using `*Component`/`Default*` naming:
```ts
NavigationComponent = DefaultCarouselNavigation,
PaginationComponent = DefaultCarouselPagination,
```
- The names of classNames/styles keys must line up with the name of the subcomponents (e.g. `classNames.pagination`, `styles.pagination`).
- Examples: Stepper, Carousel, Select (alpha)

**Benefits:**

- Complete customization without forking
- Sensible defaults for common use case
- Exported subcomponents for consumers to customize/wrap themselves

### Context + Hook Pattern

- Pair contexts with `use*Context()` hooks that throw descriptive errors on misuse:
```ts
export const useCarouselContext = () => {
const context = useContext(CarouselContext);
if (!context) throw new Error('useCarouselContext must be used within Carousel');
return context;
};
```

### Controlled/Uncontrolled Components

- Support both patterns for input components; validate and throw if consumer mixes them (e.g., provides `value` but not `onChange`)
- Use internal state with prop override: `const open = openProp ?? openInternal;`

### Generics for Type Safety

- Use generics for components with dynamic value types:
```ts
type SelectComponent = <Type extends SelectType, Value extends string>(
props: SelectProps<Type, Value>,
) => React.ReactElement;
```
- Examples: Select (alpha), Stepper

### BaseProps & Props

- Component modules encapsulate two prop Types: `*BaseProps` (platform-agnostic) and `*Props` (extends BaseProps with platform and component specific properties like `className`, `classNames`, `styles`, etc.)
- Reuse other components' Types via utilities: `Pick` being preferred then secondarily `Omit`/`Exclude`
- Compose prop types using Typescript intersections (`&`) in this order: (1) full types (2) Picks (3) Omits (4) other type literal(s):
```ts
type MyComponentProps = BoxBaseProps &
Pick<OtherComponentProps, 'someProp'> &
Omit<AnotherComponentProps, 'otherProp'> & {
propA: string;
propB: number;
};
```
- When accepting components as props, define the contract types (`*Props`, `*Component`) in the main component file. These child component contracts do not use the `*BaseProps` pattern—only the main component needs BaseProps/Props separation. Default implementations can extend the contract with additional props in their own file:

```ts
// In MyComponent.tsx - defines the contract
type ChildProps = { id: string; label: ReactNode };
type ChildComponent = React.FC<ChildProps>;

// In DefaultChild.tsx - extends for default implementation
type DefaultChildProps = SharedProps & Omit<HStackProps, 'children'> & ChildProps;
```
12 changes: 12 additions & 0 deletions .claude/skills/components.styles/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# components.styles agent skill

This skill may be invoked by the user following the examples below.

**Usage:** `/components.styles <ComponentName> [additional context]`

Examples:

- `/components.styles SlideButton`
- `/components.styles Button add static classnames for sub elements`
- `/components.styles Select add styles documentation`
- `/components.styles Avatar mobile only`
Loading
Loading