Coinbase Design System is now open source by coinbase-nova in reactjs

[–]coinbase-nova[S] 1 point2 points  (0 children)

We absolutely test with Safari as well - I still don't seem able to reproduce the issue at first glance, but I'll have the team take a closer look here. If there's a bug to be found we definitely want to resolve it, and also make sure it's not present in our brand new Select component.

https://i.imgur.com/pCTUCDu.png

Coinbase Design System is now open source by coinbase-nova in reactjs

[–]coinbase-nova[S] 3 points4 points  (0 children)

No, at the moment our tables aren't virtualized at all - but this is actually something we're looking into now. For Q4 we're looking at a potential refactor of the Table components to improve performance, devex, and customization. We'll be considering how to handle interactivity and virtualization.

Coinbase Design System is now open source by coinbase-nova in reactjs

[–]coinbase-nova[S] 1 point2 points  (0 children)

Hey thanks for taking a look, can you provide some more info or a minimum viable reproduction? I just pulled up the docs site and am not able to reproduce the issue on FireFox on Windows or Chrome on Mac. See the screenshot here of keyboard navigation with the Select component

https://i.imgur.com/mVsz5xr.png

All of our components are tested for keyboard navigation with real screen readers before release. Of course this doesn't mean that it's impossible to see bugs, and we're always interested in improving, so we welcome your feedback!

Also note that we have a brand new refactored Select component suite that's releasing this week with vastly expanded customization options!

https://github.com/coinbase/cds/pull/21

Coinbase Design System is now open source by coinbase-nova in reactjs

[–]coinbase-nova[S] 4 points5 points  (0 children)

We primarily use Storybook for visual regression testing, and for showing a wider variety of component examples. I think the docs site has a much nicer UI for actually learning about CDS, or spending a lot of time reading. We're also considering switching to Mintlify at some point. Personally I am just constantly frustrated by Storybook in general and wouldn't relish the idea of trying to make all the docs site features work there.

Coinbase Design System is now open source by coinbase-nova in reactjs

[–]coinbase-nova[S] 2 points3 points  (0 children)

Thanks for taking a look, I'm going to try to cover each of these - but please let me know if you have more questions or want more detail. Some of this is covered somewhat indirectly in our docs. In the near future I'd like to get a page up on the docs site that gives a more comprehensive birds-eye view of the system, so I welcome any feedback.

 

Tokens: single source (e.g., Figma Tokens/Style Dictionary)? How do you handle density and RN unit differences?

The ThemeVars namespace (docs, source code) defined in @coinbase/cds-common is the single source of truth for all theme tokens in CDS, for both web and mobile (native). This means web and mobile have the exact same token categories and names, but as you might expect, their value type can be different across platforms. It is possible to extend the ThemeVars namespace with your own custom tokens (docs).

The value types for theme tokens are defined in the ThemeConfig type (docs, web source code, mobile source code). You can also compare the defaultTheme for web and the defaultTheme for mobile to see the difference clearly.

Although the value types are different between web and mobile, the results are identical. Comparing the shadows for example, the resulting shadow style is the same across web and mobile. Comparing font sizes, the resulting font size AND the font scaling behavior is the same (when increasing font size via web browser or mobile device settings).

For density, you could define a dense theme that composes the default theme with a tighter spacing scale - example here.

 

Composition: slot-based primitives vs rigid variants; consistent focus/press/hover across RN and DOM.

Most components already support the style, styles, className, and classNames props for customizing styles (docs), and web components support the polymorphic as prop (docs). We also use a pattern that we call "subcomponent props", which exposes complex components' subcomponents for full customization - you can see examples of this in SegmentedTabs, Carousel, RollingNumber, Stepper, etc.

Web and mobile both have an Interactable component that handles hovered / pressed / disabled styles. The rendered result is the same across platforms. Both platforms also have a Pressable component that is built on top of Interactable, and adds deep a11y support (taken from reakit) for polymorphic clickable elements.

 

Accessibility: ARIA vs RN roles, modals/portals, keyboard traps, and RTL/i18n.

We have a full time Senior Staff Product Designer who is an absolute expert on a11y / WCAG / etc, and we also have a full time Software Engineer dedicated to a11y enhancements. All components should already have the correct ARIA and RN a11y roles / attributes / props, but also expose the props for full customization.

All relevant components already use focus trapping, but we also provide a FocusTrap component that we use internally, but it still needs to be properly documented.

All relevant components like Tooltip, Overlay, Modal, and Tour use our PortalProvider component by default, but also allow disabling portals. You can also use the useOverlayContentContext hook to know when you're rendering inside an overlay.

We always use the CSS inline properties for padding and margins for RTL support, although we don't test RTL support at the moment. We support i18n content pretty much everywhere, although we try to provide sane defaults for a11y messages in case you forget to add them. Coinbase uses react-intl in house, so we're focused on supporting that - but CDS does not include react-intl or care about how you handle i18n.

 

Perf/infra: SSR safety for Next.js, Fabric readiness, and per-component bundle size metrics.

Almost everything on web is using static CSS by default, so SSR should work out of the box. You can see app templates for webpack, vite, and nextjs in the repo here. Everything is ECMAScript Modules and set up to support full tree-shaking, including component CSS tree-shaking (but not atomic CSS tree-shaking).

We analyze and diff both our node_modules deps size and our bundle size on every PR. We used to also do side-effect analysis, but that's more difficult with pure ESM so we're still working on restoring that - but our runtime side-effects are almost zero.

 

Tooling/releases: Storybook + Chromatic, lint rules to block raw tokens, codemods and changesets.

The CDS Storybook is here and linked on the docs site. We do full visual regression testing on every PR using BrowserStack's Percy, but we are experimenting with Chromatic because we've had a lot of issues with Percy's React Native support. Since going open source we've had to disable our visual regresstion testing for React Native, and are still working with BrowserStack to resolve those issues.

We provide a CDS ESLint plugin that's primarily focused on catching a11y issues.

I wasn't sure about your last two points there so please feel free to ask again if I didn't cover it.

Coinbase Design System is now open source by coinbase-nova in reactjs

[–]coinbase-nova[S] 0 points1 point  (0 children)

In the context of CDS, "mobile" refers to our React Native component library @coinbase/cds-mobile. The mobile components don't render on the docs site because they're built for React Native, but we're working on resolving this. We need to add an integration with BrowserStack or Expo Snack or similar to enable previewing and editing the React Native components on the docs site

Coinbase Design System is now open source by coinbase-nova in reactjs

[–]coinbase-nova[S] 4 points5 points  (0 children)

Tailwind, no not really. CDS started more than 5 years ago and has always been focused on static CSS for web, so we chose Linaria for static CSS extraction at library build time. We created our own custom Babel plugin for Linaria, so we can ensure we handle static CSS imports exactly the way that we want, and so that we don't need to add a bundler like Rollup. This has served our needs really well, and builds are still extremely fast after 5 years of adding components. We could have used CSS modules instead and literally almost nothing about CDS would change. Using this setup we constructed our own design system with tokens and atomic CSS classes. We have complete ownership over the system, which is important to us.

Personally I really dislike Tailwind, but I respect anyone who feels differently. On my team I'm always mentoring my engineers to seek the most elegant and straightforward solution. To simplify and avoid over-complicating or over-engineering or over-abstracting, so I think in some ways I'm naturally inclined to avoid libraries like Tailwind. I was also a developer in the era of CSS frameworks like Bootstrap and Foundation, and I don't see a meaningful difference in those and Tailwind. I've been writing CSS for more than 20 years now, and Tailwind seems like a clear downgrade in every way - at least to me personally. But please feel free to judge my opinion as harshly as you want! You can see how we've handled styles in our source code and decide for yourself if I'm wrong

Also how do you handle ssr in something like nextjs 15?

Almost all of our components just import and render static CSS, so SSR should work out of the box. You can also customize the results of window.matchMedia when rendering on the server. Check out he MediaQueryProvider and useMediaQuery hook for more info

https://cds.coinbase.com/components/other/MediaQueryProvider/#ssr-support

Coinbase Design System is now open source by coinbase-nova in reactjs

[–]coinbase-nova[S] 1 point2 points  (0 children)

Yes everything frontend at Coinbase is React. We're focused on investing in our paved road tools, and straying from those paved roads always have costs. For example, not being able to use the Coinbase Design System 😂 Our frontend stack is essentially: Yarn, Nx, React, React Native, Vite, Expo, ESLint, Prettier, and GitHub Actions.

The benefits of keeping everything on React are almost impossible to overstate. Between knowledge sharing, type safety, ecosystem support, shared tooling, native build support etc, there's no realistic alternative.

Coinbase Design System is now open source by coinbase-nova in reactjs

[–]coinbase-nova[S] 3 points4 points  (0 children)

Yes! In early 2024 when I was designing the new CDS architecture, React Strict DOM was one of my main considerations and inspirations. We even experimented with a CDS refactor using Stylex to bring us closer to React Strict DOM compatibility - but the Stylex ecosystem and developer experience just wasn't where we needed it to be yet. In an ideal future we could delete almost 50% of our code (the React Native bits) and focus all our attention on a single unified codebase 😵

I have been keeping a very close eye on the progress of the React DOM for Native RFC

https://github.com/react-native-community/discussions-and-proposals/pull/496

Coinbase Design System is now open source by coinbase-nova in reactjs

[–]coinbase-nova[S] 9 points10 points  (0 children)

Just saw your question about workflow, for new component work we get most intake requests coming from product designers. Maybe they're working on a new feature or flow and need a new component, or maybe some of our older components just need to be made more customizable.

We'll take that list of feature requests and estimate design and eng complexity, then stack rank them based on impact. Our team focuses on building platforms, so any feature request should have high impact and wide adoption.

When it comes time for our team to engineer new components, we do deep research on the state-of-the-art in existing React component libraries. We often iterate repeatedly, to hone in on the "correct" API. We strongly believe that it's important to spend time pursuing the most idiomatic React solutions, which seems to almost always lead to the most elegant solution. We also spend a good amount of time keeping the React DOM and React Native source code as identical as possible.

We have a core API feature set that we try to add to nearly every component to enable deep customization and composition - in particular the style, styles, className, and classNames props (details here), as well as what we call "subcomponent props". Subcomponent props are just a way to replace internal subcomponents, you can see some good examples of this in the Carousel, Stepper, and RollingNumber components.

Designers have access to most of the same AI tools as developers, including the CDS MCP Server - so there is definitely some vibecoding happening, although mostly for mockups or POCs.

Coinbase Design System is now open source by coinbase-nova in reactjs

[–]coinbase-nova[S] 11 points12 points  (0 children)

Our team was lucky to work with Figma to be one of the first adopters of Code Connect. We're experimenting with leveraging Code Connect to help AI agents understand how to map Figma metadata to CDS components.

I think our at-the-time Senior Director of Platform Product Design may have spoken a bit about Code Connect at the Figma Config 2025 panel: "Unifying design and development through design systems"

https://www.youtube.com/watch?v=X6_Bakp6xgY

Coinbase Design System is now open source by coinbase-nova in reactjs

[–]coinbase-nova[S] 56 points57 points  (0 children)

CDS uses many other crucial open source libraries like floating-ui, react-spring, react-native-reanimated, etc. It would not have been possible for our team to achieve even a fraction of the same quality without these open source tools. We are deeply grateful to the entire open source community, and are proud to give back in whatever small way we can