Main Content

Develop uifigure-Based Apps

Develop apps programmatically using UI figures designed for app building (uifigure function)

Design and edit apps programmatically by coding their layout and behavior using MATLAB® functions. The uifigure function creates a figure that is specially configured for app building and serves as the container for your user interface. UI figures support the same types of modern graphics and interactive UI components that App Designer supports.

Functions

expand all

uifigureCreate figure for designing apps
uigridlayoutCreate grid layout manager
uipanelCreate panel container
uitabgroupCreate container for tabbed panels
uitabCreate tabbed panel
uiaxesCreate UI axes for plots in apps
axesCreate Cartesian axes
geoaxesCreate geographic axes
polaraxesCreate polar axes

Common Components

uibuttonCreate push button or state button component
uibuttongroupCreate button group to manage radio buttons and toggle buttons
uicheckboxCreate check box component
uicolorpickerCreate color picker component (Since R2024a)
uidatepickerCreate date picker component
uidropdownCreate drop-down component
uieditfieldCreate text or numeric edit field component
uihyperlinkCreate hyperlink component (Since R2021a)
uiimageCreate image component
uilabelCreate label component
uilistboxCreate list box component
uiradiobuttonCreate radio button component
uisliderCreate slider or range slider component
uispinnerCreate spinner component
uitable Create table user interface component
uitextareaCreate text area component
uitogglebuttonCreate toggle button component
uitreeCreate tree or check box tree component
uitreenodeCreate tree node component

Figure Tools

uicontextmenuCreate context menu component
uimenuCreate menu or menu items
uipushtoolCreate push tool in toolbar
uitoggletoolCreate toggle tool in toolbar
uitoolbarCreate toolbar in figure

Instrumentation Components

uigaugeCreate gauge component
uiknobCreate knob component
uilampCreate lamp component
uiswitchCreate slider switch, rocker switch, or toggle switch component

Extensible Components

uihtmlCreate HTML UI component

Styleable Components

uistyleCreate style for UI component
addStyleAdd style to UI component
removeStyleRemove style from UI component

Tree Node

expandExpand tree node
collapseCollapse tree node
moveMove tree node

Context Menu

openOpen context menu at location within UI figure (Since R2020a)

Scrollable Components

scrollScroll to location within component
isInScrollViewDetermine if component is visible in scrollable container (Since R2022a)

Focusable Components

focusFocus UI component (Since R2022a)

Extensible Components

sendEventToHTMLSourceSend HTML UI component event from MATLAB to JavaScript (Since R2023a)

Layout

uistackReorder visual stacking of UI components
moveguiMove figure to specified location on screen
uialertDisplay alert dialog box
uiconfirmCreate confirmation dialog box
uiprogressdlgCreate progress dialog box
uisetcolorOpen color picker
uigetfileOpen file selection dialog box
uiputfileOpen dialog box for saving files
uigetdirOpen folder selection dialog box
uiopenOpen file selection dialog box and load selected file into workspace
uisaveOpen dialog box for saving variables to MAT-file

Properties

expand all

UI Figure PropertiesControl UI figure appearance and behavior for uifigure-based apps
GridLayoutGrid layout manager UI container
PanelPanel UI container
TabGroup Tab group UI container
Tab Tab UI container
UIAxes PropertiesUI axes appearance and behavior
Axes Properties Axes appearance and behavior
GeographicAxes PropertiesGeographic axes appearance and behavior
PolarAxes PropertiesPolar axes appearance and behavior

Common Components

ButtonButton UI component
ButtonGroupButton group UI container
CheckBoxCheck box UI component
CheckBoxTreeCheck box tree UI component (Since R2021a)
ColorPickerColor picker UI component (Since R2024a)
DatePickerDate picker UI component
DropDownDrop-down UI component
EditFieldEdit field UI component
HyperlinkHyperlink UI component (Since R2021a)
ImageImage UI component
LabelLabel UI component
ListBoxList box UI component
NumericEditFieldNumeric edit field UI component
ProgressDialogProgress dialog box
RadioButtonRadio button UI component
RangeSliderRange slider UI component (Since R2023b)
SliderSlider UI component
SpinnerSpinner UI component
StateButtonState button UI component
TableTable UI component
TextAreaText area UI component
ToggleButtonToggle button UI component
TreeTree UI component
TreeNodeTree node UI component

Figure Tools

ContextMenuContext menu UI component
MenuMenu UI component
PushToolPush tool UI component
ToggleToolToggle tool UI component
ToolbarToolbar UI component

Instrumentation Components

DiscreteKnobDiscrete knob UI component
GaugeGauge UI component
KnobKnob UI component
LampLamp UI component
LinearGaugeLinear gauge UI component
NinetyDegreeGaugeNinety-degree gauge UI component
RockerSwitchRocker switch UI component
SemicircularGaugeSemicircular gauge UI component
SwitchSwitch UI component
ToggleSwitchToggle switch UI component

Extensible Components

HTMLHTML UI component
Style PropertiesStyle for table or tree UI component

Topics

Learn the Basics of Programmatic App Building

Customize App Appearance

Program App Behavior

Related Information