Skip to main content

Components

Anchor Text

Actionable text link for users to navigate

banner-Anchor Text
Square Icon

Selected Theme

Select brand or tribe name to preview style

Default

Usage

Anchor text is text that can be clicked and hyperlinked with other sites or pages. The use of anchor text is very important in the world of content marketing because it can increase index and ranking on search engines.

import { Anchor } from 'legion-ui';

Variant

Legion have 3 variant on Anchor text, Basic, Icons and Disable Anchor text

Basic

Anchor text has default size md

Anchor Text
<Anchor>Anchor Text</Anchor>

Icons

You can insert icon in button on the left side & right side iconLeft or iconRight.

Left Icon

Learn More
Learn More
Learn More
<Anchor iconLeft={<DynamicIcon name="ExternalLink" />} size="lg">Learn More</Anchor>
<Anchor iconLeft={<DynamicIcon name="ExternalLink" />} size="md">Learn More</Anchor>
<Anchor iconLeft={<DynamicIcon name="ExternalLink" />} size="sm">Learn More</Anchor>

Right Icon

Learn More
Learn More
Learn More
<Anchor iconRight={<DynamicIcon name="ExternalLink" />} size="lg">Learn More</Anchor>
<Anchor iconRight={<DynamicIcon name="ExternalLink" />} size="md">Learn More</Anchor>
<Anchor iconRight={<DynamicIcon name="ExternalLink" />} size="sm">Learn More</Anchor>

Disabled

Make checkbox look inactive by adding the disabled.

Large
Medium
Small
<Anchor disabled size="lg">Large</Anchor>
<Anchor disabled>Medium</Anchor>
<Anchor disabled size="sm">Small</Anchor>

Attribute

You can customize Anchor with attributes, anchors in legion have only one attribute which is size

Size

You can customise the size of the Anchor via the size prop, which accepts either lg, md, or sm. By default size is md.

Large Size

Anchor Text
<Anchor size="lg">Anchor Text</Anchor>

Medium Size

Anchor Text
<Anchor>Anchor Text</Anchor>

Small Size

Anchor Text
<Anchor size="sm">Anchor Text</Anchor>

Props

propertypropTyperequireddefaultdescription
disabledboolean-falseDisabled state of anchor
iconLeftReact.ReactNode--Add icon to the left side of the anchor
iconRightReact.ReactNode--Add icon to the right side of the anchor
sizesm | md | lg-mdSet the size of anchor
styleobject--The style prop lets you style elements inline