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

@xtr-dev/xtr-brand-react

v0.0.5

Published

xtr.dev branded React components and utilities

Readme

@xtr-dev/xtr-brand-react

React components and utilities for xtr.dev branding.

Installation

npm install @xtr-dev/xtr-brand-react

Components

XLogo

Animated XTR logo that collapses from full "XTR" text to just the "X" icon.

import { XLogo } from '@xtr-dev/xtr-brand-react';

<XLogo />
<XLogo scale={2} delay={1000} />
<XLogo reveal={false} />
<XLogo revealOnHover />

| Prop | Type | Default | Description | |------|------|---------|-------------| | delay | number | 2000 | Delay in ms before collapse animation starts | | duration | number | 500 | Animation duration in ms | | scale | number | 1 | Scale factor for the logo | | margin | boolean | false | Add margin around logo (1/3 height) | | stableWidth | boolean | false | Keep full width, only clip content | | reveal | boolean | undefined | Override reveal state (true = full, false = X only) | | revealOnHover | boolean | false | Reveal full logo on hover |

XButton

Styled button with color variants.

import { XButton } from '@xtr-dev/xtr-brand-react';

<XButton>Click me</XButton>
<XButton variant="pastel-green">Success</XButton>
<XButton variant="pastel-red" disabled>Disabled</XButton>

| Prop | Type | Default | Description | |------|------|---------|-------------| | variant | 'body' \| 'white' \| 'pastel-yellow' \| 'pastel-green' \| 'pastel-red' \| 'pastel-blue' | 'body' | Button color variant |

XFlex

Flexbox layout wrapper.

import { XFlex } from '@xtr-dev/xtr-brand-react';

<XFlex gap="1rem">
  <div>Item 1</div>
  <div>Item 2</div>
</XFlex>

<XFlex horizontal wrap gap="0.5rem">
  <div>Horizontal</div>
  <div>Wrapped</div>
</XFlex>

| Prop | Type | Default | Description | |------|------|---------|-------------| | horizontal | boolean | false | Row direction (default is column) | | wrap | boolean | false | Enable flex wrap | | gap | string | - | Gap between items | | align | string | - | Align items | | justify | string | - | Justify content | | grow | boolean | false | Flex grow to fill container |

XGrid

CSS Grid layout wrapper.

import { XGrid } from '@xtr-dev/xtr-brand-react';

<XGrid columns={3} gap="1rem">
  <div>1</div>
  <div>2</div>
  <div>3</div>
</XGrid>

<XGrid columns="1fr 2fr 1fr" rowGap="1rem">
  <div>Narrow</div>
  <div>Wide</div>
  <div>Narrow</div>
</XGrid>

| Prop | Type | Default | Description | |------|------|---------|-------------| | columns | number \| string | - | Number of columns or grid-template-columns | | rows | number \| string | - | Number of rows or grid-template-rows | | gap | string | - | Gap between items | | rowGap | string | - | Row gap | | columnGap | string | - | Column gap |

XArticle

Article wrapper with typography styles and vertical rhythm.

import { XArticle } from '@xtr-dev/xtr-brand-react';

<XArticle className="theme background padding">
  <h1>Title</h1>
  <p>Content with proper typography.</p>
  <ul>
    <li>List item</li>
  </ul>
  <pre><code>code block</code></pre>
</XArticle>

XCode

Code block with Prism.js syntax highlighting.

import { XCode } from '@xtr-dev/xtr-brand-react';

<XCode language="typescript" lineNumbers>
{`function hello(name: string) {
  return "Hello, " + name;
}`}
</XCode>

<p>Use <XCode inline>console.log()</XCode> to debug.</p>

| Prop | Type | Default | Description | |------|------|---------|-------------| | language | string | - | Language for syntax highlighting | | inline | boolean | false | Display as inline code | | lineNumbers | boolean | false | Show line numbers |

Supported languages: typescript, javascript, jsx, tsx, css, json, bash, markdown, python, rust, go

XRem

Wrapper that snaps element height to rem multiples (for vertical rhythm).

import { XRem } from '@xtr-dev/xtr-brand-react';

<XRem>
  Content with height snapped to 1rem multiples
</XRem>

<XRem unit={0.5}>
  Snaps to 0.5rem multiples
</XRem>

| Prop | Type | Default | Description | |------|------|---------|-------------| | unit | number | 1 | Rem multiple to snap to |

Theme

Import the theme CSS for fonts and color variables:

import '@xtr-dev/xtr-brand-react/dist/styles/theme.css';

Use the .theme class for themed containers:

<div className="theme background padding">
  Themed content
</div>

Dark Mode

Supports system dark mode automatically, or override manually:

<html data-theme="dark">
<html data-theme="light">

CSS Variables

--font-body: 'Cantarell', sans-serif;
--font-header: 'Geist', sans-serif;
--color-body: #333333;
--color-white: #ffffff;
--color-pastel-yellow: #fdf4b8;
--color-pastel-green: #afefb0;
--color-pastel-red: #ffd7d6;
--color-pastel-blue: #beebf8;
--theme-fg: current foreground color;
--theme-bg: current background color;

Development

npm install
npm run storybook    # Run Storybook
npm run build        # Build library

License

MIT