Create Custom UI Components - MATLAB & Simulink (original) (raw)

Create your own reusable custom UI components for use in apps

Create your own custom UI components to use in your apps or to share with others. You can use custom components to extend existing UI component functionality, to break up large apps into independent and maintainable pieces, and to design an interface for users to customize and reuse a component across multiple apps. Create custom components interactively in App Designer or programmatically by creating a subclass of the ComponentContainer base class. In both cases, you can configure your components to be used interactively in App Designer apps.

Classes

matlab.ui.componentcontainer.ComponentContainer Base class for developing custom UI component objects (Since R2020b)

Methods

setup Set up instance of component container subclass
update Update instance of UI component container subclass after setting properties
getTheme Get figure theme of component container subclass

Functions

appdesigner.customcomponent.configureMetadata Configure custom UI component for use in App Designer (Since R2021a)
appdesigner.customcomponent.removeMetadata Remove custom UI component from App Designer (Since R2021a)

Topics

Create Components in App Designer

Create Components Programmatically

Use and Share Components

Create Custom UI Component with a Chart in App Designer

Create Custom UI Component with a Chart in App Designer

Create a custom UI component that allows app creators to plot data in an interactive chart.

Create Custom Button with Hover Effect Using HTML

Create Custom Button with Hover Effect Using HTML

Create a custom button component that changes appearance when a user hovers over it in an app.

Modularize Your App by Creating a Custom UI Component

Modularize Your App by Creating a Custom UI Component

Modularize an App Designer app by separating out a portion of the layout as a custom UI component.