C++ Logo
CplusplusLogo is a small SVG component that renders the C++ programming language logo as a blue hexagonal icon. It is intended for showing C++ branding in docs, tooling, or language pickers.


Installed with plain
See how it was built shadcn add · no workarounds · theme neutral (none shipped)Installation
pnpm dlx shadcn@latest add @elements/cplusplus-logo
Requires @elements in the registries of your components.json (shadcn adds official directory namespaces automatically).
Usage
usage.tsx
import { CplusplusLogo } from '@/components/logos/cplusplus'export function Example() { return <CplusplusLogo className='size-8' />}- Show the C++ language brand next to code samples, package listings, or language tags.
- Mark C++ items in a language selector, filter list, or technology stack section.
- Use as a compact icon in a footer, badge, or card where a recognizable C++ mark is needed.
- Avoid it when you need a colored or animated logo; this component renders one fixed blue fill with no animation.
Examples
Language tag with icon
Shows the C++ logo beside a text label inside a tag-style element.
language-tag-with-icon.tsx
import { CplusplusLogo } from '@/components/logos/cplusplus'export function LanguageTag() { return ( <span className='inline-flex items-center gap-1.5 rounded-md border px-2 py-1 text-sm'> <CplusplusLogo className='size-4' /> C++ </span> )}Technology stack grid
Renders several language logos in a responsive grid, using the component for the C++ entry.
technology-stack-grid.tsx
import { CplusplusLogo } from '@/components/logos/cplusplus'export function StackGrid() { return ( <ul className='grid grid-cols-4 gap-4'> <li className='flex flex-col items-center gap-2'> <CplusplusLogo className='size-10' /> <span className='text-xs'>C++</span> </li> </ul> )}Footer brand mark
Places a small logo in a footer link with a visible text label.
footer-brand-mark.tsx
import { CplusplusLogo } from '@/components/logos/cplusplus'export function FooterLink() { return ( <a href='https://isocpp.org' className='flex items-center gap-2 hover:opacity-80'> <CplusplusLogo className='size-6' /> <span>ISO C++</span> </a> )}API reference
PropTypeDefaultDescription
classNamestring | undefined—Optional CSS class applied to the root svg element. Use it to set size and color-related utilities.
variant"icon" | undefined"icon"Declared in the props interface with only the value icon. The current implementation accepts it but does not use it when rendering.
mode"dark" | "light" | undefined"dark"Declared in the props interface. The current implementation accepts it but does not use it; the fill is always #00599C.
Accessibility
- The svg has role="img" and includes a <title>C++</title>, so screen readers announce it as the image named C++.
- If the logo appears only as decoration next to visible text, the component offers no prop to hide it, so wrap it in an element with aria-hidden="true" to remove it from the accessibility tree.
- The component has no aria-label prop; the accessible name is always the fixed text C++.
- The blue fill (#00599C) is designed for light backgrounds. Check color contrast if you place it on dark backgrounds, since the cutout areas will show the background color.
Docs written by anthropic:claude-haiku-5-5 from the registry source.
Use with Coding Agent
Paste this into Claude Code, Codex or Cursor. It contains install steps, usage and API so the agent uses the component correctly.
prompt.md
Use the "C++ Logo" component (elements/cplusplus-logo) from its shadcn registry.1. Install it with: npx shadcn@latest add @elements/cplusplus-logo2. Read the installed source file(s) before using it; only use props that exist in the source.3. Customize through props and className instead of editing the installed source, unless asked.4. Available props: className, variant, mode.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { CplusplusLogo } from '@/components/logos/cplusplus'export function Example() { return <CplusplusLogo className='size-8' />}```Files & dependencies
- registry/default/blocks/logos/cplusplus-logo/components/logos/cplusplus.tsx