v1.0.11

Text Link

Installation

Install yarn add @spark-web/text-link
Source GitHub.com
Bundle unpkg.com

NOTE: These components must be nested within a Text or Heading component.

Text links take users to another place in the application, and usually appear within or directly following a sentence. Styled to resemble a hyperlink.

This is some text containing a text link

Examples

Size

The font-size is inherited from the parent Text component.

A text link inheriting the parent's “small” font-size

This component renders a native anchor element by default, which can be customised via the linkComponent prop on the SparkProvider component.

Props

PropTypeDescription

href

string

URL to be used for the link (passed to the underlying anchor element).

data?

DataAttributeMap

Sets data attributes on the component.

The TextLink component also extends native HTML a anchor props and are not listed here.

TextLinkButton

Even though it looks like a text link, this is actually a semantic button.

Visually a link, with button semantics

Props

PropTypeDescription

data?

DataAttributeMap

Sets data attributes on the component.

The TextLinkButton component also extends native HTML span props and are not listed here.

© 2023 Brighte Capital Pty Ltd