feat(kumo): add CloudflareLogo and PoweredByCloudflare components#30
feat(kumo): add CloudflareLogo and PoweredByCloudflare components#30mattrothenberg wants to merge 6 commits intocloudflare:mainfrom
Conversation
- Add CloudflareLogo component with glyph and full logo variants - Support color schemes: brand colors, black, white - Export SVG path data and brand colors for custom implementations - Add documentation page with demos including brand assets dropdown menu
|
internal chat thread: https://chat.google.com/room/AAQAys6oE8c/LMDd7E3OoME/LMDd7E3OoME?cls=10 |
- PoweredByCloudflare: less rounded (rounded-lg), tighter padding, asymmetric pl/pr for optical centering - PoweredByCloudflare white variant: dark badge background so white logo/text is readable - Color variant demos: remove redundant color name labels - Docs code example: add missing black variant Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
hey matt made some styling tweaks here, should be good to go now! |
The black variant needs a white background so the black logo remains visible in dark mode (mirrors the approach used for the white variant).
- Add generateCloudflareLogoSvg() for generating SVG markup strings - Make internal constants private (no longer exported) - Fix lint: replace neutral-* tokens with bg-black/bg-white + ring opacity variants - Update docs to show new SVG generation API
|
@stritt Awesome! Made some changes to your The issue was that I tweaked:
As such the black and white variants are intentionally NOT theme-responsive. If someone picks color="white", they get a white logo on a dark background regardless of whether the app is in light or dark mode. Same for color="black" - always black logo on light background. This makes sense because the logo color is fixed, so the background needs to be fixed too. The color="color" variant (default) still uses semantic tokens and responds to theme normally. Let me know if you had a different vision for this! |
This is a speculative PR to gather feedback on the API design and implementation approach.
Summary
CloudflareLogocomponent with glyph and full logo variantsPoweredByCloudflarebadge component for footer attributionComponents
CloudflareLogo
Props:
variant:"full"(default) |"glyph"- Full logo with wordmark or cloud icon onlycolor:"color"(default) |"black"|"white"- Color schemePoweredByCloudflare
A badge-style link component for "Powered by Cloudflare" attribution.
Exported Constants
For custom implementations, the component exports:
CLOUDFLARE_ORANGE,CLOUDFLARE_YELLOW,CLOUDFLARE_TEXT_GRAYCLOUDFLARE_GLYPH_ORANGE_PATH,CLOUDFLARE_GLYPH_YELLOW_PATH, etc.CLOUDFLARE_GLYPH_VIEWBOX,CLOUDFLARE_FULL_LOGO_VIEWBOXDark Mode
The wordmark text color respects dark mode via
text-kumo-default. The cloud glyph maintains brand colors whencolor="color".