Every node takes these. A node inside a Compose tree styles through
composeStyle; style applies only at the root of the tree.
Props
Type
Description
childrenReactNodeCompose children, on layout nodes.
ReactNode
Compose children, on layout nodes.
accessibilityRoleComposeAccessibilityRolebutton, switch, checkbox, radio, header, text, adjustable, alert, or progressbar.
ComposeAccessibilityRole
button, switch, checkbox, radio, header, text, adjustable, alert, or progressbar.
styleStyleProp<ViewStyle>React Native style, at the root of a Compose tree only.
StyleProp<ViewStyle>
React Native style, at the root of a Compose tree only.
composeStyleComposeStyleCompose modifiers. See below.
ComposeStyle
Compose modifiers. See below.
Nodes also take accessibilityLabel, accessibilityState,
accessibilityValue, and testID.
ComposeStyle
Type
Description
backgroundColorColorValueThe fill behind the node.
ColorValue
The fill behind the node.
foregroundColorColorValueThe content color, such as an icon tint.
ColorValue
The content color, such as an icon tint.
paddingnumberPadding on every side, in dp.
number
Padding on every side, in dp.
paddingTopnumberTop padding, in dp.
number
Top padding, in dp.
paddingRightnumberRight padding, in dp.
number
Right padding, in dp.
paddingBottomnumberBottom padding, in dp.
number
Bottom padding, in dp.
paddingLeftnumberLeft padding, in dp.
number
Left padding, in dp.
widthnumberA fixed width, in dp.
number
A fixed width, in dp.
heightnumberA fixed height, in dp.
number
A fixed height, in dp.
fillMaxWidthbooleanFills the parent width.
boolean
Fills the parent width.
fillMaxHeightbooleanFills the parent height.
boolean
Fills the parent height.
weightnumberA share of the free space in a Row or Column.
number
A share of the free space in a Row or Column.
cornerRadiusnumberRounds the node, in dp.
number
Rounds the node, in dp.
opacitynumberFrom 0 to 1.
number
From 0 to 1.
borderColorColorValueThe border color.
ColorValue
The border color.
borderWidthnumberThe border width, in dp.
number
The border width, in dp.
Column, Row, Box
One.Android.Column stacks children vertically, Row horizontally, and
Box layers them.
Column
Type
Description
horizontalAlignmentComposeHorizontalAlignment = "start"start, centerHorizontally, or end.
ComposeHorizontalAlignment = "start"
start, centerHorizontally, or end.
verticalArrangementComposeVerticalArrangement = "top"top, center, bottom, spaceBetween, spaceAround, or spaceEvenly.
ComposeVerticalArrangement = "top"
top, center, bottom, spaceBetween, spaceAround, or spaceEvenly.
spacingnumberThe gap between children, in dp.
number
The gap between children, in dp.
Row
Type
Description
verticalAlignmentComposeVerticalAlignment = "top"top, centerVertically, or bottom.
ComposeVerticalAlignment = "top"
top, centerVertically, or bottom.
horizontalArrangementComposeHorizontalArrangement = "start"start, center, end, spaceBetween, spaceAround, or spaceEvenly.
ComposeHorizontalArrangement = "start"
start, center, end, spaceBetween, spaceAround, or spaceEvenly.
spacingnumberThe gap between children, in dp.
number
The gap between children, in dp.
Box
Type
Description
contentAlignmentComposeContentAlignmentWhere children sit: topStart through bottomEnd, or top, bottom, start, end.
ComposeContentAlignment
Where children sit: topStart through bottomEnd, or top, bottom, start, end.
One.Android.FlowRow wraps children across rows.
FlowRow
Type
Description
horizontalArrangementComposeHorizontalArrangement | Readonly<{ spacedBy: number }> = "start"A Row arrangement, or a fixed gap in dp.
ComposeHorizontalArrangement | Readonly<{ spacedBy: number }> = "start"
A Row arrangement, or a fixed gap in dp.
verticalArrangementComposeVerticalArrangement | Readonly<{ spacedBy: number }> = "top"A Column arrangement, or a fixed gap between rows in dp.
ComposeVerticalArrangement | Readonly<{ spacedBy: number }> = "top"
A Column arrangement, or a fixed gap between rows in dp.
One.Android.Spacer takes the shared props only. As a direct child of a Row
or Column with composeStyle={{ weight: 1 }} it takes the free space; with
width or height it is a fixed gap. Any other direct child takes a positive
weight the same way.
Text
Props
Type
Description
text (required)stringThe text.
string
The text.
fontSizenumberThe size in sp. The theme body size when unset.
number
The size in sp. The theme body size when unset.
fontWeightComposeFontWeightthin, extraLight, light, normal, medium, semiBold, bold, extraBold, or black.
ComposeFontWeight
thin, extraLight, light, normal, medium, semiBold, bold, extraBold, or black.
textAlignComposeTextAlignunspecified, left, right, center, justify, start, or end.
ComposeTextAlign
unspecified, left, right, center, justify, start, or end.
maxLinesnumberThe most lines shown.
number
The most lines shown.
Icon
One.Android.Icon draws a Material Symbol. See Android Icons.
For an icon on every platform, use One.UI.Icon.
Buttons
One.Android.Button shows a label with an optional leading icon.
Button
Type
Description
label (required)stringThe title.
string
The title.
onPress() => voidRuns when tapped.
() => void
Runs when tapped.
variantComposeButtonVariant = "filled"filled, tonal, elevated, outlined, or text.
ComposeButtonVariant = "filled"
filled, tonal, elevated, outlined, or text.
toneComposeButtonTone = "default"default, or danger for the error colors.
ComposeButtonTone = "default"
default, or danger for the error colors.
iconComposeIconNameA Material Symbol before the label.
ComposeIconName
A Material Symbol before the label.
iconFilledboolean = falseUses the filled icon font.
boolean = false
Uses the filled icon font.
disabledboolean = falseDims the button and ignores taps.
boolean = false
Dims the button and ignores taps.
IconButton, FilledIconButton, FilledTonalIconButton, and
OutlinedIconButton wrap an Icon child.
IconButton
Type
Description
children (required)ReactNodeThe Icon.
ReactNode
The Icon.
onClick() => voidRuns when tapped.
() => void
Runs when tapped.
enabledbooleanfalse dims the button and ignores taps.
boolean
false dims the button and ignores taps.
colorsComposeIconButtonColorsContainer and content colors, enabled and disabled.
ComposeIconButtonColors
Container and content colors, enabled and disabled.
FloatingActionButton, SmallFloatingActionButton, and
LargeFloatingActionButton take an Icon in their .Icon slot.
ExtendedFloatingActionButton also takes Text in .Text.
FloatingActionButton
Type
Description
children (required)ReactNodeThe .Icon and, when extended, .Text slots.
ReactNode
The .Icon and, when extended, .Text slots.
containerColorColorValueThe button color. The theme when unset.
ColorValue
The button color. The theme when unset.
onClick() => voidRuns when tapped.
() => void
Runs when tapped.
ExtendedFloatingActionButton adds expanded, which shows or hides its text.
ToggleButton, IconToggleButton, FilledIconToggleButton, and
OutlinedIconToggleButton are the Material 3 toggles.
ToggleButton
Type
Description
children (required)ReactNodeThe content, such as an Icon.
ReactNode
The content, such as an Icon.
checked (required)booleanWhether the toggle is on.
boolean
Whether the toggle is on.
onCheckedChange(checked: boolean) => voidA tap, with the new value.
(checked: boolean) => void
A tap, with the new value.
enabledboolean = truefalse dims the toggle and ignores taps.
boolean = true
false dims the toggle and ignores taps.
colorsComposeToggleButtonColorsContainer and content colors, normal, checked, and disabled.
ComposeToggleButtonColors
Container and content colors, normal, checked, and disabled.
revisionnumber = 0Increase with a new checked to reset it from outside.
number = 0
Increase with a new checked to reset it from outside.
Segmented buttons
SingleChoiceSegmentedButtonRow and MultiChoiceSegmentedButtonRow hold
SegmentedButton children. In a single choice row, pass selected and
onClick; in a multiple choice row, pass checked and onCheckedChange.
SegmentedButton
Type
Description
children (required)ReactNodeThe segment label.
ReactNode
The segment label.
selectedbooleanWhether the segment is chosen, in a single choice row.
boolean
Whether the segment is chosen, in a single choice row.
onClick() => voidA tap, in a single choice row.
() => void
A tap, in a single choice row.
checkedbooleanWhether the segment is on, in a multiple choice row.
boolean
Whether the segment is on, in a multiple choice row.
onCheckedChange(checked: boolean) => voidA tap, in a multiple choice row.
(checked: boolean) => void
A tap, in a multiple choice row.
enabledboolean = truefalse dims the segment and ignores taps.
boolean = true
false dims the segment and ignores taps.
colorsComposeSegmentedButtonColorsBorder, content, and container colors, active, inactive, and disabled.
ComposeSegmentedButtonColors
Border, content, and container colors, active, inactive, and disabled.
revisionnumber = 0Increase with a new checked to reset it from outside.
number = 0
Increase with a new checked to reset it from outside.
Switch
Props
Type
Description
isOn (required)booleanWhether the switch is on.
boolean
Whether the switch is on.
onIsOnChange (required)(value: boolean) => voidA flip, with the new value.
(value: boolean) => void
A flip, with the new value.
labelstring = ""Text before the switch. The whole row toggles.
string = ""
Text before the switch. The whole row toggles.
disabledboolean = falseDims the switch and ignores taps.
boolean = false
Dims the switch and ignores taps.
colorsComposeSwitchColorsThumb, track, border, and icon colors for each state.
ComposeSwitchColors
Thumb, track, border, and icon colors for each state.
revisionnumber = 0Increase with a new isOn to reset it from outside.
number = 0
Increase with a new isOn to reset it from outside.
Checkbox, RadioButton
Without a callback, each is read only. Omitted colors use the Material theme.
Checkbox
Type
Description
value (required)booleanWhether the box is checked.
boolean
Whether the box is checked.
onCheckedChange(value: boolean) => voidA tap, with the new value.
(value: boolean) => void
A tap, with the new value.
disabledboolean = falseDims the box and ignores taps.
boolean = false
Dims the box and ignores taps.
revisionnumber = 0Increase with a new value to reset it from outside.
number = 0
Increase with a new value to reset it from outside.
Card, ElevatedCard, and OutlinedCard wrap children in the Material 3
card surfaces. ElevatedCard takes no border. Without one, Card has no
border and OutlinedCard uses the theme outline.
elevationnumberThe shadow depth in dp. Zero or more.
number
The shadow depth in dp. Zero or more.
borderComposeCardBorder{ width, color }, width in dp, 1 by default.
ComposeCardBorder
{ width, color }, width in dp, 1 by default.
One.Android.Surface is a Material 3 surface. Round it with
composeStyle.cornerRadius. With onClick it is clickable, with selected
and onClick selectable, and with checked and onCheckedChange toggleable.
Surface
Type
Description
colorColorValueThe surface color.
ColorValue
The surface color.
contentColorColorValueThe color of content on it.
ColorValue
The color of content on it.
tonalElevationnumberTints the surface by depth, in dp.
number
Tints the surface by depth, in dp.
shadowElevationnumberThe shadow depth, in dp.
number
The shadow depth, in dp.
borderComposeCardBorder{ width, color }.
ComposeCardBorder
{ width, color }.
enabledboolean = truefalse ignores taps.
boolean = true
false ignores taps.
selectedbooleanMakes it selectable, with onClick.
boolean
Makes it selectable, with onClick.
checkedbooleanMakes it toggleable, with onCheckedChange.
boolean
Makes it toggleable, with onCheckedChange.
onClick() => voidRuns when tapped.
() => void
Runs when tapped.
onCheckedChange(checked: boolean) => voidA tap, with the new checked value.
(checked: boolean) => void
A tap, with the new checked value.
revisionnumber = 0Increase with a new checked to reset it from outside.
number = 0
Increase with a new checked to reset it from outside.
ListItem
One.Android.ListItem is a Material 3 row. Put Compose content in its
.HeadlineContent slot, and optionally .OverlineContent,
.SupportingContent, .LeadingContent, and .TrailingContent.
Props
Type
Description
colorsComposeListItemColorsContainer and per slot content colors.
ComposeListItemColors
Container and per slot content colors.
tonalElevationnumberTints the row by depth, in dp.
number
Tints the row by depth, in dp.
shadowElevationnumberThe shadow depth, in dp.
number
The shadow depth, in dp.
Dividers
HorizontalDivider and VerticalDivider draw Material 3 lines. Give a
vertical divider a height through its parent or composeStyle.
Props
Type
Description
thicknessnumberThe line width in dp.
number
The line width in dp.
colorColorValueThe line color. The theme when unset.
ColorValue
The line color. The theme when unset.
Badges
One.Android.Badge is a dot, or a count when it has Compose children.
One.Android.BadgedBox puts a Badge from its .Badge slot at the top end of
its content; with no slot it shows a dot.
Badge
Type
Description
containerColorColorValueThe badge color.
ColorValue
The badge color.
contentColorColorValueThe count color.
ColorValue
The count color.
Chips
AssistChip, FilterChip, InputChip, and SuggestionChip are the Material
3 chips. Each takes its label in a .Label slot. AssistChip and
FilterChip also have .LeadingIcon and .TrailingIcon, InputChip has
.Avatar and .TrailingIcon, and SuggestionChip has .Icon.
Every chip takes enabled, onClick, elevation in dp, border
({ width, color }), and colors. A tap calls onClick; set the next
selected yourself.
FilterChip
Type
Description
selected (required)booleanWhether the filter is on.
boolean
Whether the filter is on.
colorsComposeFilterChipColorsContainer, label, and icon colors, normal and selected.
ComposeFilterChipColors
Container, label, and icon colors, normal and selected.
InputChip
Type
Description
selectedboolean = falseWhether the chip is selected.
boolean = false
Whether the chip is selected.
colorsComposeInputChipColorsContainer, label, and icon colors, normal and selected.
ComposeInputChipColors
Container, label, and icon colors, normal and selected.
AssistChip colors are containerColor, labelColor,
leadingIconContentColor, and trailingIconContentColor. SuggestionChip
colors are containerColor, labelColor, and iconContentColor.
TextField
One.Android.TextField edits text, a string or a native state handle from
useNativeState. For a field on every platform, use
One.UI.TextInput.
Props
Type
Description
text (required)string | NativeState<string>The text, or a native state handle.
string | NativeState<string>
The text, or a native state handle.
onTextChange (required)(value: string) => voidAn edit, with the new text.
(value: string) => void
An edit, with the new text.
revisionnumber = 0Increase with a new text to reset it from outside.
number = 0
Increase with a new text to reset it from outside.
labelstringThe floating label.
string
The floating label.
placeholderstringShown while empty.
string
Shown while empty.
disabledboolean = falseDims the field and blocks editing.
boolean = false
Dims the field and blocks editing.
variantComposeTextFieldVariant = "filled"filled or outlined.
ComposeTextFieldVariant = "filled"
filled or outlined.
keyboardTypeComposeTextFieldKeyboardType = "default"default, number, decimal, email, password, phone, or url.
ComposeTextFieldKeyboardType = "default"
default, number, decimal, email, password, phone, or url.
secureTextboolean = falseHides the text.
boolean = false
Hides the text.
focusedbooleanWhether the field has focus, controlled.
boolean
Whether the field has focus, controlled.
focusRevisionnumber = 0Increase with a new focused to apply it.
One.Android.DatePicker is the Material 3 calendar and One.Android.TimePicker
is the clock dial. Both are controlled by a Date. DatePicker changes the
calendar day in the device time zone and keeps the time of day. TimePicker
changes the hour and minute, keeps the day, and sets seconds to zero.
onSelectionChange (required)(value: Date) => voidA tapped or typed day, with the time of day kept.
(value: Date) => void
A tapped or typed day, with the time of day kept.
revisionnumber = 0Increase with a new value to reset it from outside.
number = 0
Increase with a new value to reset it from outside.
minimumDateDateThe earliest selectable day. Earlier days and years are disabled.
Date
The earliest selectable day. Earlier days and years are disabled.
maximumDateDateThe latest selectable day.
Date
The latest selectable day.
variant'picker' | 'input' = 'picker'The calendar grid or a text field.
'picker' | 'input' = 'picker'
The calendar grid or a text field.
showModeToggleboolean = trueShows the button that switches variant.
boolean = true
Shows the button that switches variant.
colorColorValueTints the title, headline, selected day, and today border.
ColorValue
Tints the title, headline, selected day, and today border.
colorsComposeDatePickerColorsPer-element colors; these win over color.
ComposeDatePickerColors
Per-element colors; these win over color.
TimePicker
Type
Description
selection (required)DateThe selected time of day.
Date
The selected time of day.
onSelectionChange (required)(value: Date) => voidA new hour or minute, with the day kept.
(value: Date) => void
A new hour or minute, with the day kept.
revisionnumber = 0Increase with a new value to reset it from outside.
number = 0
Increase with a new value to reset it from outside.
is24HourbooleanA 24 hour clock. Defaults to the device setting.
boolean
A 24 hour clock. Defaults to the device setting.
variant'picker' | 'input' = 'picker'The clock dial or hour and minute fields.
'picker' | 'input' = 'picker'
The clock dial or hour and minute fields.
colorColorValueTints the selector, selected field, and dial.
ColorValue
Tints the selector, selected field, and dial.
colorsComposeTimePickerColorsPer-element colors; these win over color.
ComposeTimePickerColors
Per-element colors; these win over color.
DatePickerDialog and TimePickerDialog take the same props without
onSelectionChange and revision. Each opening starts from selection; the
confirm button reports the chosen value.
DatePickerDialog, TimePickerDialog
Type
Description
visible (required)booleanWhether the dialog shows.
boolean
Whether the dialog shows.
onConfirm (required)(value: Date) => voidThe confirm button, with the chosen value.
(value: Date) => void
The confirm button, with the chosen value.
onDismiss (required)() => voidDismissed by the button, a tap outside, or back.
() => void
Dismissed by the button, a tap outside, or back.
confirmLabelstringThe confirm button title. Defaults to the system OK.
string
The confirm button title. Defaults to the system OK.
dismissLabelstringThe dismiss button title. Defaults to the system Cancel.
string
The dismiss button title. Defaults to the system Cancel.
AlertDialog, Dialog
One.Android.AlertDialog shows a confirmation while visible is true.
One.Android.Dialog shows its children in a dialog window.
AlertDialog
Type
Description
visible (required)booleanWhether the dialog shows.
dismissLabelstringThe dismiss button title. No button when unset.
string
The dismiss button title. No button when unset.
onConfirm (required)() => voidThe confirm button was tapped.
() => void
The confirm button was tapped.
onDismiss (required)() => voidDismissed by the button, a tap outside, or back.
() => void
Dismissed by the button, a tap outside, or back.
Dialog
Type
Description
visible (required)booleanWhether the dialog shows.
boolean
Whether the dialog shows.
onDismiss (required)() => voidA tap outside or back asked to close it.
() => void
A tap outside or back asked to close it.
Progress and loading
ProgressIndicator is circular unless variant says otherwise.
LinearProgressIndicator, CircularProgressIndicator,
LinearWavyProgressIndicator, and CircularWavyProgressIndicator fix the
variant. Leave progress unset for an indeterminate indicator.
ProgressIndicator
Type
Description
variantComposeProgressVariant = "circular"linear, circular, linearWavy, or circularWavy.
ComposeProgressVariant = "circular"
linear, circular, linearWavy, or circularWavy.
progressnumber | nullFrom 0 to 1. Unset spins.
number | null
From 0 to 1. Unset spins.
colorColorValueThe indicator color.
ColorValue
The indicator color.
trackColorColorValueThe track color.
ColorValue
The track color.
strokeCapComposeProgressStrokeCapround, butt, or square. Linear and circular.
ComposeProgressStrokeCap
round, butt, or square. Linear and circular.
gapSizenumberThe gap between indicator and track, in dp.
number
The gap between indicator and track, in dp.
strokeWidthnumberThe line width, in dp. Circular.
number
The line width, in dp. Circular.
drawStopIndicatorComposeProgressStopIndicatorThe end dot of a determinate linear bar: { color, strokeCap, stopSize }.
ComposeProgressStopIndicator
The end dot of a determinate linear bar: { color, strokeCap, stopSize }.
stopSizenumberThe end dot size, in dp. Linear wavy.
number
The end dot size, in dp. Linear wavy.
amplitudenumberThe wave height. Wavy.
number
The wave height. Wavy.
wavelengthnumberThe wave length, in dp. Wavy.
number
The wave length, in dp. Wavy.
waveSpeednumberHow fast the wave moves. Wavy.
number
How fast the wave moves. Wavy.
LoadingIndicator and ContainedLoadingIndicator are the Material 3
expressive loading shapes, with progress and color; the contained one adds
containerColor.