Fieldset

Groups and labels related form fields.

It implements the <fieldset> element.

Styles

Import the styles within a Next.js custom app in pages/_app.js.
import "device-agnostic-ui/Fieldset.css";

Props

Examples

How to import.
import Fieldset from "device-agnostic-ui/Fieldset.mjs";
Grouped checkboxes.
import Fieldset from "device-agnostic-ui/Fieldset.mjs";
import Textbox from "device-agnostic-ui/Textbox.mjs";

const result = (
  <Fieldset legend="Options">
    <Toggle
      inputProps={{
        type: "radio",
        name: "options",
        value: "a",
        defaultChecked: true,
      }}
    >
      Label A
    </Toggle>
    <Toggle
      inputProps={{
        type: "radio",
        name: "options",
        value: "b",
      }}
    >
      Label B
    </Toggle>
  </Fieldset>
);
Options

Tags