React Native
32 components for React Native and Expo, built from the same tokens as the web package. Each page has an example, the props generated from the TypeScript source, and notes on how VoiceOver and TalkBack read it. The examples aren't live here, since the components render natively: every one is type-checked and rendered in the package's tests.
npm i @stylhero/native
Theme
Core
- TextThemed text. Headings get the "header" role so screen readers can jump between them, and cap font scaling at 1.5x so big titles don't overflow; body text scales up to 2x with the user's font size setting.
- StackFlex layout with token-based gaps.
- ButtonPressable with a text label:
primaryfor the main action on a screen,secondary,ghost, ordangerfor destructive ones. Always at least 44×44pt to touch, and the label wraps at large text sizes. - IconButtonSquare button holding only an icon. Always at least 44pt to touch.
- BadgeSmall status label, e.g. "Compatible" or "Out of stock".
- CardSurface that groups related content, with an optional title, subtitle, top-right action and footer. With
onPressthe whole card is one button. - ListItemOne row of a list. Read by screen readers as a single element, so a row like "RTX 4070, 12 GB, $549" is one swipe instead of three.
- AvatarRound photo or initials for a person, team or product.
- DividerHairline separator. Decorative, so screen readers skip it.
Feedback
- SpinnerThemed loading indicator, announced as a busy progress bar named by
label. - ProgressBarLinear progress. Reports its value to screen readers; the indeterminate bar respects Reduce Motion.
- SkeletonPlaceholder shape shown while content loads. Hidden from screen readers: put a Spinner or an accessibilityLabel="Loading" on the area around the skeletons so the loading state is still announced. Stops pulsing under Reduce Motion.
- AlertInline message about the screen or the last action.
- EmptyStatePlaceholder for an empty list or a search with no results. The title is a heading.
- ToastProviderPut it once near the root (inside ThemeProvider), then call
useToast().show().
Inputs
- TextFieldText input with a visible label, a hint or error under it, and optional leading / trailing content (an icon or a unit). Errors are announced to screen readers when they appear.
- TextareaMulti-line text field: same label, hint and error behavior as
TextField, a taller input that starts at the top, and an optional character count. - NumberInputNumber field with − and + buttons. Typing is free; the value is kept within
min/maxwhen the field loses focus. The buttons say what they change ("Increase Quantity") and the new value is announced after each step. - SelectPick one option from a list too long for radios or a segmented control. The field opens a bottom sheet of options; choosing one closes it and puts screen reader focus back on the field, which reads the new value.
- DatePickerPick a day from a calendar. The field opens a bottom sheet with one month at a time; every day is a button named with its full date ("Tuesday, December 1, 2026"), and the month heading is announced when it changes. Choosing a day closes the sheet and puts screen reader focus back on the field.
- SliderPick a number in a range by dragging. Screen reader users swipe up or down to change it (the "adjustable" role), and hear the formatted value. The whole 44pt-high row takes touches, so the thumb doesn't need to be hit exactly.
- SwitchOn/off setting that takes effect right away (use Checkbox inside forms that are submitted). Looks the same on iOS and Android, is announced as a switch with its state, and mirrors in right-to-left layouts.
- CheckboxCheckbox with its label. The whole row is the touch target (at least 44pt high).
- RadioGroupPick one of a few options. Every option is at least 44pt high and says its position ("2 of 3").
- ChipCompact filter, choice or tag. Selected chips are announced as selected.
- SegmentedControlSwitches between views of the same content (the mobile form of Tabs). Announced as tabs with the selected one marked, at least 44pt high.
Navigation
- TabsA row of tabs with an underline on the selected one, and the selected tab's content below. Use it for sections of one screen; for two to five views of the same content,
SegmentedControlis lighter. Tabs say their position ("tab, 2 of 4"); a scrollable bar keeps the selected tab in view. - AccordionSections that open and close under their title. Each title row is a button that says whether it's expanded; closed content isn't rendered, so screen readers skip it. Opens without animation under Reduce Motion.
- StepperWhere you are in a multi-step flow. The position is read as one phrase ("Step 2 of 4: Games") and announced politely when it changes.
Overlays
- DialogCentered modal dialog. Screen readers stay inside it while it's open, and the title is read first.
- BottomSheetPanel that slides up from the bottom for options or a short task. Drag it down or tap outside to close; screen reader users activate the handle, press back, or use the escape gesture. Opens without motion under Reduce Motion.