Skip to content

Component Tree

RNUI ships 65+ components across three packages. All styled components re-export the headless hooks they wrap, so you can drop down to the behavior layer at any time.

@truongdq01/tokens Primitive → Semantic → Component tokens
@truongdq01/headless ThemeProvider, hooks (usePressable, useField, …)
@truongdq01/ui Styled components (Button, Card, …)
ComponentDescription
BoxThemed container with token-driven padding, margin, and color
StackVStack / HStack with configurable spacing and divider
GridColumn-based responsive grid
PaperElevated surface with shadow and radius tokens
DividerHorizontal or vertical separator line
ComponentVariants
Typographydisplay · h1h6 · body1 · body2 · caption · overline · label · code
ComponentKey Props
Buttonvariant: solid / outline / ghost / destructive / accent · size: sm / md / lg · loading / disabled
ButtonGroupGroup of related buttons
InputleadingElement · trailingElement · focus animation
TextAreaminLines · maxLength · character counter
SelectSearchable bottom-sheet picker · single / multi-select
CheckboxAnimated check / uncheck / indeterminate
Switchsize: sm / md / lg · animated track + thumb
RadioGroupdirection: horizontal / vertical · RadioItem composable
SliderHorizontal · animated thumb · marks · range display
OTPInputConfigurable length · auto-focus management
DatePickeriOS spinner + Android native · time / date / datetime modes
AutocompleteFiltered suggestions with keyboard navigation
SegmentedControlAnimated indicator · scrollable · multi-option
ToggleButtonExclusive or multi-select button group
FormFieldLabel + helper text + error message wrapper
FormControlValidation context + disabled / required propagation
ComponentNotes
Avatar6 sizes (xs–2xl) · image / initials / icon · status dot
AvatarGroupOverlapping stack · max overflow count
Badge6 color variants · icon support · dot / count modes
CardDefault / outlined variants · composable header / content / actions
ChipDeletable · onDelete callback · icon support
List / ListItemDense mode · dividers · swipe actions · leading / trailing elements
AnimatedListFlashList-backed · enter / exit / layout animations
TableSortable columns · pagination · row selection
TimelineVertical step indicator · active / completed / pending states
RatingConfigurable max · half-star support · controlled / uncontrolled
LinearProgressDeterminate / indeterminate · color variants
CircularProgressDeterminate / indeterminate · size / thickness
SkeletonShimmer animation · presets: Text / Card / ListItem / Profile / Media / Form / Grid / Table
EmptyStateTitle + description + icon + action button
ComponentNotes
AppBarSticky top bar · leading / trailing actions · title
BottomNavigationAnimated indicator · icon + label · badge support
TabsScrollable / fixed · animated underline indicator
BreadcrumbsSeparator customization · collapsed overflow
PaginationNumbered pages · prev / next · boundary / sibling control
MenuOverlay menu · dividers · icon items · keyboard navigation
ComponentNotes
Toast / ToastContainer4 variants (success / error / warning / info) · position top / bottom · auto-dismiss · live region
SnackbarBottom-anchored · action button · auto-dismiss
AlertInline feedback · icon · closable · 4 severity levels
DialogModal dialog · title / content / actions · backdrop dismiss
ModalFull overlay · animated entry / exit · scroll support
BottomSheetSnap points · drag handle · backdrop · gesture-driven
DrawerSide panel · left / right · overlay or push mode
PopoverAnchored overlay · arrow · auto-placement
PopperLow-level positioning engine for Popover / Tooltip
TooltipHover / press trigger · auto-placement · accessibility hint
FabFloating action button · extended variant · shadow
SpeedDialExpandable FAB · radial / linear action layout
ComponentNotes
Image (RnImage)Aspect ratio · placeholder · error fallback
ImageListMasonry / grid layout · gap control
CarouselHorizontal pager · loop mode · pagination dots · auto-play ready
ComponentNotes
AccordionAnimated expand / collapse · accessibilityState.expanded
StepperNumeric increment / decrement · min / max / step
GlassCardGlassmorphism surface · expo-blur BlurView (optional) · translucent fallback
GradientToken-driven gradients · expo-linear-gradient (optional) · 6 presets
ComponentNotes
PressablefeedbackMode: scale / scaleSubtle / opacity / highlight / none · haptic feedback
LinkThemed anchor · opens URL via Linking · accessibility role
IconLucide icon wrapper · size + color from tokens

All behavior primitives live in @truongdq01/headless and can be used without the styled layer.

HookPurpose
useThemeAccess current theme, color scheme, brand switching
useTokensShortcut to theme.tokens (SemanticTokens)
useComponentTokensResolved per-component token recipes
useIsDarkBoolean dark-mode check
useActiveBrand / useBrandSwitchMulti-brand runtime switching
usePressableGesture + animated style + accessibility for any touchable
useDisclosureopen / close / toggle state machine
useFieldForm field validation, touched, error state
useCheckboxChecked / unchecked / indeterminate logic
useSwitchOn / off toggle with accessibility
useRadioGroupSingle-select group with keyboard nav
useSliderPan gesture → value mapping, step snapping
useSelectSearchable option list, open/close, selection
useRatingStar selection with half-star and controlled/uncontrolled
useTabsTab index, content switching
useToggleGroupMulti-select button group logic
useAccordionExpand / collapse with animation readiness
useModalOpen / close with backdrop and escape handling
useDrawerSide panel state with gesture support
useBottomSheetSnap point management, drag gesture, backdrop
useCarouselScroll position, pagination, loop logic
useOTPInputHidden input focus routing, cell state
useSegmentedControlSelected index, indicator position
useTableSort, paginate, row selection
useMenuOpen / close, item focus
useDatePickerDate state, mode switching, presets
useTimelineStep state, active / completed tracking
useSkeletonShimmer shared value
usePaginationPage range, boundary, sibling computation
useAutocompleteFilter, select, keyboard navigation
useAlertVisibility, auto-dismiss timer
useBottomNavigationActive tab, badge state
useStepperStep state, increment/decrement
useScrollHeaderScroll-aware header opacity / transform
useListItemSwipe gesture, press state
useReduceMotionEnabledOS-level reduce-motion preference
usePersistedColorSchemeAsyncStorage-backed theme persistence
LayerPackagePurpose
Primitive@truongdq01/tokensRaw values: colors, spacing, radius, typography, gradients
Semantic@truongdq01/tokensDesign intent: color.brand.default, shadow.md, text.xl
Component@truongdq01/tokensPer-component recipes: buttonTokens, cardTokens, etc.
Motion@truongdq01/tokensSpring configs, durations, easing curves, press feedback
Brand@truongdq01/tokensdefineBrand() — runtime color palette switching