AntdSegmented is an input that allows for selection of one value from a list of possible enum, or association values with highlighting and animations.
- Supports enum attribute.
- Supports association.
- Supports block display.
- Supports all or some disabled options.
- Supports custom content.
- Supports on change actions.
- Supports 3 size options.
- Download the mpk file from here.
- Copy the mpk file to your Mendix Project directory
{YourMendixProjectFolder}/widgets/. - Open your Mendix Project with Mendix Studio Pro and click on the menu
Menu > App > Synchronize App Directory.
- Select Type "Enumeration".
- Select Enumeration attribute.
- Select Type "List".
- Select Datasource of available options.
- Select Display Options
- Select association between available options and context
- Optionally enter disabled expression (if this expression resolves to true, the option will be disabled)
- You can access the online demo from here to show the features of this widget.
- You can also download the demo project from here to run it on your own PC.
Submit here.
See Usage Section
| Property | Description | Supported | Remarks |
|---|---|---|---|
| block | Option to fit width to its parent's width | Y | |
| defaultValue | Default selected value | N | Implicit by Mendix attribute value |
| disabled | Disable all segments | Y | Only supported for Type: List |
| onChange | The callback function that is triggered when the state changes | Y | |
| options | Set children optional | Y | Supports list of mendix objects or enumeration values |
| size | The size of the Segmented. | Y | Updated naming of middle to medium |
| value | Currently selected value | Y | Mendix attribute value |
- Install NPM package dependencies by using:
npm install. If you use NPM v7.x.x, which can be checked by executingnpm -v, execute:npm install --legacy-peer-deps. - Run
npm startto watch for code changes. On every change:- the widget will be bundled;
- the bundle will be included in a
distfolder in the root directory of the project; - the bundle will be included in the
deploymentandwidgetsfolder of the Mendix test project.



