Links are used to navigate to another page, another section within a page or an external website.
There are 3 supported link sizes: ‘lg’
(default), ‘md’
and ‘sm’
. The large size is recommended for all NUI experiences. Use the size
property to set the appropriate size.
Muted links are an alternate “muted” style of link. Use the muted
property to style a muted link.
Although HTML <a>
elements do not support the disabled
attribute, the disabled
property will style the element to look disabled, will remove the href
attribute and will set an aria-disabled
attribute on the element.
Although semantically different, links and buttons may very well be positioned horizontally relative to each other. Use the matchButtonHeight
property to add additional padding so links are the same height as buttons and line up horizontally.
Property | Type | Default | Description |
---|---|---|---|
children | Node | Renderable content for the link. | |
className | String | Custom classes to be added to the <a> tag. | |
disabled | Boolean | false | Controls whether the link is enabled or disabled. |
href | String | The destination URL for the link. | |
matchButtonHeight | Boolean | false | Provides additional padding so the link match a button’s height of the same size and will line up horizontally. |
muted | Boolean | false | Renders the link in an alternate “muted” style. |
size | String | 'lg' | Link size. Options are 'lg' , 'md' , 'sm' . |
Property | Parameters | Description |
---|---|---|
onClick | event | Callback function for onClick events. |