The Icons component leverages SVG sprites to manage and display both monotone and duotone icons efficiently. This setup allows for easy styling and consistent performance across your project.
For icons with a single path, the fill
is set to currentColor
, allowing you to easily override the color via CSS.
activity
alert-cicrle
align-center
align-justified
align-left
align-right
arrow-down
arrow-left
arrow-right
arrow-up
at-sign
bar-chart
bell
bell-off
bold
bookmark
calendar
camera
check
check-circle
check-square
chevron-down
chevron-left
chevron-right
chevron-up
circle
clipboard
clock
copy
credit-card
crop
delete
dollar-sign
download
droplet
edit
external-link
eye
eye-off
file
filter
flag
heart
help-circle
home
image
info
italic
link-alt
linked-in
list
lock
map-pin
menu
message-circle
minus
more-horizontal
move
phone
play
play-circle
plus
printer
quote
rotate-ccw
rotate-cw
search
send
settings
share
square
star
tag
thumbs-down
thumbs-up
tik-tok
trash-2
user
user-plus
users
x
x-circle
youtube
For icons with multiple paths, the original fill
colors are preserved, ensuring that the intended two-tone design is maintained.
become-an-advocate
careers
cures
diversity
faq
funded-ops
funded-research
global-collaboration
impact
insulin-affordability
insulin-strips
leadership
medicine
microscope
mobile-article
online-forum
press-media
pumps-cgms
research
screening
sdp
signing-petition
symptoms
timely-diagnosis
treatments
To use an icon from the sprite, include the following in your HTML. We recommend using the BEM (Block Element Modifier) naming convention for consistency and clarity.
<svg class="bt1d-icon bt1d-icon--[icon-name]">
<use xlink:href="path/to/dist/svg/icons-sprite.svg#icon-[icon-name]"></use>
</svg>
Example HTML:
<svg class="bt1d-icon bt1d-icon--activity">
<use xlink:href="path/to/dist/svg/icons-sprite.svg#icon-activity"></use>
</svg>
You can customize the appearance of your icons using CSS. The BEM naming convention makes it easy to target specific icons or apply global styles to all icons.
Example CSS:
.bt1d-icon {
width: 24px;
height: 24px;
fill: currentColor; /* For monotone icons */
}
.bt1d-icon--activity {
color: #ff0000; /* Overrides the color for monotone icons */
}
SVG icons are accessible and can be made screen-reader friendly by including appropriate attributes. For example:
<svg class="bt1d-icon bt1d-icon--activity" role="img" aria-label="Activity">
<use xlink:href="path/to/dist/svg/icons-sprite.svg#icon-activity"></use>
</svg>
role="img"
: Defines the SVG as an image.aria-label
: Provides a text label for screen readers.The SVG sprite is generated automatically using a custom script and stored in the dist/svg/icons-sprite.svg
file. This process ensures that all icons are optimized and correctly processed based on their design (monotone or duotone).
See the Getting Start page for more information.
If you need to manipulate or style icons further, consider injecting the SVG markup directly into your HTML or using JavaScript for more dynamic control.
If you’re stuck or need assistance, don’t hesitate to reach out to our support team for guidance.