Package Exports
- @rmwc/formfield
- @rmwc/formfield/README.md
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@rmwc/formfield) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Form Fields
MDC Form Field provides an mdc-formfield helper class for easily making theme-aware, RTL-aware form field + label combos. It also provides an MDCFormField class for easily making input ripples respond to label events.
- Module @rmwc/formfield ;
- Import styles:
- import '@material/form-field/dist/mdc.form-field.css';
- MDC Docs: https://material.io/develop/web/components/input-controls/formfields/
Its not immediately clear when to use this component, but it has been included in RMWC for completeness. It does offer some consistent spacing and is automatically included with Radio's, Switches, and Checkboxes when there is an accompanying label. Please refer to the official MDC docs for use cases.
import { FormField } from '@rmwc/formfield';
<FormField>
<input type="checkbox" id="input"/>
<label htmlFor="input">Input Label</label>
</FormField>
import { Docs } from '@rmwc/base/utils/document-component';
import * as docs from './docgen.json';
<Docs src={docs} components={['FormField']} />