Common Props
This page contains a detailed API reference for the Litho's component common props. It assumes you’re familiar with fundamental Litho concepts, such as LayoutSpecs, Props, and State. If you’re not, read them first.
Props
AccessibilityRoleAccessibilityRoleDescriptionAlignSelfAlphaAspectRatioBackgroundBorderClickHandlerClickableClipChildrenClipToOutlineContentDescriptionDispatchPopulateAccessibilityEventHandlerDuplicateParentStateEnabledStateFlexFlexBasisPercentFlexBasisPxFlexGrowFlexShrinkFocusChangeHandlerFocusStateFocusedHandlerForegroundFullImpressionHandlerHeightPercentHeightPxImportantForAccessibilityInterceptTouchHandlerInvisibleHandlerIsReferenceBaselineLayoutDirectionLongClickHandlerMarginAutosMarginPercentsMarginsMaxHeightPercentMaxHeightPxMaxWidthPercentMaxWidthPxMinHeightPercentMinHeightPxMinWidthPercentMinWidthPxOnInitializeAccessibilityEventHandlerOnInitializeAccessibilityNodeInfoHandlerOnPopulateAccessibilityEventHandlerOnRequestSendAccessibilityEventHandlerOutlineProviderPaddingPercentsPaddingsPerformAccessibilityActionHandlerPositionPercentsPositionTypePositionsRotationRotationXRotationYScaleSelectedStateSendAccessibilityEventHandlerSendAccessibilityEventUncheckedHandlerShadowElevationStateListAnimatorStateListAnimatorResTouchExpansionsTouchHandlerTransitionKeyTransitionKeyTypeUnfocusedHandlerUseHeightAsBaselineViewTagViewTagsVisibilityChangedHandlerVisibleHandlerVisibleHeightRatioVisibleWidthRatioWidthPercentWidthPx
Reference
AccessibilityRole
{...}
AccessibilityRoleDescription
{...}
AlignSelf
{...}
Alpha
{...}
AspectRatio
{...}
Background
Sets the background of the component; pass a ComparableDrawable to make subsequent mounting more efficient.
Use the utility methods to set a background color or use an android resource id.
Component#backgroundAttr(@AttrRes int)Component#backgroundColor(@ColorInt int)Component#backgroundRes(@DrawableRes int)Component#background(Drawable)(deprecated)
Border
Sets a border on the component.
ClickHandler
Sets a click handler on the component.
See: Event Handling docs for more info.
Clickable
Defines whether this component reacts to click events. The default value is inherited from its Android View.
ClipChildren
Defines whether a children of given component are limited to draw inside of its bounds or not. The
default value of this property is true.
ClipToOutline
{...}
ContentDescription
{...}
DispatchPopulateAccessibilityEventHandler
{...}
DuplicateParentState
{...}
EnabledState
{...}
Flex
{...}
FlexBasisPercent
{...}
FlexBasisPx
{...}
FlexGrow
{...}
FlexShrink
{...}
FocusChangeHandler
{...}
FocusState
{...}
FocusedHandler
{...}
Foreground
{...}
FullImpressionHandler
{...}
HeightPercent
{...}
HeightPx
{...}
ImportantForAccessibility
{...}
InterceptTouchHandler
{...}
InvisibleHandler
{...}
IsReferenceBaseline
{...}
LayoutDirection
{...}
LongClickHandler
{...}
MarginAutos
{...}
MarginPercents
{...}
Margins
{...}
MaxHeightPercent
{...}
MaxHeightPx
{...}
MaxWidthPercent
{...}
MaxWidthPx
{...}
MinHeightPercent
{...}
MinHeightPx
{...}
MinWidthPercent
{...}
MinWidthPx
{...}
OnInitializeAccessibilityEventHandler
{...}
OnInitializeAccessibilityNodeInfoHandler
{...}
OnPopulateAccessibilityEventHandler
{...}
OnRequestSendAccessibilityEventHandler
{...}
OutlineProvider
{...}
PaddingPercents
{...}
Paddings
{...}
PerformAccessibilityActionHandler
{...}
PositionPercents
{...}
PositionType
{...}
Positions
{...}
Rotation
{...}
RotationX
{...}
RotationY
{...}
Scale
{...}
SelectedState
{...}
SendAccessibilityEventHandler
{...}
SendAccessibilityEventUncheckedHandler
{...}
ShadowElevation
{...}
StateListAnimator
{...}
StateListAnimatorRes
{...}
TouchExpansions
{...}
TouchHandler
{...}
TransitionKey
{...}
TransitionKeyType
{...}
UnfocusedHandler
{...}
UseHeightAsBaseline
{...}
ViewTag
{...}
ViewTags
{...}
VisibilityChangedHandler
{...}
VisibleHandler
{...}
VisibleHeightRatio
{...}
VisibleWidthRatio
{...}
WidthPercent
{...}
WidthPx
{...}