Skip to content

Styling

Flag components accept all standard SVG props, making them easy to style with any CSS approach.

Tailwind CSS

Use utility classes for rapid styling with design consistency.

Inline Styles

Perfect for dynamic styles or one-off customizations.

CSS Modules

Scoped styles with traditional CSS syntax and no naming conflicts.

Styled Components

CSS-in-JS solution with full theme integration.

import { FlagUs } from '@sankyu/react-circle-flags'
export default function TailwindFlag() {
return (
<FlagUs className="w-12 h-12 rounded-full shadow-lg hover:scale-110 transition-transform" />
)
}

All flags support standard SVG properties:

import { FlagJp } from '@sankyu/react-circle-flags'
export default function CustomFlag() {
return (
<FlagJp
width={64}
height={64}
className="my-flag"
style={{ opacity: 0.8 }}
onClick={() => console.log('Flag clicked!')}
aria-label="Japan flag"
/>
)
}