Skip to main content

Radio

img

Usage​

import React from 'react'
import { Radio } from 'qdm-component-library'

function App() {
const [RadioboxOpen, setRadioOpen] = useState('primary')

const HandleRadioboxOpen = (e, val) => {
const values = val === RadioboxOpen ? null : val
setRadioOpen(values)
}

return (
<Radio
checked={RadioboxOpen === 'primary' ? true : false}
color="primary"
label="color='primary'"
onClick={(e) => HandleRadioboxOpen(e, 'primary')}
/>
)
}
export default App

Reference​

Props​

className​

props for providing classname to Radio component string

id​

props for providing id to Radio component string

name​

props for providing name to Radio component string

checked​

props for value to Radio Component,if its true it is checked boolean

disabled​

if its true you cant change Radio Component value boolean

onClick​

props for changing value of the Radio Component function

defaultChecked​

props for providing default value for Radio Component boolean

indeterminate​

props for changing tick icon to minus icon Radio Component boolean

color​

props for providing color to Radio Component "default" | "primary" | "secondary"

size​

props for providing size to Radio Component "medium" | "small"

inLineStyles​

props give addition props to the Radio Component type Object

children​

props for providing label to Radio Component any

label​

props for providing label to Radio Component string