Overview
Creates an <a> tag and is appropriate for links that use server-side
routing.
and buttons:
Related
- Buttons and links has an overview and usage guidance
KButtonandKRouterLinkare similar but handle events differentlyKIconButtonhas a tooltip instead of a text labelKButtonGroupis used for button layout
Props
| Name | Description | Type | Default | Required |
|---|---|---|---|---|
text | Button label text | string |
null
| — |
appearance | Button appearance: 'raised-button', 'flat-button', or 'basic-link' | string |
'basic-link'
| — |
appearanceOverrides | Overrides that will modify the styles sent to $computedClass based on appearance prop | object |
{}
| — |
primary | Show as primary rather than secondary style
(for 'raised-button' and 'flat-button' appearance) | boolean |
false
| — |
href | URL string | string |
null
| — |
download | Specifies that the file is meant to be downloaded, not displayed in a separate tab. | boolean |
false
| — |
openInNewTab | If provided, opens link in new tab and displays a "pop out" icon | boolean |
false
| — |
icon | If provided, shows a KIcon in front of the text | string |
null
| — |
iconAfter | If provided, shows a KIcon after the text | string |
null
| — |
Slots
| Name | Description |
|---|---|
icon | Slot alternative to the icon prop |
default | Slot alternative to the icon prop |
iconAfter | Slot alternative to the icon prop |