Nhảy tới nội dung

Radio

Radio Properties​

PropTypeDefaultDescription
defaultCheckedbooleanXác định mặc định radio đã check hay chưa, trường hợp uncontrolled component
labelstringRadio label
namestring | numberRadio input name
valuestring |number | booleanRadio input value
disabledbooleanVô hiệu hóa radio input
readonlybooleanReadonly radio input
labelstringRadio label

Radio Events​

EventPropDescription
changeonChangeEvent sẽ được triggered khi trạng thái của radio input thay đổi

Radios List​

Sử dụng thông qua các components <List/>, <ListItem/>.

<List>
{/* "radio" prop giúp bật list item thành radio */}
<ListItem
radio
value='check\_1'
name='demo-radio'
checked
title='Radio 1'
></ListItem>
<ListItem radio value='check\_2' name='demo-radio' title='Radio 2'></ListItem>
</List>

Ví dụ​

Code demo fallback when rendering server side!