Button

Starts an action: an iOS 26 capsule on iOS, a pill on Android.

import { Button, IconButton, NavigationButton } from "@plexui/react-native"

Examples

Overview

Optical alignment

IconButton

Glass over color

Glass in a card

Platforms

PlexiOS 26Android
ButtonButton: a capsule, filled, gray or glassButton: a pill, filled, tinted, outlined or text
IconButtonA circular buttonA circular button; in a bar a 46dp glass circle
NavigationButtonBar button item: the back chevron, close cross and confirm checkmark in glass circlesThe back arrow and close cross in 46dp glass circles; confirm a glass text pill (an accent check circle in a bottom bar)

iOS's button styles are Filled, Tinted, Gray and Plain, with no outlined button: on iOS variant="outline" is the Gray button, the neutral soft fill with the label in the button's color, while Android draws the outline.

API

PropTypeDefaultDescription
color"primary" | "secondary" | "danger" | "success" | "info" | "discovery" | "caution" | "warning" | "accent""primary"Semantic color, or the brand's accent (accent): its words on a fill in the brand's onAccent. A brand sizes its accent button round it with --button-accent-height, -font-size, -line-height, -font-weight and -radius (BottomActions keeps that height)
variant"solid" | "soft" | "outline" | "ghost""solid"Fill style. On iOS outline is the Gray button (iOS has no outlined one): the neutral soft fill, the label in the button's color
size"3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl""md"Height step of the Plex UI scale, mapped to the platform's native sizes
shape"round" | "square""round"The shape on Android: a pill, or 8dp corners
mobileMaterial"glass" | "flat" | "clear" | "clear-light"—iOS 26 glass, or its clear glass over a photo, a video or a color, for a neutral soft or ghost button; clear-light is the clear glass over a bright color, a white frost and a dark glyph (--mobile-glass-clear-light-background, -label). On a solid button outside a bar, glass is the prominent glass of iOS 27.2: on iOS 26 the system's own Liquid Glass tinted with the button's color (.glassProminent; disabled, the color at 45% in light and 33% in dark, the label black at 50% or white at 34%, --button-prominent-glass-disabled-color), a bar's prominent action the same glass in --toolbar-prominent-background; elsewhere the button's color as a tinted glass over a blur, a tenth of what is under it showing through on the web (3% in dark), with the rim and sheen of a bar's prominent action (--button-prominent-glass-shadow, --button-prominent-glass-background); disabled, iOS 27.2's gray glass, see-through over a blur (--button-disabled-glass: gray 209 at 65%, 106 at 52% in dark). Android has no glass. Clear works in a bar too (not an item in a group's capsule): an IconButton or a NavigationButton takes it, a back or a close over a photo or a glow. Android's clear gray stands over a light blur in a browser (--mobile-glass-clear-backdrop-filter). iOS's clear glass in a browser: --mobile-glass-clear-web-backdrop-filter (its blur and lift), --mobile-glass-clear-web-background(-active) (a fill over it, none at rest, white at 11% pressed), --mobile-glass-clear-web-shadow (side lines as a shadow in place of the drawn ones), --mobile-glass-clear-web-light: none (no rim, glow or side lines). Under a clip with round corners (a sheet's top, a card that cuts its content) it draws no rim or glow and takes its side lines as that shadow: Chromium draws a backdrop filter with a mask there as a gray square.
uniformbooleanfalseAs wide as tall: an icon alone
blockbooleanfalseTakes the whole width
labelLinesnumber1The most lines a text label takes before its ellipsis: 2 lets a long label wrap within the button, which grows from its height
selectedbooleanfalseA toggle's on state
loadingbooleanfalseShows a spinner in place of the content and takes no presses
disabledbooleanfalseDims the button and takes no presses
inertbooleanloadingTakes no presses and draws as it is
iconSize"sm" | "md" | "lg" | "xl" | "2xl"—Icon size from the control scale; defaults to the size's
gutterSize"3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl"—Gutter at the edges from the control scale
opticallyAlign"start" | "end"—Pulls the gutter in on one side so the label lines up with content around it
pillboolean—Kept for @plexui/ui's API: phone buttons are capsules on iOS and round on Android
onPress(event) => void—Called on a press (all of Pressable's props pass through)
childrenReactNode—Icons and text
styleStyleProp<ViewStyle>—Style of the button
refRef<View>—The button's native view, for an ActionSheet's source or a measure

IconButton takes the same props without children, uniform and block, plus icon (the icon element) and a required accessibilityLabel; its variant defaults to "ghost".

NavigationButton takes them without children, uniform and pill, plus action ("back" | "close" | "confirm", required), accessibilityLabel (default Back, Close or Confirm) and label: the short word on Android's confirm pill, Done by default (the pill never shows the accessibilityLabel); unused on iOS.