Component

ParityPurge

It presents ordinary children as numbered positions and asks you to choose whether odd or even positions deserve to remain. The other children move into a real discard tray, so a tiny parity rule becomes a permanent filing decision until everything is restored.

Possible use

It could be used to let a reviewer decide whether odd- or even-numbered fields deserve to stay on a handoff card, or to make a presenter discard every other agenda label before discussing the survivors.

Reasonable alternative

A reasonable local alternative is an array filter with one normal layout. Publishing a parity purge is difficult to defend because the position of a field is not evidence that it should survive.

01 / Preview

Try it yourself.

Preview Interactive
Parity purge4 positions waiting
Unfiled positions
1Title
2Status
3Owner
4Date

Choose odd or even. The other positions move into a real discard tray.

Mechanism
1
Start with four ordinary fields carrying positions one through four.
2
Choose whether odd or even positions deserve to remain.
3
The surviving fields stay visible while the others move into a separate purged tray.
4
Restore all to erase the decree and return every field to the waiting lane.

02 / Usage

Put it somewhere.

example.tsxTSX
import { ParityPurge } from "gra-ui";
import "gra-ui/styles.css";

export function ParityFiledFields() {
  return (
    <ParityPurge>
      <span>Title</span>
      <span>Status</span>
      <span>Owner</span>
      <span>Date</span>
    </ParityPurge>
  );
}

03 / API

Small surface area.

PropTypeDescription
childrenReactNodeThe content assigned one-based positions and split by the chosen odd-or-even rule.