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

@tramo-digital/react-ui

v0.0.2

Published

tramo.digital - react-ui

Readme

@tramo-digital/react-ui

Auto-generated React component library from @tramo-digital/core scaffolds, powered by the Tramo transformation pipeline.

[!WARNING] This library is auto-generated. Don't edit files here directly — changes are overwritten on every transformation run.

  • Edit source scaffolds in libs/core/src/scaffolds/ui/
  • Run pnpm transformation to regenerate
  • Run pnpm nx build @tramo-digital/react-ui for changes to take effect

Installation

npm install @tramo-digital/react-ui @tramo-digital/styles
# or
pnpm add @tramo-digital/react-ui @tramo-digital/styles

Peer dependencies

| Package | Version | | ----------- | ------- | | react | 19.0.0 | | react-dom | 19.0.0 |

Required companion packages

| Package | Purpose | | -------------------------- | -------------------------------- | | @tramo-digital/styles | Design tokens (CSS custom properties) |

[!IMPORTANT] You must install @tramo-digital/styles alongside this package. Without the design tokens, components render without colors, spacing, typography, and other visual properties.

CSS setup

Every consumer must import two CSS files at the root of the application. Both are required for components to render correctly.

// 1. Design tokens — colors, spacing, typography, breakpoints
import '@tramo-digital/styles/css/min.css';

// 2. Component styles — scoped CSS modules for every component
import '@tramo-digital/react-ui/style.css';

Import order matters: design tokens must load before component styles so that CSS custom properties are available when component stylesheets reference them.

Where to place the imports

Place both imports in your application's entry point so they load once and are available globally.

React (Vite / CRA)

// src/main.tsx or src/index.tsx
import '@tramo-digital/styles/css/min.css';
import '@tramo-digital/react-ui/style.css';

import { StrictMode } from 'react';
import { createRoot } from 'react-dom/client';
import App from './App';

createRoot(document.getElementById('root')!).render(
  <StrictMode>
    <App />
  </StrictMode>,
);

Next.js (App Router)

// app/layout.tsx
import '@tramo-digital/styles/css/min.css';
import '@tramo-digital/react-ui/style.css';

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>{children}</body>
    </html>
  );
}

Astro

---
// src/layouts/Layout.astro
import '@tramo-digital/styles/css/min.css';
import '@tramo-digital/react-ui/style.css';
---
<html lang="en">
  <body><slot /></body>
</html>

[!WARNING] If you skip the design tokens import (@tramo-digital/styles/css/min.css), components will appear unstyled — missing colors, fonts, and spacing.

Quick start

import '@tramo-digital/styles/css/min.css';
import '@tramo-digital/react-ui/style.css';
import { Frame, Hero, Card, GridContainer, GridItem } from '@tramo-digital/react-ui';

function App() {
  return (
    <Frame data={{ as: 'div' }} colorPalette="light" colorSource="palette">
      <GridContainer>
        <GridItem>
          <Hero
            data={{
              content: {
                contentAlignment: 'left',
                headline: { text: 'Welcome to Tramo', size: 'lg', weight: 'bold' },
                textBody: { text: 'Design-to-code transformation', size: 'md' },
                buttons: [
                  { data: { text: 'Get Started', variant: 'primary', size: 'md' } },
                ],
              },
              media: {
                src: 'https://picsum.photos/1400/800',
                alt: 'Hero background',
              },
              overlay: { isOpen: true },
            }}
          />
        </GridItem>
        <GridItem>
          <Card
            data={{
              content: {
                headline: { text: 'Component Card', size: 'lg', weight: 'bold' },
                textBody: { text: 'Auto-generated from core scaffolds', size: 'md' },
                buttons: [
                  { data: { text: 'Learn More', variant: 'secondary', size: 'md' } },
                ],
              },
              src: 'https://picsum.photos/800/600',
              alt: 'Card image',
            }}
          />
        </GridItem>
      </GridContainer>
    </Frame>
  );
}

Available components

All components live under four categories — Primitives, Patterns, Compositions, and Layout — mirroring the scaffold structure in libs/core.

Primitives

Basic building blocks consumed by every higher-level component.

| Component | Purpose | | --------------- | -------------------------------------------- | | Avatar | User avatar | | Badge | Label / status indicator | | Button | Interactive button with variants and states | | Checkbox | Checkbox input | | Frame | Theme wrapper and design-system context provider | | Icon | SVG icons with dynamic loading | | Image | Responsive images with optimization | | Input | Text input field | | InterfaceIcon | Interface-specific icon | | Link | Text link | | List | Ordered / unordered list | | Loader | Loading spinner / skeleton | | Logo | Logo with variants | | Overlay | Overlay for modals and dialogs | | Radio | Radio input | | Select | Dropdown select | | Separator | Visual divider | | TextBlock | Rich text block | | TextBody | Body text | | TextDisplay | Display / hero text | | TextEyebrow | Eyebrow text | | TextHeading | Heading text | | TextQuote | Quotation text | | Textarea | Multi-line text input | | Toggle | Toggle switch | | Video | Video player |

Patterns

Combined building blocks that form reusable UI patterns.

| Component | Purpose | | ------------- | ------------------------------------- | | Author | Author byline | | Breadcrumb | Breadcrumb navigation | | Card | Content card with actions | | Content | Typography and text content wrapper | | FormGroup | Labeled form field group | | Navigation | Navigation with prev/next controls | | StripBanner | Thin promotional banner strip | | Teaser | Teaser / preview card |

Compositions

Higher-level, page-section components.

| Component | Purpose | | ------------------ | ------------------------------------------------- | | Accordion | Collapsible content sections | | Banner | Notification and alert banners | | Carousel | Image and content slider | | Collage | Multi-image collage layout | | ContentGrid | Auto-grid layout for structured content | | Faq | FAQ section | | Footer | Site footer | | Header | Site header / navigation bar | | Hero | Hero section with CTA | | HeroEnhanced | Enhanced hero with additional layout options | | LinkGroup | Jump-link navigation group | | MediaQuote | Quote with accompanying media | | MediaSplit | Background media on top, content split below | | MediaText | Side-by-side media and text | | QuoteBanner | Full-width quote banner | | QuoteSection | Multi-quote section | | StatementSection | Bold statement section | | Tabs | Tabbed content panels |

Layout

Structural layout primitives.

| Component | Purpose | | --------------- | ------------------------------ | | Container | Max-width content wrapper | | Drawer | Slide-out drawer panel | | GridContainer | CSS-grid parent container | | GridItem | Grid child with span control | | Stack | Vertical / horizontal flex stack |

Hooks

The library ships with React hooks for common design-system concerns.

| Hook | Purpose | | ---------------- | -------------------------------------------- | | useBreakpoint | Track the active responsive breakpoint | | useDataLoader | Fetch and cache component blueprint data | | useStore | Access the shared @tramo-digital/store |

import { useBreakpoint } from '@tramo-digital/react-ui';

function ResponsiveSection() {
  const bp = useBreakpoint();

  return bp === 'lg'
    ? <DesktopLayout />
    : <MobileLayout />;
}

TypeScript support

Every component exports its own props type:

import { Button, type ButtonProps } from '@tramo-digital/react-ui';

const PrimaryButton: React.FC<ButtonProps> = (props) => (
  <Button {...props} data={{ text: 'Click me', variant: 'primary', size: 'md' }} />
);

Styling

Components use CSS Modules internally and consume design tokens from @tramo-digital/styles. You can customize appearance in two ways:

  1. Override tokens — set CSS custom properties on a parent element.
  2. Pass className — components accept a className prop for additional styling.
<Button
  className="my-custom-button"
  data={{ text: 'Click me', variant: 'primary', size: 'lg' }}
/>

Theming with Frame

Wrap your app (or a section) in Frame to switch between light and dark modes. Frame sets the appropriate data-* attributes that drive the token cascade.

import { Frame } from '@tramo-digital/react-ui';

<Frame data={{ as: 'div' }} colorPalette="dark" colorSource="palette">
  {/* All children render with dark-mode tokens */}
</Frame>

Module exports

| Export path | Description | | ------------------------------------ | ------------------------------------------ | | @tramo-digital/react-ui | All components and hooks | | @tramo-digital/react-ui/style.css | Compiled component CSS bundle | | @tramo-digital/styles/css/min.css | Design tokens (from companion package) |

Development workflow

  1. Edit source scaffolds in libs/core/src/scaffolds/ui/
  2. Run pnpm transformation to regenerate this library
  3. Run pnpm nx build @tramo-digital/react-ui to compile
  4. Test in the React dev app with pnpm nx run @tramo-digital/react-app:dev
  5. View stories with pnpm nx run @tramo-digital/react-ui:storybook

Build and test

# Build the library
pnpm nx build @tramo-digital/react-ui

# Lint
pnpm nx lint @tramo-digital/react-ui

# Storybook
pnpm nx run @tramo-digital/react-ui:storybook

The build produces ESM, CJS, and TypeScript declaration outputs via Vite with tree-shakable, module-preserving rollup.

Transformation pipeline

This library is generated by the AI-powered transformation engine in tools/pipeline. Each scaffold in libs/core is analyzed, optimized for React patterns (hooks, JSX, event handling), and output with TypeScript definitions and CSS Modules.

For details, see transformation-executor.md.

Related packages