Select to view content in your preferred language

Link in Dropdown

1131
2
Jump to solution
08-09-2021 12:28 PM
Labels (1)
LefterisKoumis
Frequent Contributor

How do you insert a link in a calsite-dropdown-item? 

I tried this:

 

<calcite-dropdown-item>
 <calcite-link href="https://cnn.com" target="_blank">Link text</calcite-link>
</calcite-dropdown-item>

 

and 

 

<calcite-dropdown-item>
 <a href="https://cnn.com" target="_blank">Link text</a>
</calcite-dropdown-item>

 

The mouse works but you cannot click on the link by using the keyboard.

0 Kudos
1 Solution

Accepted Solutions
JohnGrayson
Esri Alum

Check out the storybook for calcite-dropdown; one of the examples is 'Items as Links': 

https://esri.github.io/calcite-components/?path=/story/components-buttons-dropdown--items-as-links

 

View solution in original post

0 Kudos
2 Replies
JohnGrayson
Esri Alum

Check out the storybook for calcite-dropdown; one of the examples is 'Items as Links': 

https://esri.github.io/calcite-components/?path=/story/components-buttons-dropdown--items-as-links

 

0 Kudos
LefterisKoumis
Frequent Contributor

Thank you!

0 Kudos