To add the Icon
component to your app:
import {Icon} from '@stripe/ui-extension-sdk/ui';
This is a preview of an Icon
component:
<Icon name="addCircle" />
Icon props![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
Property | Type |
---|
name
| Required "accept" | "add" | "addCircle" | "addCircleFilled" | "api" | "apps" | "arrowDown" | "arrowDownCircle" | "arrowExport" | "arrowExportCircle" | "arrowIncrease" | "arrowLeft" | "arrowLeftCircle" | "arrowRight" | "arrowRightCircle" | "arrowsInward" | "arrowsLoop" | "arrowsOutward" | "arrowUp" | "arrowUpCircle" | "arrowUpDown" | "arrowUpRight" | "arrowUpRightCircle" | "balance" | "bank" | "bankLightning" | "barChart" | "barGraph" | "beta" | "billing" | "billingQuote" | "block" | "business" | "calculator" | "calendar" | "call" | "camera" | "cancel" | "cancelCircle" | "cancelCircleFilled" | "card" | "caretDown" | "caretLeft" | "caretRight" | "caretUp" | "cart" | "certificate" | "change" | "changeCircle" | "charge" | "chat" | "check" | "checkCircle" | "checkCircleFilled" | "checkmark" | "chevronDown" | "chevronDownCircle" | "chevronLeft" | "chevronLeftCircle" | "chevronRight" | "chevronRightCircle" | "chevronUp" | "chevronUpCircle" | "circle" | "clipboard" | "clipboardCheck" | "clock" | "cloud" | "code" | "collapse" | "compliance" | "connectPayments" | "convert" | "coupon" | "createCards" | "createIdentityVerification" | "cross" | "crypto" | "customer" | "customerPortal" | "customers" | "customizeBrand" | "data" | "dataExport" | "delete" | "deploy" | "desktop" | "dispute" | "disputeProtection" | "doc" | "document" | "download" | "dragHandle" | "earlyFraudWarning" | "edit" | "editCircle" | "email" | "expand" | "explorer" | "export" | "exportCircle" | "external" | "externalTest" | "eyeClosed" | "eyeOpen" | "fee" | "filter" | "financialActivity" | "fingerprint" | "flag" | "folder" | "gavel" | "gift" | "globe" | "gridView" | "growth" | "guide" | "heart" | "heartFilled" | "help" | "hide" | "history" | "home" | "identityVerification" | "import" | "info" | "insight" | "invite" | "invoice" | "iosShare" | "lab" | "lightBulb" | "lightningBolt" | "link" | "list" | "listView" | "locationPin" | "lock" | "menu" | "miniPlayer" | "mobileWallet" | "moneyMovement" | "more" | "moreCircle" | "moved" | "navClock" | "negative" | "negativeCircle" | "negativeCircleFilled" | "new" | "next" | "note" | "notifications" | "office" | "openLock" | "order" | "orgChart" | "overflow" | "pane" | "panelArrowLeft" | "panelArrowRight" | "paperclip" | "passkey" | "pause" | "payByBank" | "payment" | "paymentLink" | "payout" | "person" | "personWithKey" | "phone" | "pieChart" | "pin" | "pinAdd" | "pinFilled" | "ping" | "pinOutline" | "plan" | "platform" | "play" | "playCircle" | "positive" | "previous" | "product" | "productSubscription" | "qrCode" | "recurring" | "recurringInvoice" | "refresh" | "refreshCircle" | "refund" | "refundCircle" | "reporting" | "reserve" | "review" | "risk" | "rocket" | "rule" | "safe" | "sandbox" | "search" | "send" | "settings" | "share" | "shield" | "shieldCheck" | "shoppingBag" | "show" | "signed" | "signOut" | "soundOff" | "soundOn" | "source" | "sparkle" | "spinner" | "star" | "starFilled" | "subscription" | "support" | "tag" | "tasks" | "terminal" | "thumbsDown" | "thumbsUp" | "topup" | "transfer" | "trash" | "trial" | "truck" | "upload" | "usage" | "vault" | "video" | "wallet" | "warning" | "warningCircle" | "webhook" | "website" | "wifi" | "withdrawal"
|
css
| Optional Object
Related types: CSS. |
size
| Optional ("xsmall" | "small" | "medium" | "large" | "xlarge") | undefined
|
CSS![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
Property | Type |
---|
fill
| Optional text and icon color token Contrasting color. See Color for details. If you don’t specify a fill value, the Icon gets its color from its parent. |
Size![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
Icons use the size
prop for sizing. They can have one of five sizes:
xsmall
: 12px
small
: 16px
medium
: 20px
(default)large
: 32px
xlarge
: 64px
<Icon name="business" size="xsmall" />
<Icon name="business" size="small" />
<Icon name="business" size="medium" />
<Icon name="business" size="large" />
<Icon name="business" size="xlarge" />
Color and fill![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
You can give the Icon
component color with the fill
property of the css
prop.
<Icon name="cancelCircle" css={{fill: 'critical'}} />
Default color behavior![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
By default, icons are the same color as the text around them.
<Inline css={{color: 'attention'}}>
<Icon name="chat" /> new messages
</Inline>
Accessibility![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)
By default, there is an aria-hidden
attribute on icons (read more about ARIA). In the rare situations the icon has semantic value to screen-reader users, you can manually set aria-hidden={false}
. In these situations it’s often a good idea to add an aria-label
as well. In general, it’s better to have text labels rather than making visual-only icons important for a workflow.
<Icon name="addCircle" aria-hidden={false} aria-label="Add another item" />
You can place an Icon
component inside of a Button
or Badge
component.
<Button>
<Icon name="chat" size="xsmall" />
<Inline>New messages</Inline>
</Button>
<Badge type="positive">
<Icon name="chat" size="xsmall" />
New messages
</Badge>
Icon reference![](https://b.stripecdn.com/docs-statics-srv/assets/fcc3a1c24df6fcffface6110ca4963de.svg)