Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@volvo-cars/react-forms
Advanced tools
Questions? Ask in Slack #vcc-ui
Applies class names from @volvo-cars/css
.
Checkboxes allow the user to toggle an option on or off.
The Checkbox component renders an <input type="checkbox">
with a <label>
and an optional hint.
Unlike the VCC UI Checkbox, it can be used both as a controlled or uncontrolled component.
<Checkbox name="check" id="check-1" label="Checkbox" defaultChecked />
() => {
const [checked, setChecked] = React.useState(true);
return (
<Checkbox
name="check"
id="check-2"
label="Checkbox"
checked={checked}
onChange={(e) => setChecked(e.target.checked)}
/>
);
};
<Checkbox
name="check"
id="check-2"
label="Checkbox"
hint="Please check"
aria-invalid
required
/>
Radios allow the user to select a single option from a group. Radios are designed to be used with the RadioGroup component.
The Radio component renders an <input type="radio">
with a <label>
and an optional hint.
Unlike the VCC UI Radio, it can be used both as a controlled or uncontrolled component.
<Radio name="radio" id="radio-1" label="Radio" defaultChecked />
Radio groups are used to group multiple radios in a single form control.
The Radio component renders a <fieldset>
with a <legend>
, an optional hint and the child radio inputs.
It can also set the disabled
, required
and name
props for it's child radio inputs.
<RadioGroup
legend="Choose your terms"
name="terms"
onChange={(event) => console.log(event.target.value)}
hint="Select your terms"
required
>
<Radio id="terms-6000" value="6000" label="6000 km/yr" />
<Radio id="terms-8000" value="8000" label="8000 km/yr" />
</RadioGroup>
FAQs
React form components
The npm package @volvo-cars/react-forms receives a total of 2,710 weekly downloads. As such, @volvo-cars/react-forms popularity was classified as popular.
We found that @volvo-cars/react-forms demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.