How to use the China icon
import { ChinaFlag } from "@/assets/icons/chinaFlag"
export default function Example() {
return <ChinaFlag width="32px" height="32px" />
}Flags icon
Copy the China icon as an optimized JSX SVG component for React, Next.js, dashboards, landing pages and Tailwind interfaces.
Copy-ready code
// Source: https://raw.githubusercontent.com/lipis/flag-icons/main/flags/4x3/cn.svg
// Asset license: flag-icons MIT. Country flags are national symbols; use respectfully and verify local requirements where applicable.
export const ChinaFlag = ({ width = "40px", height = "30px", ...props }) => (
<svg {...props} width={width} height={height} viewBox="0 0 640 480" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" preserveAspectRatio="xMidYMid meet">
<defs>
<path id="cn-a" fill="#ff0" d="M-.6.8 0-1 .6.8-1-.3h2z"/>
</defs>
<path fill="#ee1c25" d="M0 0h640v480H0z"/>
<use href="#cn-a" width="30" height="20" transform="matrix(71.9991 0 0 72 120 120)"/>
<use href="#cn-a" width="30" height="20" transform="matrix(-12.33562 -20.5871 20.58684 -12.33577 240.3 48)"/>
<use href="#cn-a" width="30" height="20" transform="matrix(-3.38573 -23.75998 23.75968 -3.38578 288 95.8)"/>
<use href="#cn-a" width="30" height="20" transform="matrix(6.5991 -23.0749 23.0746 6.59919 288 168)"/>
<use href="#cn-a" width="30" height="20" transform="matrix(14.9991 -18.73557 18.73533 14.99929 240 216)"/>
</svg>
)
import { ChinaFlag } from "@/assets/icons/chinaFlag"
export default function Example() {
return <ChinaFlag width="32px" height="32px" />
}Built for the web
This copy-ready component works in React and Next.js projects, and the SVG can be adapted for any interface.
Looking for a similar mark? Browse the related icons below or explore the full flags collection.
Yes. You can copy the JSX component and use it in React and Next.js projects.
Yes. Edit the SVG attributes or pass className, width, height and color props depending on the component.