From 043ced6f00d3b05c48d39f7b8249539bbbfd0f17 Mon Sep 17 00:00:00 2001
From: Lyza Danger Gardner
- Link
is a presentational component for anchor (
- a
) elements. A LinkBase
base presentational
- component is also available.
+ Link
is a presentational component that provides styling
+ and common behavior for anchor (a
) elements.
Link
is a presentational component for styling links.
-
- Click me -
+ A link to a websiteLink
accepts all standard{' '}
+
- color
applies to link text and hovered link text.
-
- - Page notes - {' '} -
+variant
prop instead.
+ color
affects the color of link text
+ (including hover color).
+ {"'brand' | 'text' | 'text-light'"}
+ {"'brand'"}
+ underline
prop is likely
+ to be removed in future and underlining will be controlled with
+ a styling-API prop. This prop is ignored if{' '}
+ unstyled
is set (in which case, no underline
+ styling will be applied).
+ {"'none'"}
, but this will be changing in future.
+ Links inline with text content should set underline
{' '}
+ to {"'always'"}
.
+ {"'none' | 'hover' | 'always'"}
+ {"'none'"}
+ Link
accepts HTML attribute props applicable to{' '}
+ HTMLAnchorElement
.
+ {'preact.JSX.HTMLAttributes'}
+
- By default, Link
s are not underlined. This is
- acceptable when the Link
is a standalone, interactive
- element. Underline on hover is encouraged, however, and{' '}
- Link
s inline with text content should always be
- underlined.
-
+ Link
accepts the following props from the{' '}
+
variant
s affect the color of link text
+ (including hover color). Set to custom
to remove
+ theming styles.
+ {"'brand' | 'text' | 'text-light' | 'custom'"}
+ {"'brand'"}
+ boolean
+ false
+ - Links should be{' '} - - underlined - {' '} - when inline with text content. -
-
- LinkBase
is a base presentational component that
- allows style customization of links.
+ Link
for customized styling instead.
- LinkBase
applies minimal common styling. Turn off all
- styling by setting the unstyled
prop.
+ LinkBase
is a base presentational component that
+ allows style customization of links. LinkBase
applies
+ minimal common styling. Turn off all styling by setting the{' '}
+ unstyled
prop.
- This example shows a LinkBase
with some additional{' '}
- classes
. These classes
are appended to
- the {"component's"} base styling classes.
-
- Set unstyled
to style your link from scratch.{' '}
- Only the classes in classes
are applied.
-