gluestack-ui logopreview
Docs
Blog
Get Updates
Prompt to React Native
IntroductionQuick Start
InstallationTooling SetupVS Code ExtensionsFigma UI KitCLIgluestack-ui-nativewind-utils
AccessibilityUniversal
Benchmarks
Default TokensCustomizing ThemeDark Mode
All Components
HeadingrscTextrsc
BoxrscCenterrscDividerHStackrscVStackrscGridalpha, rsc
AlertProgressSpinnerToast
BadgeCardrscTablealphaTabsalpha
ButtonCheckboxDateTimePickerCalendarFormControlInputLinkPressableRadioSelectSliderSwitchTextarea
AlertDialogDrawerLiquid GlassMenuModalPopoverPortalTooltipImage Viewer
ActionsheetAccordionBottomSheetalpha
AvatarImageIconrsc
FabSkeletonalpha, rsc
useBreakPointValueuseMediaQuery
Dashboard AppKitchensink AppTodo AppStarter KitAppLighter
LinearGradient
Building Ecommerce App
Upgrade to v2Upgrade to v3Upgrade to v4FAQsReleasesChangelogRoadmapTroubleshootingDiscord FAQs

@gluestack-ui/utils

@gluestack-ui/utils
provides a collection of utility functions for seamless integration of gluestack-ui and nativewind.

tva (Tailwind Variant Authority)

The
tva
function serves as a wrapper around
Tailwind Variant
, extending its functionality.
In addition to the default Tailwind variant, it introduces support for
parentVariant
and
parentCompoundVariant
.

VariantProps Utility

The
VariantProps
utility allows for easy extraction of variants from a component.

flush

This function facilitates server-side rendering (SSR) by flushing out any styles generated during the process. This ensures that these styles are properly added to the HTML document.

withStates

withStates
is a Higher Order Component (HOC) designed to incorporate state-based styling into gluestack-ui components on native devices.

withStyleContext

withStyleContext
is a HOC that creates a React context with a defined scope.

withStyleContextAndStates

This single HOC combines the functionality of both
withStyleContext
and
withStates
.

useStyleContext

useStyleContext
is a hook used to consume the context created by
withStyleContext
and
withStyleContextAndStates
.
Edit this page on GitHub
Go backCLI
Up nextAccessibility
Go backCLI
Up nextAccessibility