Skip to content

Commit 08f3a2c

Browse files
docs: add docs for "rel" prop
1 parent 5299894 commit 08f3a2c

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

docs/content/2.usage/1.component.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ The component will render by default the following minimal HTML:
4141
href="{share url}"
4242
style="--color-brand: {network brand color};"
4343
aria-label="Share with {network}"
44+
rel="nofollow noopener noreferrer"
4445
target="_blank"
4546
>
4647
<svg class="social-share-button__icon">{...}</svg>
@@ -133,6 +134,14 @@ Comma separated list of hashtags used as a parameter of the sharing URL, in netw
133134

134135
Image path used as a parameter of the sharing URL, in networks that support it. Optional, check the list of [supported networks](/usage/supported-networks).
135136

137+
### `rel`
138+
139+
- Required: `No`
140+
- Type: `String`
141+
- Default: `nofollow noopener noreferrer`
142+
143+
Sets some default values to the `rel` attribute of the link anchor. Customizable if needed, sets by default the [`nofollow`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/rel#nofollow), [`noopener`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/rel#noopener) and [`noreferrer`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/rel#noreferrer) for both SEO and security concerns.
144+
136145
## Slots
137146

138147
::note

src/runtime/SocialShare.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const props = defineProps({
3838
user: { type: String, default: undefined },
3939
hashtags: { type: String, default: undefined },
4040
image: { type: String, default: undefined },
41-
// SEO props
41+
// Link props
4242
rel: { type: String, default: 'nofollow noopener noreferrer' },
4343
})
4444

0 commit comments

Comments
 (0)