Input
Example
Section titled “Example”Import
Section titled “Import”import '@sbddesign/bui-ui/input.js'import { BuiInputReact as BuiInput } from '@sbddesign/bui-ui/react'<bui-input label="Send Bitcoin To" placeholder="₿stephen@twelve.cash"></bui-input><BuiInput label="Send Bitcoin To" placeholder="₿stephen@twelve.cash"></BuiInput>Properties
Section titled “Properties”| Property | Attribute | Type | Required | Reflected | Description |
|---|---|---|---|---|---|
mood | mood | string | No | Yes | Input mood: “neutral”, “caution”, “danger”, “success” |
size | size | string | No | Yes | Input size: “large”, “small” |
label | label | string | No | Yes | Label text for the input |
value | value | string | No | Yes | Input value |
placeholder | placeholder | string | No | Yes | Placeholder text |
showLabel | show-label | boolean | No | Yes | Whether to show the label |
showIconLeft | show-icon-left | boolean | No | Yes | Whether to show left icon |
showIconRight | show-icon-right | boolean | No | Yes | Whether to show right icon |
iconRightAction | icon-right-action | string | No | No | Action for right icon click |
Valid Values
Section titled “Valid Values”Input Moods
Section titled “Input Moods”neutral- Default neutral appearancecaution- Warning/caution stylingdanger- Error/danger stylingsuccess- Success/positive styling
Input Sizes
Section titled “Input Sizes”large- Large input sizesmall- Small input size
Behavior
Section titled “Behavior”- Mood Styling: The
moodproperty controls the visual state and styling of the input - Icon Support: Both left and right icons can be displayed independently
- Label Display: The label can be shown or hidden with
showLabel - Value Binding: The
valueproperty is two-way bound with the input content - Placeholder Text: Provides helpful hints when the input is empty
- Right Icon Action: The right icon can have a click action defined
Events
Section titled “Events”The input component emits standard input events:
input- When the input value changeschange- When the input value changes and loses focusfocus- When the input gains focusblur- When the input loses focusclick- When the right icon is clicked (ificonRightActionis defined)