Components
Anchor Text
Actionable text link for users to navigate
Component Status Details
Status component contains a list of checks and completeness that has been tested and owned by each component
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.

Variants, Sizes, and States
Legion has 2 variants for Anchor Text:
- Left Icon
- Right Icon
We have three sizes:
- Large Size
- Medium Size
- Small Size
We have two states:
- Active
- Disabled
Usage
The following is code to implement Anchor Text component.
Left Icon
LgnAnchor(text = "Anchor",onClick = { /*TODO*/ },iconLeft = { Icon(imageVector = Icons.Default.DateRange, contentDescription = "icon") })
Right Icon
LgnAnchor(text = "Anchor",onClick = { /*TODO*/ },iconRight = { Icon(imageVector = Icons.Default.DateRange, contentDescription = "icon") })
Sizes
Large Size
LgnAnchor((text = "Large Anchor"),(onClick = {/*TODO*/}),(size = LgnAnchorSize.Large));
Medium Size
LgnAnchor((text = "Small Anchor"),(onClick = {/*TODO*/}),(size = LgnAnchorSize.Medium));
Small Size
LgnAnchor((text = "Small Anchor"),(onClick = {/*TODO*/}),(size = LgnAnchorSize.Small));
States
Active
LgnAnchor((text = "Active Anchor"),(onClick = {/*TODO*/}));
Disabled
LgnAnchor((text = "Disabled Anchor"),(onClick = {/*TODO*/}),(enabled = false));
Attributes
Parameters | Type | Description |
---|---|---|
text | String | Set the text of Anchor |
onClick | Function | Action when Anchor is on Click |
size | LgnAnchorSize | Set size of Anchor by LgnAnchorSize.Large |
enabled | Boolean | Set whether the button can be pressed or not |
iconLeft | Composable | To display left icon |
iconRight | Composable | To display right icon |
colors | LgnAnchorColors | Set the color of the Anchor By LgnAnchorDefaults.colors() |
shape | Shape | Set size of Anchor by LgnAnchorDefaults.shape |
modifier | Modifier | [Modifier] to be applied to the anchor |
interactionSource | MutableInteractionSource | [MutableInteractionSource] representing the source of the interactions |