Skip to content
Source
Sign inSign up
TanStack/form
Open History to see the last commit

react_form_composability.svg

3 lines18.3 KB

1<?xml version="1.0" encoding="UTF-8"?>
2<?xml-stylesheet href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" type="text/css"?>
3<svg aria-roledescription="flowchart-v2" role="graphics-document document" viewBox="0 0 1206 774" style="max-width: 100%;" class="flowchart" xmlns="http://www.w3.org/2000/svg" width="100%" id="graph-39710" height="100%" xmlns:xlink="http://www.w3.org/1999/xlink"><style>#graph-39710{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#000000;}#graph-39710 .error-icon{fill:#552222;}#graph-39710 .error-text{fill:#552222;stroke:#552222;}#graph-39710 .edge-thickness-normal{stroke-width:1px;}#graph-39710 .edge-thickness-thick{stroke-width:3.5px;}#graph-39710 .edge-pattern-solid{stroke-dasharray:0;}#graph-39710 .edge-thickness-invisible{stroke-width:0;fill:none;}#graph-39710 .edge-pattern-dashed{stroke-dasharray:3;}#graph-39710 .edge-pattern-dotted{stroke-dasharray:2;}#graph-39710 .marker{fill:#666;stroke:#666;}#graph-39710 .marker.cross{stroke:#666;}#graph-39710 svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#graph-39710 p{margin:0;}#graph-39710 .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#000000;}#graph-39710 .cluster-label text{fill:#333;}#graph-39710 .cluster-label span{color:#333;}#graph-39710 .cluster-label span p{background-color:transparent;}#graph-39710 .label text,#graph-39710 span{fill:#000000;color:#000000;}#graph-39710 .node rect,#graph-39710 .node circle,#graph-39710 .node ellipse,#graph-39710 .node polygon,#graph-39710 .node path{fill:#eee;stroke:#999;stroke-width:1px;}#graph-39710 .rough-node .label text,#graph-39710 .node .label text,#graph-39710 .image-shape .label,#graph-39710 .icon-shape .label{text-anchor:middle;}#graph-39710 .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#graph-39710 .rough-node .label,#graph-39710 .node .label,#graph-39710 .image-shape .label,#graph-39710 .icon-shape .label{text-align:center;}#graph-39710 .node.clickable{cursor:pointer;}#graph-39710 .root .anchor path{fill:#666!important;stroke-width:0;stroke:#666;}#graph-39710 .arrowheadPath{fill:#333333;}#graph-39710 .edgePath .path{stroke:#666;stroke-width:2.0px;}#graph-39710 .flowchart-link{stroke:#666;fill:none;}#graph-39710 .edgeLabel{background-color:white;text-align:center;}#graph-39710 .edgeLabel p{background-color:white;}#graph-39710 .edgeLabel rect{opacity:0.5;background-color:white;fill:white;}#graph-39710 .labelBkg{background-color:rgba(255, 255, 255, 0.5);}#graph-39710 .cluster rect{fill:hsl(0, 0%, 98.9215686275%);stroke:#707070;stroke-width:1px;}#graph-39710 .cluster text{fill:#333;}#graph-39710 .cluster span{color:#333;}#graph-39710 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(-160, 0%, 93.3333333333%);border:1px solid #707070;border-radius:2px;pointer-events:none;z-index:100;}#graph-39710 .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#000000;}#graph-39710 rect.text{fill:none;stroke-width:0;}#graph-39710 .icon-shape,#graph-39710 .image-shape{background-color:white;text-align:center;}#graph-39710 .icon-shape p,#graph-39710 .image-shape p{background-color:white;padding:2px;}#graph-39710 .icon-shape rect,#graph-39710 .image-shape rect{opacity:0.5;background-color:white;fill:white;}#graph-39710 :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}</style><g><marker orient="auto" markerHeight="8" markerWidth="8" markerUnits="userSpaceOnUse" refY="5" refX="5" viewBox="0 0 10 10" class="marker flowchart-v2" id="graph-39710_flowchart-v2-pointEnd"><path style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 0 0 L 10 5 L 0 10 z"></path></marker><marker orient="auto" markerHeight="8" markerWidth="8" markerUnits="userSpaceOnUse" refY="5" refX="4.5" viewBox="0 0 10 10" class="marker flowchart-v2" id="graph-39710_flowchart-v2-pointStart"><path style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 0 5 L 10 10 L 10 0 z"></path></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5" refX="11" viewBox="0 0 10 10" class="marker flowchart-v2" id="graph-39710_flowchart-v2-circleEnd"><circle style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" r="5" cy="5" cx="5"></circle></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5" refX="-1" viewBox="0 0 10 10" class="marker flowchart-v2" id="graph-39710_flowchart-v2-circleStart"><circle style="stroke-width: 1; stroke-dasharray: 1, 0;" class="arrowMarkerPath" r="5" cy="5" cx="5"></circle></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5.2" refX="12" viewBox="0 0 11 11" class="marker cross flowchart-v2" id="graph-39710_flowchart-v2-crossEnd"><path style="stroke-width: 2; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 1,1 l 9,9 M 10,1 l -9,9"></path></marker><marker orient="auto" markerHeight="11" markerWidth="11" markerUnits="userSpaceOnUse" refY="5.2" refX="-1" viewBox="0 0 11 11" class="marker cross flowchart-v2" id="graph-39710_flowchart-v2-crossStart"><path style="stroke-width: 2; stroke-dasharray: 1, 0;" class="arrowMarkerPath" d="M 1,1 l 9,9 M 10,1 l -9,9"></path></marker><g class="root"><g class="clusters"></g><g class="edgePaths"><path marker-end="url(#graph-39710_flowchart-v2-pointEnd)" style="" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" id="L_S1_S2_0" d="M238.765,86L227.545,92.167C216.325,98.333,193.885,110.667,182.665,124.333C171.445,138,171.445,153,171.445,160.5L171.445,168"></path><path marker-end="url(#graph-39710_flowchart-v2-pointEnd)" style="" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" id="L_S1_S3_1" d="M380.681,86L391.901,92.167C403.121,98.333,425.56,110.667,436.78,122.333C448,134,448,145,448,150.5L448,156"></path><path marker-end="url(#graph-39710_flowchart-v2-pointEnd)" style="" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" id="L_S3_S4_2" d="M368.461,238L355.884,244.167C343.307,250.333,318.154,262.667,305.577,274.333C293,286,293,297,293,302.5L293,308"></path><path marker-end="url(#graph-39710_flowchart-v2-pointEnd)" style="" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" id="L_S3_S5_3" d="M527.539,238L540.116,244.167C552.693,250.333,577.846,262.667,590.423,274.333C603,286,603,297,603,302.5L603,308"></path><path marker-end="url(#graph-39710_flowchart-v2-pointEnd)" style="" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" id="L_S5_S6_4" d="M473,382.871L443,390.226C413,397.581,353,412.29,323,427.145C293,442,293,457,293,464.5L293,472"></path><path marker-end="url(#graph-39710_flowchart-v2-pointEnd)" style="" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" id="L_S5_S7_5" d="M733,382.871L763,390.226C793,397.581,853,412.29,883,425.145C913,438,913,449,913,454.5L913,460"></path><path marker-end="url(#graph-39710_flowchart-v2-pointEnd)" style="" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" id="L_S6_S8_6" d="M224.307,554L209.922,562.167C195.538,570.333,166.769,586.667,152.384,600.333C138,614,138,625,138,630.5L138,636"></path><path marker-end="url(#graph-39710_flowchart-v2-pointEnd)" style="" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" id="L_S6_S9_7" d="M361.693,554L376.078,562.167C390.462,570.333,419.231,586.667,433.616,602.333C448,618,448,633,448,640.5L448,648"></path><path marker-end="url(#graph-39710_flowchart-v2-pointEnd)" style="" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" id="L_S7_S10_8" d="M823.17,566L812.309,572.167C801.447,578.333,779.723,590.667,768.862,606.333C758,622,758,641,758,650.5L758,660"></path><path marker-end="url(#graph-39710_flowchart-v2-pointEnd)" style="" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" id="L_S7_S11_9" d="M1002.83,566L1013.691,572.167C1024.553,578.333,1046.277,590.667,1057.138,606.333C1068,622,1068,641,1068,650.5L1068,660"></path></g><g class="edgeLabels"><g transform="translate(171.4453125, 123)" class="edgeLabel"><g transform="translate(-11.328125, -12)" class="label"><foreignObject height="24" width="22.65625"><div style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;" class="labelBkg" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"><p>Yes</p></span></div></foreignObject></g></g><g transform="translate(448, 123)" class="edgeLabel"><g transform="translate(-9.3984375, -12)" class="label"><foreignObject height="24" width="18.796875"><div style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;" class="labelBkg" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"><p>No</p></span></div></foreignObject></g></g><g transform="translate(293, 275)" class="edgeLabel"><g transform="translate(-11.328125, -12)" class="label"><foreignObject height="24" width="22.65625"><div style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;" class="labelBkg" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"><p>Yes</p></span></div></foreignObject></g></g><g transform="translate(603, 275)" class="edgeLabel"><g transform="translate(-9.3984375, -12)" class="label"><foreignObject height="24" width="18.796875"><div style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;" class="labelBkg" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"><p>No</p></span></div></foreignObject></g></g><g transform="translate(293, 427)" class="edgeLabel"><g transform="translate(-11.328125, -12)" class="label"><foreignObject height="24" width="22.65625"><div style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;" class="labelBkg" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"><p>Yes</p></span></div></foreignObject></g></g><g transform="translate(913, 427)" class="edgeLabel"><g transform="translate(-9.3984375, -12)" class="label"><foreignObject height="24" width="18.796875"><div style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;" class="labelBkg" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"><p>No</p></span></div></foreignObject></g></g><g transform="translate(138, 603)" class="edgeLabel"><g transform="translate(-11.328125, -12)" class="label"><foreignObject height="24" width="22.65625"><div style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;" class="labelBkg" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"><p>Yes</p></span></div></foreignObject></g></g><g transform="translate(448, 603)" class="edgeLabel"><g transform="translate(-9.3984375, -12)" class="label"><foreignObject height="24" width="18.796875"><div style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;" class="labelBkg" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"><p>No</p></span></div></foreignObject></g></g><g transform="translate(758, 603)" class="edgeLabel"><g transform="translate(-11.328125, -12)" class="label"><foreignObject height="24" width="22.65625"><div style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;" class="labelBkg" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"><p>Yes</p></span></div></foreignObject></g></g><g transform="translate(1068, 603)" class="edgeLabel"><g transform="translate(-9.3984375, -12)" class="label"><foreignObject height="24" width="18.796875"><div style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;" class="labelBkg" xmlns="http://www.w3.org/1999/xhtml"><span class="edgeLabel"><p>No</p></span></div></foreignObject></g></g></g><g class="nodes"><g transform="translate(309.72265625, 47)" id="flowchart-S1-44588" class="node default"><rect height="78" width="260" y="-39" x="-130" style="" class="basic label-container"></rect><g transform="translate(-100, -24)" style="" class="label"><rect></rect><foreignObject height="48" width="200"><div style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 200px; text-align: center; width: 200px;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel"><p>Do you need to reuse state (like defaultValues)?</p></span></div></foreignObject></g></g><g transform="translate(171.4453125, 199)" id="flowchart-S2-44589" class="node default"><rect height="54" width="193.109375" y="-27" x="-96.5546875" style="" class="basic label-container"></rect><g transform="translate(-66.5546875, -12)" style="" class="label"><rect></rect><foreignObject height="24" width="133.109375"><div style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel"><p>Use 'formOptions()</p></span></div></foreignObject></g></g><g transform="translate(448, 199)" id="flowchart-S3-44591" class="node default"><rect height="78" width="260" y="-39" x="-130" style="" class="basic label-container"></rect><g transform="translate(-100, -24)" style="" class="label"><rect></rect><foreignObject height="48" width="200"><div style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 200px; text-align: center; width: 200px;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel"><p>Do you need to custom validation functions?</p></span></div></foreignObject></g></g><g transform="translate(293, 351)" id="flowchart-S4-44593" class="node default"><rect height="78" width="260" y="-39" x="-130" style="" class="basic label-container"></rect><g transform="translate(-100, -24)" style="" class="label"><rect></rect><foreignObject height="48" width="200"><div style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 200px; text-align: center; width: 200px;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel"><p>Wrap 'useForm' hook into custom app hook</p></span></div></foreignObject></g></g><g transform="translate(603, 351)" id="flowchart-S5-44595" class="node default"><rect height="78" width="260" y="-39" x="-130" style="" class="basic label-container"></rect><g transform="translate(-100, -24)" style="" class="label"><rect></rect><foreignObject height="48" width="200"><div style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 200px; text-align: center; width: 200px;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel"><p>Do you need to reuse custom UI components?</p></span></div></foreignObject></g></g><g transform="translate(293, 515)" id="flowchart-S6-44597" class="node default"><rect height="78" width="260" y="-39" x="-130" style="" class="basic label-container"></rect><g transform="translate(-100, -24)" style="" class="label"><rect></rect><foreignObject height="48" width="200"><div style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 200px; text-align: center; width: 200px;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel"><p>Do you need access to the 'field'?</p></span></div></foreignObject></g></g><g transform="translate(913, 515)" id="flowchart-S7-44599" class="node default"><rect height="102" width="260" y="-51" x="-130" style="" class="basic label-container"></rect><g transform="translate(-100, -36)" style="" class="label"><rect></rect><foreignObject height="72" width="200"><div style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 200px; text-align: center; width: 200px;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel"><p>Do you need to reuse whole subsections of your form?</p></span></div></foreignObject></g></g><g transform="translate(138, 703)" id="flowchart-S8-44601" class="node default"><rect height="126" width="260" y="-63" x="-130" style="" class="basic label-container"></rect><g transform="translate(-100, -48)" style="" class="label"><rect></rect><foreignObject height="96" width="200"><div style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 200px; text-align: center; width: 200px;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel"><p>Use 'createFormHooks''s 'fieldComponents' (EG: 'TextInput' and 'NumberInput')</p></span></div></foreignObject></g></g><g transform="translate(448, 703)" id="flowchart-S9-44603" class="node default"><rect height="102" width="260" y="-51" x="-130" style="" class="basic label-container"></rect><g transform="translate(-100, -36)" style="" class="label"><rect></rect><foreignObject height="72" width="200"><div style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 200px; text-align: center; width: 200px;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel"><p>Use 'createFormsHook''s 'formComponents' (EG: 'SubmitButton')</p></span></div></foreignObject></g></g><g transform="translate(758, 703)" id="flowchart-S10-44605" class="node default"><rect height="78" width="260" y="-39" x="-130" style="" class="basic label-container"></rect><g transform="translate(-100, -24)" style="" class="label"><rect></rect><foreignObject height="48" width="200"><div style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 200px; text-align: center; width: 200px;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel"><p>Use 'withForm' from 'createFormHook'</p></span></div></foreignObject></g></g><g transform="translate(1068, 703)" id="flowchart-S11-44607" class="node default"><rect height="78" width="260" y="-39" x="-130" style="" class="basic label-container"></rect><g transform="translate(-100, -24)" style="" class="label"><rect></rect><foreignObject height="48" width="200"><div style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 200px; text-align: center; width: 200px;" xmlns="http://www.w3.org/1999/xhtml"><span class="nodeLabel"><p>Use 'form.Subscribe' and 'form.Field'</p></span></div></foreignObject></g></g></g></g></g></svg>