Tag component - Component API
Here is the API for the component:
- text
string
The text of the tag; or link text when the @route or @href are set.
If no text value is defined an error will be thrown.
- href
This is the URL parameter that is passed down to the
<a>
element.- isHrefExternal
boolean
Default: true
This controls if the
<a>
link is external and so for security reasons we need to add thetarget="_blank"
andrel="noopener noreferrer"
attributes to it.- route/models/model/query/current-when/replace
These are the parameters that are passed down as arguments to the
<LinkTo>
/<LinkToExternal>
components.- isRouteExternal
boolean
Default: false
This controls if the "LinkTo" is external to the Ember engine (more details here) in which case it will use a
<LinkToExternal>
instead of a simple<LinkTo>
for the @route.- color
enum
Sets the color of a link and it is allowed only when @route or @href are set.
Acceptable values:
- primary
- secondary
- onDismiss
function
The tag can be dismissed by the user. When a function is passed, the "dismiss" button is displayed.
- ...attributes
...attributes
spreading is supported on this component.