NumPad Button
Example
Section titled “Example”Import
Section titled “Import”import '@sbddesign/bui-ui/numpad-button.js'import { BuiNumpadButtonReact as BuiNumpadButton } from '@sbddesign/bui-ui/react'<bui-numpad-button number="2"></bui-numpad-button><BuiNumpadButton number="2"></BuiNumpadButton>Properties
Section titled “Properties”| Property | Attribute | Type | Required | Reflected | Description |
|---|---|---|---|---|---|
number | number | string | No | No | Number value displayed on the button |
content | content | string | No | No | Content type: “number”, “icon” |
disabled | disabled | boolean | No | Yes | Whether the button is disabled |
ariaLabel | aria-label | string | No | Yes | Accessibility label for screen readers |
Valid Values
Section titled “Valid Values”Content Types
Section titled “Content Types”number- Display a number on the buttonicon- Display an icon on the button
Behavior
Section titled “Behavior”- Number Display: The
numberproperty controls what number is displayed on the button - Content Type: The
contentproperty determines whether to show a number or an icon - Disabled State: When
disabledis true, the button becomes non-interactive - Accessibility: The
ariaLabelproperty provides screen reader support - Click Handling: Each button handles its own click events and emits custom events
Events
Section titled “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