Text component which is a wrapper around our text-related patterns.>} />
## The `asChild` Prop
Used to compose a component's functionality onto its child element. This
approach, inspired by
[Radix UI](https://www.radix-ui.com/primitives/docs/utilities/slot), offers
maximum flexibility.
```tsx
```
In this example, the `asChild` prop allows the link to be used as the
button (e.g., a button-styled link).
## Best Practices
To avoid common pitfalls when using the `as` and `asChild` props, there are a
few best practices to consider:
- **Forward Refs:** Ensure that the underlying component forwards the ref passed
to it properly.
- **Spread Props:** Ensure that the underlying component spreads the props
passed to it.
### Advanced Usage Example
```tsx
const MyComponent = forwardRef((props, ref) => {
return