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

@inlayphp/infolists-react

v0.3.13

Published

React renderer for Inlay read-only infolists.

Readme

Inlay Infolists for React

npm License

React renderer for Inlay read-only infolists

@inlayphp/infolists-react renders the read-only inlay.infolists.v1 contract from inlayphp/infolists. It supports dotted state, fallbacks, conditions, shared layouts, formatting, safe links/images, repeatable entries and accessible copy feedback.

Install

pnpm add @inlayphp/infolists-react @inlayphp/core react react-dom
composer require inlayphp/infolists

Basic use

import { Infolist } from '@inlayphp/infolists-react'
import type { InfolistResource } from '@inlayphp/infolists-react'

export function UserDetails({ details }: { details: InfolistResource }) {
  return <Infolist resource={details} />
}

The renderer resolves statePath against resource.data, then applies the entry default and placeholder/emptyValue. Repeatable child paths are resolved relative to each array item.

Slots

<Infolist
  resource={details}
  slots={{
    header: (resource) => <h1>{resource.data.name as string}</h1>,
    beforeSchema: <p>Account summary</p>,
    afterSchema: <AuditTrail />,
    footer: <small>Generated by InLay</small>,
  }}
/>

Each slot accepts a React node or a function receiving the complete resource.

Custom renderers

import type { InfolistComponentRenderer } from '@inlayphp/infolists-react'

const CardLayout: InfolistComponentRenderer = ({ component, renderSchema }) => (
  <section className="rounded-xl border p-4">
    <h2>{component.label}</h2>
    {renderSchema()}
  </section>
)

<Infolist
  resource={details}
  renderers={{ 'vendor-card': CardLayout }}
  registries={appInfolistRegistries}
/>

Local renderers override Core registries and built-ins. Community wire components should set rendererCategory: "layout" or "entry". Registry sets expose layout.get(type) and entry.get(type).

The renderer context contains component, path, resolved value, complete data, theme/classes, empty value and renderSchema(options). A layout can safely render a different schema, columns or nested path without losing the surrounding context.

Theme, classes and safe attributes

<Infolist
  resource={details}
  emptyValue={<em>Not provided</em>}
  theme={{ accent: '#7c3aed', radius: '0.75rem', surface: '#fff' }}
  classNames={{
    section: 'shadow-sm',
    label: 'uppercase tracking-wide',
    value: 'text-base',
  }}
/>

Theme keys are accent, radius, surface, text, muted, border, and danger; they become --inlay-infolist-* variables. Class slots are root, schema, layout, section, fieldset, callout, entry, label, value, helperText, tabs, wizard, repeatable, and empty.

Stable data-slot and data-entry attributes are also available. PHP extraAttributes are filtered to exclude event handlers, raw HTML, style, refs and React internals.

@source '../../node_modules/@inlayphp/*/src/**/*.{ts,tsx,vue}';

Built-in rendering

The adapter renders text/list/badge/date/number/money/link values, boolean/literal icons, images, colors, key/value data and repeatable schemas. @inlayphp/core checks URLs before anchors or images are rendered. navigator.clipboard powers copyable text/color entries with an ARIA live status.

Exports include Infolist, condition/path helpers, every resource/component/theme/class type and all renderer registry contracts.

Test, typecheck and build

pnpm test -- --run
pnpm typecheck
pnpm build

Related packages

  • inlayphp/infolists, inlayphp/schemas, and inlayphp/support.
  • @inlayphp/infolists-vue and @inlayphp/core.