A consistent heading component for your application.
import { Heading, Text } from '@fluxui-dev/react';<Heading>User profile</Heading><Text className="mt-2">This information will be displayed publicly.</Text>
Flux offers four different heading sizes that should cover most use cases in your app.
<Heading>Default</Heading><Heading size="lg">Large</Heading><Heading size="xl">Extra large</Heading><Heading size="2xl">Extra extra large</Heading>
Control the heading level: h1, h2, h3, that will be used for the heading element. Without a level prop, the heading will default to a div.
<Heading level={3}>User profile</Heading><Text className="mt-2">This information will be displayed publicly.</Text>
Subheadings can be placed above headings for a more interesting arrangment.
import { ArrowTrendingUpIcon } from '@fluxui-dev/react/icons';<div> <Text>Year to date</Text> <Heading size="xl" className="mb-1">$7,532.16</Heading> <div className="flex items-center gap-2"> <ArrowTrendingUpIcon variant="micro" className="text-green-600 dark:text-green-500" /> <span className="text-sm text-green-600 dark:text-green-500">15.2%</span> </div></div>
|
Prop
|
Description
|
|---|---|
| size |
Size of the heading. Options: base, lg, xl, 2xl. Default: base.
|
| level |
HTML heading level. Options: 1, 2, 3, 4. Default: renders as a div if not specified.
|
| accent |
If true, applies accent color styling to the heading.
|