@cdx-ui/components 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +24 -0
- package/README.md +2 -0
- package/coverage.svg +1 -1
- package/docs/components/accordion/content.md +538 -0
- package/docs/components/alert/content.md +203 -0
- package/docs/components/alert-dialog/content.md +319 -0
- package/docs/components/avatar/content.md +368 -0
- package/docs/components/avatar/design.md +202 -0
- package/docs/components/badge/content.md +225 -0
- package/docs/components/bottom-sheet/content.md +353 -0
- package/docs/components/bottom-sheet/design.md +249 -0
- package/docs/components/box/content.md +141 -0
- package/docs/components/breadcrumbs/content.md +169 -0
- package/docs/components/button/content.md +398 -0
- package/docs/components/button/design.md +258 -0
- package/docs/components/calendar/content.md +137 -0
- package/docs/components/card/content.md +283 -0
- package/docs/components/carousel/content.md +417 -0
- package/docs/components/checkbox/content.md +236 -0
- package/docs/components/checkbox/design.md +214 -0
- package/docs/components/chip/content.md +439 -0
- package/docs/components/chip/design.md +418 -0
- package/docs/components/color-area/content.md +84 -0
- package/docs/components/color-field/content.md +132 -0
- package/docs/components/color-picker/content.md +209 -0
- package/docs/components/color-slider/content.md +118 -0
- package/docs/components/color-swatch/content.md +62 -0
- package/docs/components/color-swatch-picker/content.md +124 -0
- package/docs/components/content.md +98 -0
- package/docs/components/currency-input/content.md +205 -0
- package/docs/components/data-grid/content.md +521 -0
- package/docs/components/date-field/content.md +147 -0
- package/docs/components/date-picker/content.md +360 -0
- package/docs/components/date-range-picker/content.md +301 -0
- package/docs/components/date-time-field/content.md +157 -0
- package/docs/components/date-time-list/content.md +105 -0
- package/docs/components/date-time-picker/content.md +272 -0
- package/docs/components/dialog/content.md +436 -0
- package/docs/components/dialog/design.md +192 -0
- package/docs/components/divider/content.md +112 -0
- package/docs/components/drawer/content.md +428 -0
- package/docs/components/field/content.md +277 -0
- package/docs/components/form/content.md +62 -0
- package/docs/components/full-screen-dialog/content.md +881 -0
- package/docs/components/heading/content.md +55 -0
- package/docs/components/icon/content.md +190 -0
- package/docs/components/icon-button/content.md +200 -0
- package/docs/components/icon-button/design.md +165 -0
- package/docs/components/image/content.md +104 -0
- package/docs/components/input/content.md +346 -0
- package/docs/components/input/design.md +389 -0
- package/docs/components/insurance-disclosure/content.md +103 -0
- package/docs/components/link/content.md +180 -0
- package/docs/components/link/design.md +160 -0
- package/docs/components/list-item/content.md +695 -0
- package/docs/components/menu/content.md +1254 -0
- package/docs/components/month-calendar/content.md +84 -0
- package/docs/components/month-picker/content.md +273 -0
- package/docs/components/otp-input/content.md +327 -0
- package/docs/components/progress-bar/content.md +87 -0
- package/docs/components/progress-circle/content.md +176 -0
- package/docs/components/progress-segmented/content.md +119 -0
- package/docs/components/quick-action-button/content.md +154 -0
- package/docs/components/quick-action-button/design.md +170 -0
- package/docs/components/radio/content.md +224 -0
- package/docs/components/range-calendar/content.md +123 -0
- package/docs/components/reorderable-list/content.md +311 -0
- package/docs/components/scoped-theme/content.md +47 -0
- package/docs/components/scroll-shadow/content.md +693 -0
- package/docs/components/select/content.md +473 -0
- package/docs/components/select/design.md +301 -0
- package/docs/components/skeleton/content.md +104 -0
- package/docs/components/slider/content.md +423 -0
- package/docs/components/stack/content.md +161 -0
- package/docs/components/switch/content.md +150 -0
- package/docs/components/switch/design.md +208 -0
- package/docs/components/table/content.md +548 -0
- package/docs/components/table-pagination/content.md +177 -0
- package/docs/components/tabs/content.md +297 -0
- package/docs/components/text/content.md +142 -0
- package/docs/components/textarea/content.md +222 -0
- package/docs/components/tile/content.md +702 -0
- package/docs/components/toast/content.md +456 -0
- package/docs/components/toggle-button/content.md +505 -0
- package/docs/components/tooltip/content.md +350 -0
- package/docs/components/virtualized-list/content.md +250 -0
- package/docs/foundations/content.md +9 -0
- package/docs/foundations/expressions/icons/content.md +19 -0
- package/docs/foundations/styles/tokens/all-tokens/content.md +192 -0
- package/docs/foundations/styles/tokens/what-are-tokens/content.md +33 -0
- package/docs/foundations/styles/tokens/what-are-tokens/design.md +33 -0
- package/docs/getting-started/content.md +4 -0
- package/docs/getting-started/designers/content.md +13 -0
- package/docs/getting-started/designers/design.md +13 -0
- package/docs/getting-started/developers/accessibility/content.md +31 -0
- package/docs/getting-started/developers/content.md +612 -0
- package/docs/getting-started/developers/styling/content.md +195 -0
- package/docs/llms.txt +195 -0
- package/docs/patterns/account-management/content.md +75 -0
- package/docs/patterns/authentication/content.md +50 -0
- package/docs/patterns/content.md +10 -0
- package/docs/patterns/dashboard/content.md +34 -0
- package/docs/patterns/empty-states/content.md +32 -0
- package/docs/patterns/forms/content.md +108 -0
- package/docs/patterns/onboarding/content.md +69 -0
- package/docs/patterns/payments/content.md +35 -0
- package/docs/patterns/settings/content.md +72 -0
- package/docs/resources/content.md +9 -0
- package/docs/resources/figma-libraries/content.md +42 -0
- package/docs/resources/release-notes/0.0.1-beta.118/content.md +27 -0
- package/docs/resources/release-notes/0.0.1-beta.122/content.md +21 -0
- package/docs/resources/release-notes/0.0.1-beta.124/content.md +16 -0
- package/docs/resources/release-notes/0.0.1-beta.126/content.md +10 -0
- package/docs/resources/release-notes/0.0.1-beta.127/content.md +14 -0
- package/docs/resources/release-notes/0.0.1-beta.128/content.md +9 -0
- package/docs/resources/release-notes/0.0.1-beta.129/content.md +18 -0
- package/docs/resources/release-notes/0.0.1-beta.130/content.md +18 -0
- package/docs/resources/release-notes/0.0.1-beta.133/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.134/content.md +17 -0
- package/docs/resources/release-notes/0.0.1-beta.136/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.137/content.md +10 -0
- package/docs/resources/release-notes/0.0.1-beta.138/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.139/content.md +13 -0
- package/docs/resources/release-notes/0.0.1-beta.140/content.md +26 -0
- package/docs/resources/release-notes/0.0.1-beta.141/content.md +63 -0
- package/docs/resources/release-notes/0.0.1-beta.142/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.143/content.md +12 -0
- package/docs/resources/release-notes/0.0.1-beta.144/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.145/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.147/content.md +10 -0
- package/docs/resources/release-notes/0.0.1-beta.149/content.md +10 -0
- package/docs/resources/release-notes/0.0.1-beta.150/content.md +13 -0
- package/docs/resources/release-notes/0.0.1-beta.152/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.154/content.md +15 -0
- package/docs/resources/release-notes/0.0.1-beta.156/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.158/content.md +9 -0
- package/docs/resources/release-notes/0.0.1-beta.159/content.md +11 -0
- package/docs/resources/release-notes/0.0.1-beta.160/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.161/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.163/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.164/content.md +9 -0
- package/docs/resources/release-notes/0.0.1-beta.166/content.md +17 -0
- package/docs/resources/release-notes/0.0.1-beta.167/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.168/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.169/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.171/content.md +16 -0
- package/docs/resources/release-notes/0.0.1-beta.172/content.md +24 -0
- package/docs/resources/release-notes/0.0.1-beta.173/content.md +15 -0
- package/docs/resources/release-notes/0.0.1-beta.174/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.176/content.md +32 -0
- package/docs/resources/release-notes/0.0.1-beta.179/content.md +11 -0
- package/docs/resources/release-notes/0.0.1-beta.182/content.md +13 -0
- package/docs/resources/release-notes/0.0.1-beta.185/content.md +7 -0
- package/docs/resources/release-notes/0.0.1-beta.187/content.md +27 -0
- package/docs/resources/release-notes/0.1.1/content.md +23 -0
- package/docs/resources/release-notes/0.1.2/content.md +7 -0
- package/docs/resources/release-notes/0.1.4/content.md +19 -0
- package/docs/resources/release-notes/0.1.5/content.md +7 -0
- package/docs/resources/release-notes/0.1.6/content.md +7 -0
- package/docs/resources/release-notes/0.2.0/content.md +31 -0
- package/docs/resources/release-notes/0.2.1/content.md +17 -0
- package/docs/resources/release-notes/0.2.2/content.md +11 -0
- package/docs/resources/release-notes/0.2.3/content.md +15 -0
- package/docs/resources/release-notes/0.2.4/content.md +17 -0
- package/docs/resources/release-notes/content.md +65 -0
- package/lib/commonjs/components/Box/Box.js +9 -1
- package/lib/commonjs/components/Box/Box.js.map +1 -1
- package/lib/commonjs/components/Breadcrumbs/index.js +28 -3
- package/lib/commonjs/components/Breadcrumbs/index.js.map +1 -1
- package/lib/commonjs/components/Breadcrumbs/styles.js +27 -0
- package/lib/commonjs/components/Breadcrumbs/styles.js.map +1 -1
- package/lib/commonjs/components/DateTimeList/index.js +11 -26
- package/lib/commonjs/components/DateTimeList/index.js.map +1 -1
- package/lib/commonjs/components/DateTimeList/styles.js +2 -12
- package/lib/commonjs/components/DateTimeList/styles.js.map +1 -1
- package/lib/commonjs/components/ListItem/index.js.map +1 -1
- package/lib/commonjs/components/ListItem/styles.js +2 -1
- package/lib/commonjs/components/ListItem/styles.js.map +1 -1
- package/lib/commonjs/components/Menu/index.js +11 -5
- package/lib/commonjs/components/Menu/index.js.map +1 -1
- package/lib/commonjs/components/ScrollShadow/gradient.js +29 -0
- package/lib/commonjs/components/ScrollShadow/gradient.js.map +1 -0
- package/lib/commonjs/components/ScrollShadow/index.js +171 -44
- package/lib/commonjs/components/ScrollShadow/index.js.map +1 -1
- package/lib/commonjs/components/ScrollShadow/styles.js +58 -14
- package/lib/commonjs/components/ScrollShadow/styles.js.map +1 -1
- package/lib/commonjs/components/ScrollShadow/useComposedScrollHandler.js +63 -0
- package/lib/commonjs/components/ScrollShadow/useComposedScrollHandler.js.map +1 -0
- package/lib/commonjs/components/ScrollShadow/useScrollShadow.js +48 -8
- package/lib/commonjs/components/ScrollShadow/useScrollShadow.js.map +1 -1
- package/lib/commonjs/components/Stack/HStack.js +6 -2
- package/lib/commonjs/components/Stack/HStack.js.map +1 -1
- package/lib/commonjs/components/Stack/VStack.js +6 -2
- package/lib/commonjs/components/Stack/VStack.js.map +1 -1
- package/lib/commonjs/components/Tabs/index.js +16 -23
- package/lib/commonjs/components/Tabs/index.js.map +1 -1
- package/lib/commonjs/components/Tabs/styles.js +1 -10
- package/lib/commonjs/components/Tabs/styles.js.map +1 -1
- package/lib/commonjs/figma/ListItem.SectionHeader.figma.js +20 -5
- package/lib/commonjs/figma/ListItem.SectionHeader.figma.js.map +1 -1
- package/lib/commonjs/index.js +10 -10
- package/lib/commonjs/index.js.map +1 -1
- package/lib/module/components/Box/Box.js +9 -1
- package/lib/module/components/Box/Box.js.map +1 -1
- package/lib/module/components/Breadcrumbs/index.js +29 -4
- package/lib/module/components/Breadcrumbs/index.js.map +1 -1
- package/lib/module/components/Breadcrumbs/styles.js +26 -0
- package/lib/module/components/Breadcrumbs/styles.js.map +1 -1
- package/lib/module/components/DateTimeList/index.js +12 -27
- package/lib/module/components/DateTimeList/index.js.map +1 -1
- package/lib/module/components/DateTimeList/styles.js +1 -11
- package/lib/module/components/DateTimeList/styles.js.map +1 -1
- package/lib/module/components/ListItem/index.js.map +1 -1
- package/lib/module/components/ListItem/styles.js +2 -1
- package/lib/module/components/ListItem/styles.js.map +1 -1
- package/lib/module/components/Menu/index.js +11 -5
- package/lib/module/components/Menu/index.js.map +1 -1
- package/lib/module/components/ScrollShadow/gradient.js +24 -0
- package/lib/module/components/ScrollShadow/gradient.js.map +1 -0
- package/lib/module/components/ScrollShadow/index.js +170 -48
- package/lib/module/components/ScrollShadow/index.js.map +1 -1
- package/lib/module/components/ScrollShadow/styles.js +57 -13
- package/lib/module/components/ScrollShadow/styles.js.map +1 -1
- package/lib/module/components/ScrollShadow/useComposedScrollHandler.js +57 -0
- package/lib/module/components/ScrollShadow/useComposedScrollHandler.js.map +1 -0
- package/lib/module/components/ScrollShadow/useScrollShadow.js +46 -8
- package/lib/module/components/ScrollShadow/useScrollShadow.js.map +1 -1
- package/lib/module/components/Stack/HStack.js +6 -2
- package/lib/module/components/Stack/HStack.js.map +1 -1
- package/lib/module/components/Stack/VStack.js +6 -2
- package/lib/module/components/Stack/VStack.js.map +1 -1
- package/lib/module/components/Tabs/index.js +17 -24
- package/lib/module/components/Tabs/index.js.map +1 -1
- package/lib/module/components/Tabs/styles.js +0 -9
- package/lib/module/components/Tabs/styles.js.map +1 -1
- package/lib/module/figma/ListItem.SectionHeader.figma.js +20 -5
- package/lib/module/figma/ListItem.SectionHeader.figma.js.map +1 -1
- package/lib/module/index.js +6 -1
- package/lib/module/index.js.map +1 -1
- package/lib/typescript/animation/hooks/usePopupDialogContentAnimation.d.ts +2 -2
- package/lib/typescript/animation/hooks/usePopupOverlayAnimation.d.ts +2 -2
- package/lib/typescript/components/Box/Box.d.ts +4 -0
- package/lib/typescript/components/Box/Box.d.ts.map +1 -1
- package/lib/typescript/components/Breadcrumbs/index.d.ts +3 -1
- package/lib/typescript/components/Breadcrumbs/index.d.ts.map +1 -1
- package/lib/typescript/components/Breadcrumbs/styles.d.ts +2 -0
- package/lib/typescript/components/Breadcrumbs/styles.d.ts.map +1 -1
- package/lib/typescript/components/DateTimeList/index.d.ts.map +1 -1
- package/lib/typescript/components/DateTimeList/styles.d.ts +1 -4
- package/lib/typescript/components/DateTimeList/styles.d.ts.map +1 -1
- package/lib/typescript/components/ListItem/index.d.ts +5 -4
- package/lib/typescript/components/ListItem/index.d.ts.map +1 -1
- package/lib/typescript/components/ListItem/styles.d.ts +1 -1
- package/lib/typescript/components/ListItem/styles.d.ts.map +1 -1
- package/lib/typescript/components/Menu/index.d.ts.map +1 -1
- package/lib/typescript/components/ScrollShadow/gradient.d.ts +7 -0
- package/lib/typescript/components/ScrollShadow/gradient.d.ts.map +1 -0
- package/lib/typescript/components/ScrollShadow/index.d.ts +57 -15
- package/lib/typescript/components/ScrollShadow/index.d.ts.map +1 -1
- package/lib/typescript/components/ScrollShadow/styles.d.ts +8 -2
- package/lib/typescript/components/ScrollShadow/styles.d.ts.map +1 -1
- package/lib/typescript/components/ScrollShadow/useComposedScrollHandler.d.ts +13 -0
- package/lib/typescript/components/ScrollShadow/useComposedScrollHandler.d.ts.map +1 -0
- package/lib/typescript/components/ScrollShadow/useScrollShadow.d.ts +15 -2
- package/lib/typescript/components/ScrollShadow/useScrollShadow.d.ts.map +1 -1
- package/lib/typescript/components/Stack/HStack.d.ts +3 -2
- package/lib/typescript/components/Stack/HStack.d.ts.map +1 -1
- package/lib/typescript/components/Stack/VStack.d.ts +3 -2
- package/lib/typescript/components/Stack/VStack.d.ts.map +1 -1
- package/lib/typescript/components/Tabs/index.d.ts.map +1 -1
- package/lib/typescript/components/Tabs/styles.d.ts +0 -7
- package/lib/typescript/components/Tabs/styles.d.ts.map +1 -1
- package/lib/typescript/components/Toast/animation.d.ts +3 -3
- package/lib/typescript/components/Toast/animation.d.ts.map +1 -1
- package/lib/typescript/figma/ListItem.SectionHeader.figma.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +6 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/package.json +11 -9
- package/src/components/Box/Box.tsx +18 -4
- package/src/components/Breadcrumbs/index.tsx +28 -4
- package/src/components/Breadcrumbs/styles.ts +30 -0
- package/src/components/DateTimeList/index.tsx +13 -26
- package/src/components/DateTimeList/styles.ts +1 -10
- package/src/components/ListItem/index.tsx +5 -4
- package/src/components/ListItem/styles.ts +1 -0
- package/src/components/Menu/index.tsx +11 -8
- package/src/components/ScrollShadow/gradient.ts +48 -0
- package/src/components/ScrollShadow/index.tsx +300 -69
- package/src/components/ScrollShadow/styles.ts +45 -28
- package/src/components/ScrollShadow/useComposedScrollHandler.ts +58 -0
- package/src/components/ScrollShadow/useScrollShadow.ts +72 -10
- package/src/components/Stack/HStack.tsx +8 -4
- package/src/components/Stack/VStack.tsx +8 -4
- package/src/components/Tabs/index.tsx +25 -35
- package/src/components/Tabs/styles.ts +0 -9
- package/src/index.ts +8 -1
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Link — Design (https://design.candescent.com/docs/components/link)
|
|
2
|
+
|
|
3
|
+
## Usage
|
|
4
|
+
|
|
5
|
+
**Example**
|
|
6
|
+
|
|
7
|
+
**Common alternative names**: Hyperlink, URL
|
|
8
|
+
|
|
9
|
+
## Anatomy
|
|
10
|
+
|
|
11
|
+
A Link is made up of link text and optional icons. The clickable area follows the text (and icons), unless your implementation expands the hit target for accessibility.
|
|
12
|
+
|
|
13
|
+
**Anatomy\_link**
|
|
14
|
+
|
|
15
|
+
1. **Link text:** The visible label that describes where the user will go. Follow the label and content guidelines below.
|
|
16
|
+
2. **Underline:** The line treatment that supports affordance and focus. It works together with color and focus styles so users can recognize the control and understand where it leads.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
Usage
|
|
21
|
+
|
|
22
|
+
Use a **Link** when you want someone to **go somewhere**: another page, another site, another section on the same page, or a resource that opens in another app (for example, mail or phone).
|
|
23
|
+
|
|
24
|
+
### When to use
|
|
25
|
+
|
|
26
|
+
> [!TIP]
|
|
27
|
+
>
|
|
28
|
+
> **When the user should navigate to another destination**
|
|
29
|
+
>
|
|
30
|
+
> - ex: Open a different page or URL in the product.
|
|
31
|
+
> - ex: Open an external website, PDF, or help article.
|
|
32
|
+
|
|
33
|
+
> [!TIP]
|
|
34
|
+
>
|
|
35
|
+
> **When the user should jump within the same page**
|
|
36
|
+
>
|
|
37
|
+
> - ex: Anchor link to a lower section (“Jump to billing”).
|
|
38
|
+
> - ex: Return to top or to a named heading on long content.
|
|
39
|
+
|
|
40
|
+
> [!TIP]
|
|
41
|
+
>
|
|
42
|
+
> **When the user should open another app via a protocol**
|
|
43
|
+
>
|
|
44
|
+
> - ex: `mailto:` for email.
|
|
45
|
+
> - ex: `tel:` for phone.
|
|
46
|
+
|
|
47
|
+
### **When not to use**
|
|
48
|
+
|
|
49
|
+
> [!CAUTION]
|
|
50
|
+
>
|
|
51
|
+
> **For actions that complete work on the current screen**
|
|
52
|
+
>
|
|
53
|
+
> - ex: Submit, Save, Delete (without navigating away as the main intent).
|
|
54
|
+
> - ex: Open a dialog, menu, or drawer that acts on the current context.
|
|
55
|
+
> - Instead, consider using a [Button](https://design.candescent.com/docs/components/button/content.md) component.
|
|
56
|
+
|
|
57
|
+
> [!CAUTION]
|
|
58
|
+
>
|
|
59
|
+
> **When a control should match primary button hierarchy**
|
|
60
|
+
>
|
|
61
|
+
> - ex: The single most important next step in a flow (“Continue,” “Pay now”).
|
|
62
|
+
> - ex: Destructive confirmation where the pattern is a [Button](https://design.candescent.com/docs/components/button/content.md), not body copy.
|
|
63
|
+
|
|
64
|
+
> [!CAUTION]
|
|
65
|
+
>
|
|
66
|
+
> **When the UI is main application navigation**
|
|
67
|
+
>
|
|
68
|
+
> - ex: Primary nav, tabs, or menus built for wayfinding → use the navigation pattern or component, not ad hoc links.
|
|
69
|
+
|
|
70
|
+
### Link color
|
|
71
|
+
|
|
72
|
+
Most links should use the color.content.link color token. This color helps links be easily recognizable to users, especially as they are quickly scanning content. Links should read as an obvious destination—especially outside dense body copy (cards, footers, helper rows).
|
|
73
|
+
|
|
74
|
+
- **Do:** Use the link color token for a single prominent “Schedule a demo” style link when it is the main affordance in that module.
|
|
75
|
+
- **Don't:** Don’t apply link styling to multiple sentences. Only link the shortest, most descriptive phrase, such as “Contact us” or “Book a demo.”
|
|
76
|
+
|
|
77
|
+
### Link versus ghost button
|
|
78
|
+
|
|
79
|
+
**Ghost** **buttons** can look like links. Use **Link** for navigation semantics; use **Button** when the user performs an action **without** treating it as “go to a URL.”
|
|
80
|
+
|
|
81
|
+
- **Do:** Use a button for actions like cancelling a task to clearly communicate that the action will trigger a change.
|
|
82
|
+
- **Don't:** Don’t use link styling for actions like cancelling a task, as links imply navigation rather than an action.
|
|
83
|
+
|
|
84
|
+
### Links in lists and paragraphs
|
|
85
|
+
|
|
86
|
+
Lists inside running copy are a common place for **Link**. The goal is to keep each line **easy to scan** and each destination **obvious on its own**, including when people navigate by links (keyboard or screen reader) or tap on mobile.
|
|
87
|
+
|
|
88
|
+
- **Do:** Put the link on the shortest phrase that still describes the destination for that list item so the line reads clearly with or without surrounding context.
|
|
89
|
+
- **Don't:** Don’t repeat generic link labels on every row (“Details,” “Here,” “More”)—out of context every link sounds the same, and the list becomes hard to use for assistive technology users and for quick scanning on small screens.
|
|
90
|
+
|
|
91
|
+
### Layout and placement
|
|
92
|
+
|
|
93
|
+
The primary path forward on a surface (e.g. continue, save, confirm) should usually be a [Button](https://design.candescent.com/docs/components/button/content.md). **Links** support **navigation** or **reference** (help, policy, learn more) and sit **lower in the hierarchy** than that primary action.
|
|
94
|
+
|
|
95
|
+
_usage\_text\_01-ex_
|
|
96
|
+
|
|
97
|
+
### Breakpoints
|
|
98
|
+
|
|
99
|
+
A Link’s width comes from **typography and layout**, not from fixed control widths like a Button. **Inline** links wrap with the surrounding text as the container narrows; **standalone** links span the content column and wrap like a line of copy unless your pattern constrains them.
|
|
100
|
+
|
|
101
|
+
- **Mobile**
|
|
102
|
+
|
|
103
|
+
Within the Mobile breakpoint (width \< 600px), links should wrap naturally with surrounding text as the container narrows, ensuring readability without truncation or overflow.
|
|
104
|
+
- **Desktop**
|
|
105
|
+
|
|
106
|
+
Within the larger breakpoint (width ≥ 600px), links should remain inline with surrounding text and only wrap when constrained by the layout or container width.
|
|
107
|
+
|
|
108
|
+
On **narrow** viewports, plan for **multi-line** link labels: underlines and focus rings should follow the **full wrapped shape**, and tap targets for standalone links should stay comfortable when lines break. In **wide** layouts, links behave the same semantically, only the **measure** and **wrapping** change.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Behavior
|
|
113
|
+
|
|
114
|
+
### Interaction states
|
|
115
|
+
|
|
116
|
+
By default, a Link is interactive. Visual feedback is applied consistently across touch, pointer, and keyboard interactions. **Underline behavior** is controlled by the underline prop and appears in response to the relevant interaction state, such as focus or hover.
|
|
117
|
+
|
|
118
|
+
- **Resting**
|
|
119
|
+
|
|
120
|
+
Default appearance when the link is not hovered or focused.
|
|
121
|
+
- **Hover**
|
|
122
|
+
|
|
123
|
+
Pointer is over the link’s interactive target (including expanded hit area if you use one).
|
|
124
|
+
- **Focus**
|
|
125
|
+
|
|
126
|
+
Keyboard focus is on the link; the **focus indicator** must be visible and meet CDS focus guidance.
|
|
127
|
+
|
|
128
|
+
### Visited
|
|
129
|
+
|
|
130
|
+
When a user has opened a link’s destination in this browsing context, the browser marks it as **visited**, and the **Link** component applies **visited** styling automatically, using the color.content.link-visited color token so teams don’t need to wire this behavior manually.
|
|
131
|
+
|
|
132
|
+
- **visited**
|
|
133
|
+
|
|
134
|
+
The destination has been opened in this browsing context per browser history / your routing rules.
|
|
135
|
+
|
|
136
|
+
## Content
|
|
137
|
+
|
|
138
|
+
## Link text
|
|
139
|
+
|
|
140
|
+
Screen readers can scan a page for links and read them aloud independent of their context. For this reason, ensure that link text is purposeful and descriptive of the link destination. Avoid generic phrases like "learn more" and "here".
|
|
141
|
+
|
|
142
|
+
| **Example** | **Read aloud by screen reader** |
|
|
143
|
+
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- |
|
|
144
|
+
| ✅ _Reimagine your account opening, digital banking and branch experiences with our integrated digital-first solutions._ _[Explore digital banking](https://cds-docs.d3vcloud.com/foundations/content-design/writing-for-all#)\*\*._ | ✅ _“Explore digital banking”_ |
|
|
145
|
+
| ❌ _Reimagine your account opening, digital banking and branch experiences with our integrated digital-first solutions._ _[Learn more](https://cds-docs.d3vcloud.com/foundations/content-design/writing-for-all#)\*\*._ | ❌ _“Learn more”_ |
|
|
146
|
+
| ❌ _Reimagine your account opening, digital banking and branch experiences with our integrated digital-first solutions. Click_ _[here](https://cds-docs.d3vcloud.com/foundations/content-design/writing-for-all#)_ _to learn more._ | ❌ _“here”_ |
|
|
147
|
+
|
|
148
|
+
Additionally, link text should be in sentence case.
|
|
149
|
+
|
|
150
|
+
- ✅ Interested in learning more? [Schedule a demo](https://www.candescent.com/contact).
|
|
151
|
+
- ❌ Interested in learning more? [Schedule a Demo](https://www.candescent.com/contact).
|
|
152
|
+
- ❌ Interested in learning more? [schedule a demo](https://www.candescent.com/contact).
|
|
153
|
+
|
|
154
|
+
## URLs as link text
|
|
155
|
+
|
|
156
|
+
Links should typically be written in plain text that describes the link's destination. However, if you must to write out a URL, don't include `www.`, `http://`, or other protocol information in the link label.
|
|
157
|
+
|
|
158
|
+
- ✅ Visit [candescent.com](https://www.candescent.com/) for more information.
|
|
159
|
+
- ❌ Visit [www.candescent.com](https://www.candescent.com/) for more information.
|
|
160
|
+
- ❌ Visit [https://www.candescent.com/](https://www.candescent.com/) for more information.
|