@gov.au/control-input
Control inputs include radio buttons and checkboxes. They allow users to select one or more options.
Contents
Install
yarn add @gov.au/control-input
npm install @gov.au/control-input --save-dev
⬆ back to top
Usage
⬆ back to top
React
Usage:
import { AUcheckbox, AUradio } from './control-input.js';
<AUradio label="Yes" name="has_email" value="yes" />
<AUradio label="No" name="has_email" value="no" />
<AUradio label="Maybe" name="has_email" value="maybe" />
<AUcheckbox label="Has email?" name="has_email" />
All props:
<AUradio
label="The label" {}
alt={ false } {}
small={ false } {}
dark={ false } {}
/>
<AUcheckbox
label="The label" {/* The label of the checkbox */}
alt={ false } {/* An alternate variation of the component */}
small={ false } {/* The small variation of the component */}
dark={ false } {/* A dark variation of the component */}
/>
(💡 additional props are spread onto the component)
For more details have a look at the usage example.
⬆ back to top
Dependency graph
control-input
└─ core
⬆ back to top
Tests
The visual test: https://uikit.apps.b.cld.gov.au/packages/control-input/tests/site/
⬆ back to top
Release History
- v1.0.0 - Moved to AU namespace, added new color themes and spacing
- v0.3.0 - Added pancake-react plugin, ES5 main file
- v0.2.0 - Added react component
- v0.1.1 - Fixed webkit render bug
- v0.1.0 - 💥 Initial version
⬆ back to top
License
Copyright (c) Commonwealth of Australia.
Licensed under MIT.
⬆ back to top
};