Working with the Ridge React H4 Component
If you're building a design system with Ridge React and trying to get H4 headings to render consistently across your app, the documentation alone won't cover every edge case. The Ridge React H4 User Manual gives you the API surface, but the actual behavior changes depending on your theme configuration and CSS layer ordering. I learned that the hard way when my headings looked fine in Storybook but broke in the staging build. The manual walks you through prop overrides, className merging, and the typography scale integration. It's reasonably detailed on the surface. The component accepts standard heading props plus a set of Ridge-specific tokens like tone, weight, and responsive. The trick is understanding how those tokens resolve at different breakpoints, because the responsive mode doesn't follow a simple linear scale. I ran into a specific issue last quarter where the H4 component would collapse its top margin when placed inside a Ridge Card with a custom background token. The manual mentions margin collapsing briefly in the accessibility section, but it doesn't show the exact CSS specificity conflict that causes it. My workaround was to wrap the H4 in a Stack component with gap instead of relying on the heading's built-in margin. That sidesteps the margin collapse entirely and keeps your layout predictable.
Setup and Basic Usage
After installing the Ridge React package, importing the H4 component is straightforward. You import it from the main export path, then drop it into your JSX like any other React element. The default behavior applies your theme's h4 typography token automatically, so you typically don't need to pass anything unless you're overriding the default scale or tone. The prop interface includes children for content, id for anchor linking, className for custom overrides, and a few theme-specific props. When you combine tone with weight, the component merges both tokens rather than letting one override the other. That's useful when you want a bold heading in a muted color, but it's easy to miss if you only glance at the docs.
Common Pitfalls
One thing the manual doesn't stress enough is how CSS layer ordering affects H4 rendering when you've also imported a global reset or a third-party component library. If your project uses Tailwind or a similar utility framework alongside Ridge, the specificity war between your utility classes and the Ridge heading styles can produce inconsistent results across browsers. I've seen headings render correctly in Chrome but lose their responsive scaling in Firefox after a dependency update shifted the CSS cascade order. Another thing to watch out for is server-side rendering hydration mismatches. When you use dynamic className construction based on runtime conditions, Next.js or similar SSR setups will flag a mismatch if the server and client resolve different styles. The fix is usually straightforward — move your conditional class logic into a useMemo or derive it from a stable prop — but it costs time you didn't plan to spend debugging it.
Get the Full Details

Advanced Configuration
If you need fine-grained control over the typography scale, you can extend the theme configuration at the provider level rather than overriding individual components. This is the cleaner approach because it keeps your heading styles consistent across the entire app. You define the h4 token in your theme file with the exact font size, line height, letter spacing, and weight you want, then let the component pick it up automatically. For projects with multiple products sharing a design system, I'd recommend using the theme scope feature to isolate H4 variants per product. This prevents one team's styling decisions from leaking into another team's interface. The manual covers scope isolation, but the practical detail about prop drilling your theme context through nested layouts is worth remembering. If your component tree is deep enough, missing that context at any level will cause the H4 to fall back to defaults unexpectedly.
When Ridge React H4 Isn't the Right Tool
The component works well for standard documentation sites, dashboards, and marketing pages. It's not ideal for extremely complex typographic hierarchies where you need pixel-perfect control over every heading variant across twenty breakpoint combinations. In those cases, you're better off building a lightweight wrapper around a raw CSS-in-JS solution or using a dedicated typography library like Tamagmi or Van Excess. Ridge React H4 abstracts enough away to be convenient, but that convenience comes with less visibility into the generated styles when things go wrong. The Ridge React H4 User Manual is a solid starting point, but you'll save yourself weeks of troubleshooting if you understand the margin collapsing behavior, the SSR hydration gotchas, and the theme scope mechanics before you start building. The documentation assumes you already know how React theming works at a reasonable depth. If you don't, spend some time with the provider setup first.