Text Link
Installation
yarn add @spark-web/text-link
NOTE: These components must be nested within a Text or Heading component.
TextLink
Text links take users to another place in the application, and usually appear within or directly following a sentence. Styled to resemble a hyperlink.
Examples
Size
The font-size is inherited from the parent Text component.
Custom link
This component renders a native anchor element by default, which can be
customised via the linkComponent
prop on the SparkProvider component.
Props
Prop | Type | Description |
---|---|---|
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.
Props
Prop | Type | Description |
---|---|---|
data? | DataAttributeMap | Sets data attributes on the component. |
The TextLinkButton
component also extends native HTML span
props and are not
listed here.