Badge Button

by Sean Perkins

NativeScript plugin for badges inside of buttons.

NativeScript Badge Button Plugin

npm npm

Creates a native UIButton with a badge component. Currently only supported on iOS.

Getting Started

  • npm install nativescript-badge-button --save
  • Add the BadgeButton element to your Page tag:
  • Use the element on your page:
<BadgeButton:BadgeButton text="Button with Badge" badgeValue="1" badgeOriginX="450" />

Available Properties

Property Type Default
badgeBGColor UIColor redColor
badgeTextColor UIColor whiteColor
badgeFont UIFont systemFontOfSize:12.0
badgePadding number 6
badgeMinSize number 8
badgeOriginX number 0
badgeOriginY number -4
shouldHideBadgeAtZero boolean true
shouldAnimateBadge boolean true