Skip to main content

<html.optgroup>

The <html.optgroup> component lets you create a grouping of options.

Overview

To display an option group, render the <html.optgroup> component within <html.select>.

import { html } from 'react-strict-dom';

const Foo = () => (
<html.select>
<html.optgroup label="Colors">
<html.option>Red</html.option>
</html.optgroup>
</html.select>
);

Props