LinkText: React
LinkText is an interactive element that allows users to navigate to a different destination.
Installation
Before you can start using the @mediahuis/chameleon-react
component, you’ll need to install it, for more information check: Getting started for developers.
With that done, you’re now ready to implement the component in your application.
import { LinkText } from '@mediahuis/chameleon-react';
export default function Example() {
return <LinkText>Example</LinkText>;
}
Properties
Property | Type | Default | Required | Description |
---|---|---|---|---|
as | ElementType | 'a' | No | Allows rendering the component with a different HTML tag or a different custom component. |
block | Boolean | - | No | Allows rendering the component as a block element. This will make the component span the full width of its parent. |
children | ReactNode | - | Yes | The contents displayed within the linkText. |
className | String | - | No | Allows extending the class names of the component. |
disabled | Boolean | - | No | Visually and functionally disables the LinkText. |
href | String | - | No | The href of the linkText. |
iconRight | SVGType | - | No | The icon on the right side of the linkText, which can be chosen from the icons package. |
iconRight
The iconRight
property allows you to set an icon to be displayed on the right side of the LinkText
component. You can choose from a variety of icons as outlined in the Icons documentation.