Get Started
Components
Dev Tools
More Guides
Link
A Link component is a UI element that allows users to navigate from one page or section to another within a web application or website. Typically styled as underlined text or buttons, links provide a clear indication of interactivity. They can point to internal or external resources and often include features like hover effects or icons to enhance user experience and accessibility.
# Demo
This is a sample paragraph with some Link.
This is a sample paragraph with some custom styled Link.
# Attributes
Name | Type | Default | Details |
---|---|---|---|
className | string | ' ' | You can customise by passing tailwind classes. |
children | string | ReactNode | Required | You can pass link content as children. |
href | string | ' ' | You can pass href to render anchor element. |
onClick | () => void | You can get callback when link element clicked. |
# Usage
import { NLink } from 'nayan';
const Link = () => {
return (
<div>
<div className="text-text">
This is a sample paragraph with some <NLink>Link</NLink>.
</div>
<div className="text-text">
This is a sample paragraph with some custom styled <NLink className="text-red-700">Link</NLink>.
</div>
</div>
);
};
export default Link;
# Tags