Consistent typographical components like text and link.
import { Heading, Text } from '@fluxui-dev/react';<Heading>Text component</Heading><Text className="mt-2">This is the standard text component for body copy and general content throughout your application.</Text>
Use standard Tailwind to control the size of the text so that you can more easily adapt to different screen sizes.
<Text className="text-base">Base text size</Text><Text>Default text size</Text><Text className="text-xs">Smaller text</Text>
Use the variant and color props to adjust the text color based on its importance and context.
<Text variant="strong">Strong text color</Text><Text>Default text color</Text><Text variant="subtle">Subtle text color</Text><Text color="blue">Colored text</Text>
Use the link component to create clickable text that navigates to other pages or resources.
import { Link, Text } from '@fluxui-dev/react';<Text>Visit our <Link href="#">documentation</Link> for more information.</Text>
Links can be styled differently based on their context and importance.
<Link href="#">Default link</Link><Link href="#" variant="ghost">Ghost link</Link><Link href="#" variant="subtle">Subtle link</Link>
Pass render={<button type="button" />} to render a link as a button, including type="button" so it does not submit a surrounding form.
<Link render={<button type="button" />}>Create new account →</Link>
|
Prop
|
Description
|
|---|---|
| size |
Size of the text. Options: sm, base, lg, xl. Default: base.
|
| variant |
Text variant. Options: strong, subtle. Default: default.
|
| color |
Color of the text. Options: zinc and gray, which look the same as no color, or red, orange, amber, yellow, lime, green, emerald, teal, cyan, sky, blue, indigo, violet, purple, fuchsia, pink, rose. Default: none, which uses the variant's color.
|
| inline |
If true, the text element will be a span instead of a p.
|
|
Prop
|
Description
|
|---|---|
| href |
The URL that the link points to. An in-app URL navigates through the link registered in FluxProvider.
|
| variant |
Link style variant. Options: default, ghost, subtle. Default: default.
|
| accent |
If true, colors the link with the accent color instead of the default text color. Ignored when variant is subtle. Default: true.
|
| external |
If true, the link will open in a new tab.
|
| render |
Element to render instead of the a tag (such as <button type="button" />), with the link's props merged in. Also accepts a function that receives the props and returns an element.
|