MCPcopy Index your code
hub / github.com/element-hq/compound-web

github.com/element-hq/compound-web @v9.7.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v9.7.1 ↗ · + Follow
141 symbols 664 edges 209 files 9 documented · 6% 1 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Compound Web

Quality Gate Status Coverage

React implementation of Compound – Element's design system – See full documentation on https://compound.element.io

Development

Command Runs
yarn dev Runs a local Storybook server
yarn lint Lints all components
yarn gen:component $name Bootstraps a new component

Make sure to read the guidelines for component development.

Testing

Command Runs
yarn test Runs unit tests
yarn e2e:docker Runs end-to-end tests
yarn e2e:docker -u Updates end-to-end test snapshots

All components are expected to come with comprehensive unit tests and visual tests. We use Playwright to run visual tests on every story present in Storybook, so story coverage is really important! It helps us validate component implementations against the designs and prevents visual regressions at the same time.

We recommend running the end-to-end tests via Docker as shown above to get consistent text rendering for screenshots.

Linking

If you want to work on Compound Web as a linked package within a larger React application, TypeScript might complain about there being multiple copies of @types/react in the tree. You can work around this by linking Compound Web's copy of @types/react to your application's copy:

$ cd my-application/node_modules/@types/react
$ yarn link
$ cd ../../../../compound-web
$ yarn link @types/react

Release

To release a new version of Compound Web:

  1. Review the changes since last released and choose the appropriate version bump (major, minor, patch).
  2. Run the Release npm package action, inputting the version bump. The action will:
  3. add a commit bumping the version in package.json
  4. publish the package to npm
  5. tag a release on Github
  6. Manually add a changelog to the release on github.

Copyright & License

Copyright (c) 2023-2026 New Vector Ltd

This software is multi licensed by New Vector Ltd (Element). It can be used either:

(1) for free under the terms of the GNU Affero General Public License (as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version); OR

(2) under the terms of a paid-for Element Commercial License agreement between you and Element (the terms of which may vary depending on what you and Element have agreed to). Unless required by applicable law or agreed to in writing, software distributed under the Licenses is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licenses for the specific language governing permissions and limitations under the Licenses.

Extension points exported contracts — how you extend this code

BigIconProps (Interface)
(no doc)
src/components/Icon/BigIcon/BigIcon.tsx
StoryEntry (Interface)
(no doc)
playwright/visual.test.ts
Props (Interface)
(no doc)
src/components/Glass/Glass.tsx
Stories (Interface)
(no doc)
playwright/visual.test.ts
TooltipAnchorProps (Interface)
(no doc)
src/components/Tooltip/Tooltip.tsx
Props (Interface)
(no doc)
src/components/Tooltip/TooltipProvider.tsx
CommonUseTooltipProps (Interface)
(no doc)
src/components/Tooltip/useTooltip.ts

Core symbols most depended-on inside this repo

setOpen
called by 16
src/components/Tooltip/useTooltip.ts
useTooltipContext
called by 3
src/components/Tooltip/TooltipContext.ts
useReleaseAnnouncementContext
called by 3
src/components/ReleaseAnnouncement/ReleaseAnnouncementContext.ts
getPlatform
called by 3
src/utils/platform.ts
changeDisplay
called by 2
src/components/Nav/NavBar.stories.tsx
hasLabel
called by 1
src/components/Tooltip/Tooltip.tsx
useTooltip
called by 1
src/components/Tooltip/useTooltip.ts
shouldBeAButton
called by 1
src/components/Avatar/Avatar.tsx

Shape

Function 104
Interface 29
Class 4
Enum 2
Method 2

Languages

TypeScript100%

Modules by API surface

src/components/Typography/Heading.tsx7 symbols
src/components/Tooltip/useTooltip.ts6 symbols
src/components/Tooltip/Tooltip.tsx6 symbols
src/components/Form/PasswordForm.stories.tsx6 symbols
src/components/ReleaseAnnouncement/ReleaseAnnouncement.tsx5 symbols
src/components/Breadcrumb/Breadcrumb.tsx5 symbols
src/components/Menu/Menu.tsx4 symbols
src/components/Menu/ContextMenu.tsx4 symbols
src/components/Form/Controls/EditInPlace/EditInPlace.tsx4 symbols
src/components/Dropdown/Dropdown.tsx4 symbols
src/components/Tooltip/Tooltip.stories.tsx3 symbols
src/components/Menu/MenuContext.tsx3 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add compound-web \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page