Skip to main content

LinkText: React

LinkText is an interactive element that allows users to navigate to a different destination.

Installation

Before you can start using the @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 '@chameleon/react';

export default function Example() {
return <LinkText>Example</LinkText>;
}

Properties

PropertyTypeDefaultRequiredDescription
asElementType'a'NoAllows rendering the component with a different HTML tag or a different custom component.
blockBoolean-NoAllows rendering the component as a block element. This will make the component span the full width of its parent.
childrenReactNode-YesThe contents displayed within the linkText.
classNameString-NoAllows extending the class names of the component.
disabledBoolean-NoVisually and functionally disables the LinkText.
hrefString-NoThe href of the linkText.
iconRightChameleonIcon | ComponentType-NoThe icon on the right side of the linkText. Accepts either an icon name from the icons package or a custom React component.

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.