# ModularComponent class

Namespace: [Grasshopper2.Components](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.components.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public abstract class ModularComponent : Component
```

A modular component makes it (relatively) easy to hide and reinstate any of the inputs or outputs. This is accomplished by maintaining a separate array of parameters which must have certain values in their CustomValues dictionary.

**Derived types:** [ExportCoordinates](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.standard.exportcoordinates.md), [ImportCoordinates](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.standard.importcoordinates.md), [Read3dmFile](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.standard.read3dmfile.md), [RhinoPipeline](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.standard.rhinopipeline.md)

## Constructors

- [ModularComponent](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.modularcomponent/ctor.md): (2 overloads)

## Fields

- [__Category](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.modularcomponent/category.md): (static) Any string stored under this name in the [IDocumentObject.CustomValues](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.idocumentobject/customvalues.md) will be used to categorise the parameter in the component popup grouping.
- [__Colour](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.modularcomponent/colour.md): (static) Any colour stored under this name in the [IDocumentObject.CustomValues](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.idocumentobject/customvalues.md) will be used inside the pop-over toggles ON states.
- [__HiddenWires](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.modularcomponent/hiddenwires.md): (static) Whilst a parameter is hidden, this key stores a textual record of the wires that were connected to it at the moment it was hidden, so that they can be reinstated when the parameter is shown again. The format is "guid;index|guid;index|..."; each entry is the id of the parameter at the other end of the wire and the index at the data-consuming side of the connection. This value is managed by the modular hide/show logic and is not intended to be set by component authors.
- [__HideByDefault](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.modularcomponent/hidebydefault.md): (static) If a TRUE value is stored under this value, this parameter will be hidden when the component is created form scratch.
- [__Icon](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.modularcomponent/icon.md): (static) Any string stored under this name in the [IDocumentObject.CustomValues](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.idocumentobject/customvalues.md) will be used to instantiate an icon for the toggle-buttons on the component pop-over. Ideal size for these icons is 20x20 pixels.
- [__Optional](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.modularcomponent/optional.md): (static) Any boolean stored under this name in the [IDocumentObject.CustomValues](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.idocumentobject/customvalues.md) will be used to indicate whether the parameter can be hidden. If the value is FALSE or MISSING, the parameter cannot be hidden.

## Properties

- [ModularInputs](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.modularcomponent/modularinputs.md): Gets the visible/hidden status for optional inputs. Note that this property will yield null until after the constructor completes.
- [ModularOutputs](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.modularcomponent/modularoutputs.md): Gets the visible/hidden status for optional outputs. Note that this property will yield null until after the constructor completes.

## Methods

- [AddInputs](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.modularcomponent/addinputs.md): (2 overloads)
- [AddOutputs](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.modularcomponent/addoutputs.md): (2 overloads)
- [AppendToInputPanel](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.modularcomponent/appendtoinputpanel.md)
- [CanCreateParameter](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.modularcomponent/cancreateparameter.md)
- [CanRemoveParameter](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.modularcomponent/canremoveparameter.md)
- [CreateAttributes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.modularcomponent/createattributes.md)
- [DoCreateParameter](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.modularcomponent/docreateparameter.md)
- [DoRemoveParameter](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.modularcomponent/doremoveparameter.md)
- [Store](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.modularcomponent/store.md)

## Inherited Members

- From [Component](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component.md): [BakeCapable](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/bakecapable.md), [ChildrenObjects](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/childrenobjects.md), [Connectivity](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/connectivity.md), [ConnectivityComplete](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/connectivitycomplete.md), [DisplayCapable](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/displaycapable.md), [DisplayParameters](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/displayparameters.md), [IconMode](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/iconmode.md), [Label](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/label.md), [Parameters](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/parameters.md), [Pins](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/pins.md), [SupportsVariableParameters](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/supportsvariableparameters.md), [Threading](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/threading.md), [AppendMetaMixingInput](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/appendmetamixinginput.md), [AppendPinToggles](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/appendpintoggles.md), [BakeShapes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/bakeshapes.md), [BeforeProcess](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/beforeprocess.md), [ComputeInternal](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/computeinternal.md), [DisplayBounds](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/displaybounds.md), [DisplayFaces](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/displayfaces.md), [DisplayWires](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/displaywires.md), [ExpireAllRecipients](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/expireallrecipients.md), [PostProcess](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/postprocess.md), [PostProcessTree](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/postprocesstree.md), [PreProcess](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/preprocess.md), [Process](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/process.md), [ResolveIconMode](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/resolveiconmode.md), [VariableParameterMaintenance](https://developer.rhino3d.com/api/gh2/type/grasshopper2.components.component/variableparametermaintenance.md)
- From [ActiveObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.activeobject.md): [DisplayCache](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.activeobject/displaycache.md), [State](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.activeobject/state.md), [Compute](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.activeobject/compute.md), [Expire](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.activeobject/expire.md), [PopulateDisplay](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.activeobject/populatedisplay.md), [UpdateDisplay](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.activeobject/updatedisplay.md)
- From [DocumentObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject.md): [Activity](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/activity.md), [Attributes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/attributes.md), [CustomValues](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/customvalues.md), [Display](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/display.md), [DisplayName](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/displayname.md), [DisplayStyle](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/displaystyle.md), [Document](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/document.md), [EntireFamily](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/entirefamily.md), [FoundingObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/foundingobject.md), [Icon](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/icon.md), [IconInternal](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/iconinternal.md), [InstanceId](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/instanceid.md), [Nomen](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/nomen.md), [Obsolete](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/obsolete.md), [ParentObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/parentobject.md), [Phase](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/phase.md), [ProgressPercentage](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/progresspercentage.md), [Relevance](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/relevance.md), [Selected](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/selected.md), [Selection](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/selection.md), [SiblingObjects](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/siblingobjects.md), [UserName](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/username.md), [ActivityChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/activitychanged.md), [AutosaveRequested](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/autosaverequested.md), [DisplayChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/displaychanged.md), [DocumentChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/documentchanged.md), [Expired](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/expired.md), [InstanceIdChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/instanceidchanged.md), [LayoutChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/layoutchanged.md), [NameChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/namechanged.md), [RelevanceChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/relevancechanged.md), [SelectedChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/selectedchanged.md), [AddUndoRecord](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/addundorecord.md), [AppendBakeInput](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/appendbakeinput.md), [AppendStateInput](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/appendstateinput.md), [AppendUserNameInput](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/appendusernameinput.md), [ChangeInstanceIds](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/changeinstanceids.md), [ExpireDisplay](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/expiredisplay.md), [GetCreationInfo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/getcreationinfo.md), [GetModificationInfo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/getmodificationinfo.md), [InvalidateExistingLayout](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/invalidateexistinglayout.md), [ModifyIcon](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/modifyicon.md), [ModifyNameAndInfo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/modifynameandinfo.md), [OnDisplayChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/ondisplaychanged.md), [OnExpired](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/onexpired.md), [OnLayoutChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/onlayoutchanged.md), [OverrideAttributes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/overrideattributes.md), [RequestAutoSave](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/requestautosave.md), [SetCreationInfo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/setcreationinfo.md), [SetModificationInfo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/setmodificationinfo.md), [SetProgressPercentage](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/setprogresspercentage.md)
