Component

RoleAssembly

Press the three grammatical offices in order. Each accepted role adds its real word to the visible sentence; a wrong office returns the assembly to intake and Disassemble sentence resets it.

Possible use

It could let a reviewer construct a handoff statement through a miniature grammar office, or let a presenter make an agenda line earn its verb before revealing the object. The sentence was already grammatical before the ceremony.

Reasonable alternative

A reasonable local alternative is rendering the authored sentence or validating a real form field once. Grammar should not become a three-button gate unless the application actually teaches grammar.

01 / Preview

Try it yourself.

Preview Interactive
Role assembly0 / 3 roles
Assembled sentence

Choose a grammatical office to begin.

Next office: subject.

Mechanism
1
Start with a sentence that has not yet been admitted.
2
Press Subject, then Action, then Object.
3
Each accepted office adds its real word to the sentence.
4
Try an office out of order, then disassemble and begin again.

02 / Usage

Put it somewhere.

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

export function ApprovedSentence() {
  return (
    <RoleAssembly
      subject="The reviewer"
      action="files"
      object="the handoff"
    />
  );
}

03 / API

Small surface area.

PropTypeDescription
subjectstringThe first word group admitted to the sentence.
actionstringThe second word group admitted to the sentence.
objectstringThe final word group admitted to the sentence.