runway

Runway

Text Highlight

A text component that can be used to highlight and emphasize text.


Text highlight

This is a text highlight


The TextHighlight component is a text component useful when needing to make some text stand out. It can be used to highlight text in a sentence or paragraph.

You can either do a simple highlight or a gradient highlight.



Usage

javascript

1import TextHighlight from "@/components/atoms/TextHighlight";
2
3<TextHighlight highlight="highlight">
4    This is a text highlight
5</TextHighlight>



Props

NameTypeDefaultDescription
textstring-The text to display.
highlightstring-The text to highlight.
colorstring"gray"The color of the text (see tailwind.config).
fromGradientstring""The color of the gradient from which the text will be highlighted (see tailwind.config).
toGradientstring""The color of the gradient to which the text will be highlighted (see tailwind.config).
textSizestring"text-7xl/18"The text size and line height of the text.
classNamestring""Additional Tailwind classes for the container.
...propsobject-Any other valid <a> attributes (e.g. target, rel, etc.).



Examples

Basic Text Highlight

You can customize the color and textSize of the text.

Text highlight


Gradient Text Highlight

You can customize the fromGradient and toGradient of the text.

Text highlight