Skip to content

NumPad Button

import '@sbddesign/bui-ui/numpad-button.js'
<bui-numpad-button number="2"></bui-numpad-button>
PropertyAttributeTypeRequiredReflectedDescription
numbernumberstringNoNoNumber value displayed on the button
contentcontentstringNoNoContent type: “number”, “icon”
disableddisabledbooleanNoYesWhether the button is disabled
ariaLabelaria-labelstringNoYesAccessibility label for screen readers
  • number - Display a number on the button
  • icon - Display an icon on the button
  • Number Display: The number property controls what number is displayed on the button
  • Content Type: The content property determines whether to show a number or an icon
  • Disabled State: When disabled is true, the button becomes non-interactive
  • Accessibility: The ariaLabel property provides screen reader support
  • Click Handling: Each button handles its own click events and emits custom events

The numpad button component emits a click event with the following detail structure:

interface NumPadClickDetail {
number: string;
content: 'number' | 'icon';
}
  • Click Event: Emitted when the button is clicked (unless disabled)
  • Event Detail: Contains the number value and content type
  • Disabled State: No events are emitted when disabled