menu
Dark Mode
backgroundLayer 1
preact-material-components
Components and their props
  • FormField
    • no specific props
Sample code
import {h, Component} from 'preact';
import Radio from 'preact-material-components/Radio';
import FormField from 'preact-material-components/FormField';
import 'preact-material-components/Radio/style.css';
import 'preact-material-components/FormField/style.css';

export default class FormFieldPage extends Component {
  render(){
    return (
      <div>
        <FormField>
          <Radio id="r1" name='opts'></Radio>
          <label for="r1">Radio 1</label>
        </FormField>
      </div>
    );
  }
}
Original documentation
This component encapsulates mdc-form-field, you can refer to its documentation here.
Demo