Skip to main content

Icon

Niom exports lightweight SVG icon components and a generic Icon renderer. Use an icon directly, or pass it to Icon through its icon prop. Icons accept standard SVG props plus size and color.

Icon catalog
Menu
Cross
Cart
Heart
ArrowDown
ArrowUp
ArrowRight
ArrowLeft
Search
Check
Eye
EyeOff
Star
StarFilled
HalfStarFilled
LoginIcon
Profile
dropdownDropDown
PlusIcon
MinusIcon
GoogleLogo
GitHub LogoGitHubLogo
WhatsAppLogo
Facebook LogoFacebookLogo
Instagram LogoInstagramLogo
TikTok LogoTikTokLogo
PayPal LogoPaypalLogo
Mastercard LogoMCBLogo
MasterCard
MailIcon
PhoneIcon
InformationIcon
HomeIcon
BitcoinLogo
TruckIcon
WarningIcon
CardIcon
lock-lineLockIcon
ShieldIcon
ServerIcon
CoffeeIcon
EditIcon
MoneroIcon
PlainBitcoinLogo
DogecoinLogo
LitecoinLogo
SolanaIcon
EthLogo
TrashIcon
CalenderIcon
BagIcon
AttachmentIcon
MaximiseIcon
MinimiseIcon
SettingsIcon
Download
import { Button, Cart, Icon } from "niom-parts";

<Button aria-label="Open cart" variant="ghost">
<Icon icon={Cart} size={20} aria-hidden="true" />
</Button>;

Common use cases​

Decorative icons should be hidden from assistive technology, while icon-only buttons need an accessible label.

Live Editor
function IconUseCases() {
  return (
    <div className="flex flex-wrap items-center gap-3">
      <Button leftIcon={<Search size={18} aria-hidden="true" />}>Search</Button>
      <Button aria-label="Add to favorites" variant="outline">
        <Heart size={19} />
      </Button>
      <span className="inline-flex items-center gap-2 text-accent">
        <Check size={18} aria-hidden="true" />
        Payment confirmed
      </span>
      <ArrowRight size={28} color="var(--color-secondary)" />
    </div>
  );
}
Result
Loading...

Props​

PropTypeDefault
iconComponentType<SVGprops>required by Icon
sizenumber | stringicon-specific
colorstring"currentColor"
SVG attributesSVGProps<SVGSVGElement>-