@belleui/belle-radio

radio

Usage no npm install needed!

<script type="module">
  import belleuiBelleRadio from 'https://cdn.skypack.dev/@belleui/belle-radio';
</script>

README

@belleui/belle-radio

Downloads per month NPM Version TypeScript Published on webcomponents.org

Preview

screent shot

Install

npm install @belleui/belle-radio

Useage

<belle-radio-group selected="radio1">
  <belle-radio value="radio1">Radio1</belle-radio>
  <belle-radio value="radio2">Radio2</belle-radio>
  <belle-radio value="radio3">Radio3</belle-radio>
</belle-radio-group>

Demo

Click to view demo

belle-radio-group

Properties

Property Attribute Type Description
selected selected boolean 默认选中的值

Methods

Method Type
handleChecked (event: Event): void
slotChange (): void

Events

Event Type Description
on-change CustomEvent<{ selected: string \| undefined; }> 单选框选中事件

Slots

Name Description
radio item(defualt slot)

belle-radio

Properties

Property Attribute Type Default Description
checked checked boolean false 默认是否选中
disabled disabled boolean false 是否禁用
value value string "" 单选框的值

Methods

Method Type
handleChange (): void

Events

Event Type
change CustomEvent<{ checked: boolean; }>

Slots

Name Description
默认插槽,按钮文字或者其他html标签