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.
LoadingIndicator
Type
Description
progressnumber | nullFrom 0 to 1. Unset animates.
number | null
From 0 to 1. Unset animates.
colorColorValueThe shape color.
ColorValue
The shape color.
LazyColumn, LazyRow
One.Android.LazyColumn scrolls children vertically and One.Android.LazyRow
horizontally. Children become lazy items: only the visible window composes, so
long lists stay cheap. Give the list a bounded height (column) or width (row)
through composeStyle; items size themselves.
verticalArrangementComposeVerticalArrangement | Readonly<{ spacedBy: number }>A preset, or { spacedBy } for a gap in dp.
ComposeVerticalArrangement | Readonly<{ spacedBy: number }>
A preset, or { spacedBy } for a gap in dp.
horizontalAlignment'start' | 'end' | 'center' = 'start'How items sit across the column.
'start' | 'end' | 'center' = 'start'
How items sit across the column.
contentPaddingComposeLazyContentPaddingInset around the items, in dp.
ComposeLazyContentPadding
Inset around the items, in dp.
LazyRow
Type
Description
horizontalArrangementComposeHorizontalArrangement | Readonly<{ spacedBy: number }>A preset, or { spacedBy } for a gap in dp.
ComposeHorizontalArrangement | Readonly<{ spacedBy: number }>
A preset, or { spacedBy } for a gap in dp.
verticalAlignment'top' | 'bottom' | 'center' = 'top'How items sit across the row.
'top' | 'bottom' | 'center' = 'top'
How items sit across the row.
contentPaddingComposeLazyContentPaddingInset around the items, in dp.
ComposeLazyContentPadding
Inset around the items, in dp.
LazyContentPadding
Type
Description
startnumberLeading inset, in dp.
number
Leading inset, in dp.
topnumberTop inset, in dp.
number
Top inset, in dp.
endnumberTrailing inset, in dp.
number
Trailing inset, in dp.
bottomnumberBottom inset, in dp.
number
Bottom inset, in dp.
Image
One.Android.Image draws a bundled asset or a URI through Compose. Size it
with composeStyle width and height; the bitmap scales inside those bounds.
<One.Android.Image
source={{ uri: fileUri }}
contentScale="crop"
contentDescription="A mountain at sunset"
composeStyle={{ width: 160, height: 100 }}
onLoad={() =>setLoaded(true)}
onError={(error) =>setError(error)}
/>
Image
Type
Description
source (required)ComposeImageSourceA bundled asset id or { uri }.
ComposeImageSource
A bundled asset id or { uri }.
contentScaleComposeImageContentScale = 'fit'fit, crop, fillBounds, fillWidth, fillHeight, inside, or none.
ComposeImageContentScale = 'fit'
fit, crop, fillBounds, fillWidth, fillHeight, inside, or none.
alignmentComposeContentAlignment = 'center'Where the image sits inside its bounds.
ComposeContentAlignment = 'center'
Where the image sits inside its bounds.
contentDescriptionstring | nullSpoken to screen readers. Null marks a decorative image.
string | null
Spoken to screen readers. Null marks a decorative image.
tintColorValueA color applied to every non-transparent pixel.
ColorValue
A color applied to every non-transparent pixel.
alphanumberOpacity, from 0 to 1.
number
Opacity, from 0 to 1.
onLoad() => voidThe image decoded and drew.
() => void
The image decoded and drew.
onError(message: string) => voidThe image failed to load, with the reason.
(message: string) => void
The image failed to load, with the reason.
Snackbar
One.Android.SnackbarHost shows Material 3 snackbars. Its ref exposes
showSnackbar, which resolves 'actionPerformed' when the user taps the
action and 'dismissed' when the snackbar times out or is dismissed. Calls
queue behind the visible snackbar. A One.Android.Snackbar child styles the
shown snackbars.
actionOnNewLineboolean = falsePuts a long action label under the message.
boolean = false
Puts a long action label under the message.
SnackbarShowOptions
Type
Description
message (required)stringThe message body.
string
The message body.
actionLabelstringThe action button label. No button when unset.
string
The action button label. No button when unset.
withDismissActionboolean = falseShows a trailing close button.
boolean = false
Shows a trailing close button.
durationComposeSnackbarDurationshort, long, or indefinite. Short without an action, indefinite with one.
ComposeSnackbarDuration
short, long, or indefinite. Short without an action, indefinite with one.
ModalBottomSheet
One.Android.ModalBottomSheet presents its children in a Material 3 modal
sheet. Mounting shows it; onDismissRequest fires on a swipe, back press, or
scrim tap, and the parent unmounts it. The ref hides the sheet with an
animation through hide, which resolves when the sheet is hidden.
One.Android.NavigationBar is the Material 3 bottom bar. Its children are
One.Android.NavigationBarItem destinations, which spread evenly across the
bar. The parent owns selection: each item reports selected, and onClick
moves it.
const [tab, setTab] =useState('home')
<One.Android.NavigationBar>
<One.Android.NavigationBarItem
selected={tab ==='home'}
onClick={() =>setTab('home')}
label="Home"
icon="home"
/>
<One.Android.NavigationBarItem
selected={tab ==='search'}
onClick={() =>setTab('search')}
label="Search"
icon="search"
/>
</One.Android.NavigationBar>
NavigationBar
Type
Description
containerColorColorValueThe bar background.
ColorValue
The bar background.
contentColorColorValueThe default icon and label color.
ColorValue
The default icon and label color.
tonalElevationnumberThe tonal elevation, in dp.
number
The tonal elevation, in dp.
NavigationBarItem
Type
Description
selected (required)booleanThis destination is the current one.
boolean
This destination is the current one.
onClick (required)() => voidThe item was tapped.
() => void
The item was tapped.
labelstringThe text under the icon.
string
The text under the icon.
icon (required)ComposeIconNameA Material Symbols icon name.
ComposeIconName
A Material Symbols icon name.
iconFilledboolean = falseUses the filled icon font.
One.Android.SearchBar is the Material 3 search field. query is controlled
text, expanded opens the results list, and children render as the expanded
content. onSearch fires when the user submits the query. Leading and
trailing icons go in slots; the M3 pattern swaps the leading search icon for a
back arrow while expanded. One.Android.DockedSearchBar shares the same
props, and its results anchor under the field instead of taking the screen.
onQueryChange (required)(value: string) => voidThe text changed.
(value: string) => void
The text changed.
revisionnumberBump to force the native text to the query.
number
Bump to force the native text to the query.
expanded (required)booleanThe results list is open.
boolean
The results list is open.
onExpandedChange (required)(expanded: boolean) => voidA tap or back press asked to expand or collapse.
(expanded: boolean) => void
A tap or back press asked to expand or collapse.
expandedRevisionnumberBump to force native expansion to expanded.
number
Bump to force native expansion to expanded.
placeholderstringThe hint shown when the query is empty.
string
The hint shown when the query is empty.
enabledboolean = trueA disabled bar ignores input.
boolean = true
A disabled bar ignores input.
onSearch(query: string) => voidThe user submitted the query.
(query: string) => void
The user submitted the query.
containerColorColorValueThe bar background.
ColorValue
The bar background.
DropdownMenu, ExposedDropdownMenuBox
One.Android.DropdownMenu is the Material 3 popup menu. Put it beside its
anchor in a Box; its children are One.Android.DropdownMenuItem rows. The
parent owns expansion: expanded opens it, and onDismissRequest fires on
an outside tap or back press. One.Android.ExposedDropdownMenuBox is the
anchored text-field form: a read-only field shows value, tapping it opens
the same items, and picking one usually writes the value and collapses.
onExpandedChange (required)(expanded: boolean) => voidA tap, outside tap, or back press asked to expand or collapse.
(expanded: boolean) => void
A tap, outside tap, or back press asked to expand or collapse.
expandedRevisionnumberBump to force native expansion to expanded.
number
Bump to force native expansion to expanded.
value (required)stringThe read-only text in the field.
string
The read-only text in the field.
placeholderstringThe hint shown when the value is empty.
string
The hint shown when the value is empty.
enabledboolean = trueA disabled box ignores taps.
boolean = true
A disabled box ignores taps.
PullToRefreshBox
One.Android.PullToRefreshBox wraps scrollable children with the Material 3
pull gesture and indicator. A pull past the threshold calls onRefresh; the
parent keeps isRefreshing true until its reload finishes. Give the box a
bounded height so its list can scroll.
One.Android.AnimatedVisibility fades and resizes its children in and out
as visible changes. enter and exit pick one transition each; unset,
both use the Material fade with a vertical resize.
enterComposeAnimatedVisibilityTransitionfade, scale, slideVertically, or expandVertically.
ComposeAnimatedVisibilityTransition
fade, scale, slideVertically, or expandVertically.
exitComposeAnimatedVisibilityTransitionfade, scale, slideVertically, or expandVertically. The slide and expand forms shrink on exit.
ComposeAnimatedVisibilityTransition
fade, scale, slideVertically, or expandVertically. The slide and expand forms shrink on exit.
Custom dialog content
One.Android.BasicAlertDialog mounts a Material 3 dialog while it is in the
React tree. Its optional onDismissRequest reports back or outside taps;
remove the component to close it. children supplies the content. The
properties object accepts dismissOnBackPress, dismissOnClickOutside,
usePlatformDefaultWidth, and decorFitsSystemWindows, all defaulting to
true. Unlike the existing Dialog, this SDK surface has no visible prop.
Each direct Compose child is an item. All three accept itemSpacing (dp,
zero by default), contentPadding (dp or { start, top, end, bottom }),
flingBehavior (singleAdvance or noSnap), and userScrollEnabled
(default true). Hero and multi-browse default to single-item snapping;
uncontained defaults to free scrolling. Widths must be positive, and spacing
and padding must be nonnegative. Use a finite height for the carousel.
DateRangePicker and DateRangePickerDialog accept optional
initialStartDate and initialEndDate ISO strings. Omit both for an empty
selection, or omit the end for a partial range. An end requires a start and
must fall on or after it. Dates are calendar days represented at UTC midnight.
selectableDates={{ start, end }} accepts optional Date bounds. Initial
selections must fall within these bounds.
Both accept variant (picker or input), showVariantToggle, showTitle,
showHeadline (all three booleans default to true), color, and
elementColors with the existing DatePicker color keys.
onDateRangeSelected({ start, end }) receives Date | null for each endpoint.
The inline picker reports its initial range and each selection change. The
dialog reports only a confirmed complete range. The dialog requires
onDismissRequest and accepts confirmButtonLabel and dismissButtonLabel,
which default to system labels. Mount and unmount the dialog to present and
close it; an incomplete selection disables confirmation.
HorizontalFloatingToolbar lays out Compose children in a Material toolbar.
variant is standard (default) or vibrant. Its optional colors object
accepts toolbarContainerColor, toolbarContentColor, fabContainerColor,
and fabContentColor. Unset fields use the variant’s defaults. Put the
optional FAB content inside HorizontalFloatingToolbar.FloatingActionButton,
whose optional onPress receives its native click.
One.Android.Shape provides Star, PillStar, Pill, Circle, Rectangle,
Polygon, and RoundedCorner. Shapes are leaves; give them explicit size
through style at the root or composeStyle inside a Compose tree. color
defaults to transparent. cornerRounding, smoothing, innerRadius, and
radius are fractions from zero to one. verticesCount is an integer of at
least three (default six). cornerRounding and smoothing default to zero;
radius and innerRadius default to zero. Set radius={1} for a full-size circle or star. Stars use the two radii; polygons
use the vertex count. Pill uses smoothing, Circle uses radius and vertex
count, and Rectangle uses corner rounding and smoothing. RoundedCorner
uses cornerRadii={{ topStart, topEnd, bottomStart, bottomEnd }} in dp,
with omitted corners zero. Logical corners follow layout direction.
SyncSwitch accepts isOn={state} from useNativeState(false), optional
enabled (default true), and optional onCheckedChangeSync. The callback
must contain the 'worklet' directive. Native Compose reads and writes the
shared boolean directly; all bound switches observe the same entry. The
callback runs synchronously on the worklets UI runtime after a native change.
Programmatic writes and disabled switches do not invoke it. The existing
Switch remains the scalar isOn/onIsOnChange control.
These APIs are Android-only and use One’s existing style and composeStyle
props. Their SDK behavioral contracts are preserved; a modifiers array is
not an input to One’s Compose tree. Native feature acceptance is
tracked separately from adapter validation.