npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@xsolla/xui-link

v0.159.0

Published

An accessible inline link. Renders an `<a>` element with theme-aware colour, optional underline, and automatic security attributes for external targets.

Readme

Link

An accessible inline link. Renders an <a> element with theme-aware colour, optional underline, and automatic security attributes for external targets.

Installation

npm install @xsolla/xui-link

Imports

import { Link } from '@xsolla/xui-link';

Quick start

import * as React from 'react';
import { Link } from '@xsolla/xui-link';

export default function Example() {
  return <Link href="https://example.com">Visit Example</Link>;
}

API Reference

<Link>

| Prop | Type | Default | Description | | --- | --- | --- | --- | | children | ReactNode | - | Link content. | | href | string | - | Destination URL. Cleared when disabled. | | onClick | () => void | - | Click handler. When provided, preventDefault() is called before invoking — browser navigation via href is suppressed, so handle navigation yourself (e.g. router push). href remains on the <a> for right-click and assistive tech. | | target | string | - | Anchor target (e.g. '_blank'). When '_blank', rel="noopener noreferrer" is added automatically and merged with any caller-supplied rel. | | rel | string | - | Additional rel tokens. | | size | 'sm' \| 'md' \| 'lg' | 'md' | Font size preset (12/14/16px). | | underline | boolean | false | Underline the text. | | disabled | boolean | false | Removes href, sets tabIndex={-1}, and shows not-allowed cursor. | | color | string | theme control.link.primary | Custom text colour (ignored when disabled). | | testID | string | - | Test identifier. |

Inherits ThemeOverrideProps (themeMode, themeProductContext).

Examples

Sizes

import * as React from 'react';
import { Link } from '@xsolla/xui-link';

export default function Example() {
  return (
    <div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
      <Link size="sm" href="#">Small Link</Link>
      <Link size="md" href="#">Medium Link</Link>
      <Link size="lg" href="#">Large Link</Link>
    </div>
  );
}

External link

import * as React from 'react';
import { Link } from '@xsolla/xui-link';

export default function Example() {
  return (
    <Link href="https://example.com" target="_blank">
      Open in a new tab
    </Link>
  );
}

Underlined inline link

import * as React from 'react';
import { Link } from '@xsolla/xui-link';

export default function Example() {
  return (
    <p>
      Read our <Link href="/terms" underline>Terms of Service</Link> and{' '}
      <Link href="/privacy" underline>Privacy Policy</Link>.
    </p>
  );
}

Disabled

import * as React from 'react';
import { Link } from '@xsolla/xui-link';

export default function Example() {
  return (
    <Link href="/disabled" disabled>
      Disabled Link
    </Link>
  );
}

Accessibility

  • Renders a native <a> with explicit role="link".
  • Disabled links lose their href and become unfocusable (tabIndex={-1}).
  • Visible focus ring uses the theme's brand border colour.
  • For target="_blank", rel="noopener noreferrer" is enforced automatically.
  • Use descriptive link text — avoid generic phrases like "click here".