Icons
Republic’s icons are a small set drawn from coolicons (MIT licence). Use this page to find an icon and to add it to React or plain HTML. New icons are added on request, not by default.
Icons draw with currentColor, so they take the colour of the text around them. They come in 16, 20 and 24 pixels. Use 20 next to body text and 16 next to small text.
When an icon needs a label
Section titled “When an icon needs a label”- Next to a word, an icon is decoration. Leave out the label, and the icon is hidden from screen readers.
- On its own, such as an icon-only button, the icon is the only name. Give it a label, or give the button an
aria-label.
Never let an icon carry meaning alone. Status needs a word too. See Accessibility.
Each icon is a component named after the icon, in PascalCase with Icon at the end: search is SearchIcon.
import { SearchIcon, WarningIcon } from "@globalicons/republic-icons";
<SearchIcon /><WarningIcon size={16} label="Warning" />Props: size (16, 20 or 24; default 20), label (the accessible name; without it the icon is hidden) and className.
Plain HTML
Section titled “Plain HTML”Serve @globalicons/republic-icons/sprite.svg with your site and point to an icon by its id, rp-icon- followed by the name.
<svg width="20" height="20" aria-hidden="true"> <use href="/assets/sprite.svg#rp-icon-search"></use></svg>
<svg width="20" height="20" role="img" aria-label="Warning"> <use href="/assets/sprite.svg#rp-icon-warning"></use></svg>All icons
Section titled “All icons”Each tile shows the icon name, used for the sprite id, and the React component name.
activityActivityIconarrow-downArrowDownIconarrow-rightArrowRightIconarrow-upArrowUpIconbellBellIconbuilding-2Building2IconcalendarCalendarIconchart-bar-verticalChartBarVerticalIconcheckCheckIconchevron-downChevronDownIconchevron-rightChevronRightIconclockClockIconclock-1Clock1IconcopyCopyIcondashboardDashboardIcondownloadDownloadIconexternal-linkExternalLinkIconfileFileIconfilterFilterIconglobeGlobeIconhelpHelpIconinboxInboxIconkeyKeyIconlayout-bentoLayoutBentoIconlockLockIconlog-outLogOutIconmailMailIconmailboxMailboxIconmoonMoonIconmore-gridMoreGridIconplusPlusIconreloadReloadIconsearchSearchIconsettingsSettingsIconshieldShieldIconshield-offShieldOffIconsort-descendingSortDescendingIconsparklesSparklesIconsunSunIconuserUserIconusersUsersIconusers-groupUsersGroupIconvideoVideoIconwarningWarningIcon