gluestack-ui logo
Get Updates
Prompt to React Native UI
Home
Components
Hooks
Apps
MCP Server
Guides
Home
Overview
IntroductionQuick Start
Getting Started
InstallationTooling SetupVS Code ExtensionsFigma UI KitCLIgluestack-ui-nativewind-utils
Core Concepts
AccessibilityUniversal
Performance
Benchmarks
Theme Configuration
Default TokensCustomizing ThemeDark Mode
Components
All Components
Typography
HeadingrscTextrsc
Layout
BoxrscCenterrscDividerHStackrscVStackrscGridalpha, rsc
Feedback
AlertProgressSpinnerToast
Data Display
BadgeCardrscTablealpha
Forms
ButtonCheckboxFormControlInputLinkPressableRadioSelectSliderSwitchTextarea
Overlay
AlertDialogDrawerMenuModalPopoverPortalTooltip
Disclosure
ActionsheetAccordionBottomSheetalpha
Media And Icons
AvatarImageIconrsc
Others
FabSkeletonalpha, rsc
Hooks
useBreakPointValue
useMediaQuery
Apps
Dashboard App
Kitchensink App
Todo App
Starter Kit
MCP Server
MCP Server
Guides
Recipes
LinearGradient
Tutorials
Building Ecommerce App
More
Upgrade to v2Upgrade to v3FAQsReleasesRoadmapTroubleshootingDiscord FAQs

Heading

Explore the gluestack-ui Heading Component with installation steps, API reference, and usage examples. Customize React Native headings with different sizes and styles easily for your projects. This is an illustration of Heading component.

Installation

Run the following command:

npx gluestack-ui add heading

API Reference

To use this component in your project, include the following import statement in your file.
import { Heading } from '@/components/ui/heading';
export default () => <Heading />;

Component Props

This section provides a comprehensive reference list for the component props, detailing descriptions, properties, types, and default behavior for easy project integration.

Heading

Heading renders a heading element with a range of sizes and semantic meanings. It offers a variety of props to customize the appearance of the heading.
SizeWeb ElementNative (@expo-html/elements)
5xl, 4xl, 3xl
<h1 />
H1
2xl
<h2 />
H2
xl
<h3 />
H3
lg
<h4 />
H4
md
<h5 />
H5
sm, xs
<h6 />
H6

Props

Heading

Heading component is created using Heading component from @expo/html-elements on native. It extends all the props supported by Expo HTML Heading Elements and the props mentioned below.
NameValueDefault
isTruncated
true | falsefalse
bold
true | falsefalse
underline
true | falsefalse
strikeThrough
true | falsefalse
sub
true | falsefalse
italic
true | falsefalse
highlight
true | falsefalse
size
5xl | 4xl | 3xl | 2xl | xl | lg | md | sm | xsmd

Examples

The Examples section provides visual representations of the different variants of the component, allowing you to quickly and easily determine which one best fits your needs. Simply copy the code and integrate it into your project.

Heading Sizes

Heading component offers a range of sizes, including
xs
,
sm
,
md
,
lg
,
xl
,
2xl
,
3xl
,
4xl
, and
5xl
, allowing users to customize the size of the heading according to their design requirements.
Edit this page on GitHub
Go backAll Components
Up nextText
Go backAll Components
Up nextText