
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
@sumup/icons
Advanced tools
Depending on your preference, run one of the following in your terminal:
# With npm
npm install @sumup/icons
# With yarn v1
yarn add @sumup/icons
The easiest way to use an icon in React is to import it as a component. This approach works out of the box (no special loaders needed), is tree-shaking enabled, and comes with TypeScript typings included.
import { Check } from '@sumup/icons';
const SuccessMessage = ({ description }) => (
<div>
<Check />
<span>{description}</span>
</div>
);
Some icons have multiple sizes. They default to size '24', if supported, or to the smallest available size. Use the size
prop to show one of the other sizes ('16' or '32') instead:
import { CircleCheckmark } from '@sumup/icons';
const SuccessMessage = ({ description }) => (
<div>
<CircleCheckmark size="24" />
<span>{description}</span>
</div>
);
To change the color of an icon, set the color
property in CSS. The color will cascade down since the fill
and stroke
attributes of all monochrome icons are set to currentColor
. Here's an example with a CSS-in-JS library:
import styled from '@emotion/styled';
import { Check } from '@sumup/icons';
const GreenCheck = styled(Check)`
color: green;
`;
const SuccessMessage = ({ description }) => (
<div>
<GreenCheck />
<span>{description}</span>
</div>
);
Alternatively, it's possible to import the raw SVG files. Most bundlers require a special loader to make this work. For Webpack, we recommend the file-loader which turns the import into a URL to the SVG.
import checkIcon from '@sumup/icons/check_small.svg';
const SuccessMessage = ({ description }) => (
<div>
<img src={checkIcon} alt="" aria-hidden="true" />
<span>{description}</span>
</div>
);
It is not possible to change the color of an external SVG using the css
color property. Instead, you can use the CSS filter
hack to colorize the icon.
The latest version of the icon library is automatically deployed to Vercel. The files are hosted behind a global CDN, so they load quickly for all users. You can load the icons from https://circuit.sumup.com/icons/v2/<name>_<size>.svg
. Below are some examples:
<img
src="https://circuit.sumup.com/icons/v2/checkmark_16.svg"
alt="checkmark"
/>
.icon {
background-image: url('https://circuit.sumup.com/icons/v2/checkmark_16.svg');
}
It is not possible to change the color of an external SVG using the CSS color
property. Instead, you can use the CSS filter
hack to colorize the icon.
FAQs
A collection of icons by SumUp
We found that @sumup/icons demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 13 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.