view

Visual part for presenting data, handling user interactions, and building user interfaces

Examples

Basic usage

1<view theme="Info" height="100.0" width="100.0" padding="12.0" margin="6.0 8.0">
2</view>

Add scroll bars to the view

When the size of the components inside the view overflows, you can add scroll bars and use clip_x, clip_y to clip the edges.

1<view theme="Info" height="100.0" width="100.0" clip_x="true" clip_y="true">
2  <scroll_bars as_prop="scroll_bars"></scroll_bars>
3  <view height="200.0" width="20.0"></view>
4</view>

Properties

NameDescriptionType
themeThemeThemes
background_colorBackground colorMakepadColor
hover_colorHover colorMakepadColor
focus_colorFocus colorMakepadColor
border_colorBorder colorMakepadColor
border_widthBorder widthF32
border_radiusBorder radiusF32
visibleVisible or notbool
background_visibleBackground visible or notbool
shadow_colorShadow colorMakepadColor
spread_radiusShadow spread radiusF32
blur_radiusShadow blur radiusF32
shadow_offsetShadow offsetVec2
cursorMouse pointer styleMouseCursor
animation_keyAnimation keybool
grab_key_focusCapture keyboard focusbool
block_signal_eventBlock signal eventbool
abs_posAbsolute positionDVec2
marginMarginMargin
widthWidthSize
heightHeightSize
scrollScroll offsetDVec2
clip_xClip X axis or notbool
clip_yClip Y axis or notbool
paddingPaddingPadding
alignAlignmentAlign
flowFlowFlow
spacingSpacingF64
event_orderEvent orderEventOrder
dpi_factorDPI scaling factorF64
optimizeView optimization optionsViewOptimize
capture_overloadCapture overloadbool
event_keyEvent keybool
block_child_eventsBlock child event deliverybool

Event callback

None