Main Content

Create Custom UI Components

Author your own class of reusable custom UI component objects

Define your own UI component class by creating a subclass of the ComponentContainer base class. If you write scripts or functions for creating specialized UIs and visualizations and share them with others, consider creating a class implementation. Creating a class enables you to provide a convenient interface for your users and allows you to configure the UI component for interactive use in App Designer. You design your own custom set of properties and control which ones your users can access. When they want to customize aspects of your UI component, users can set properties rather than having to modify and rerun your code. Users can modify properties at the command line or inspect them in the Property Inspector.


matlab.ui.componentcontainer.ComponentContainer Base class for developing UI component objects


setupSet up instance of component container subclass
updateUpdate instance of UI component container subclass after setting properties


appdesigner.customcomponent.configureMetadataConfigure custom UI component for use in App Designer
appdesigner.customcomponent.removeMetadataRemove custom UI component from App Designer


Custom UI Component Development Overview

Learn the basic steps for authoring a class of UI component objects.

Configure Custom UI Components for App Designer

Enable interactive use of your custom UI components in App Designer.

Manage Properties of Custom UI Components

Validate property values, optimize how properties update, and customize how properties display for the UI components you author.

Customize Properties of HTML UI Components

Use HTML UI components to author custom UI component classes with more flexibility.

Verwandte Informationen