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

@fvc/box

v1.1.3

Published

`@fvc/box` provides FE-VIS flexbox layout primitives on top of Ant Design Grid. It exposes a `Box` component for flex containers and compound subcomponents `Box.Row` and `Box.Column` for grid-based layouts, keeping the Ant Design Row/Col API familiar whil

Readme

@fvc/box

@fvc/box provides FE-VIS flexbox layout primitives on top of Ant Design Grid. It exposes a Box component for flex containers and compound subcomponents Box.Row and Box.Column for grid-based layouts, keeping the Ant Design Row/Col API familiar while adding direction, alignment, gap, and block layout controls as props.

Installation

bun add @fvc/box

Peer Dependencies

bun add react antd

Import

import { Box } from '@fvc/box';

Quick Start

import { Box } from '@fvc/box';

export function ActionBar() {
  return (
    <Box direction="row" justify="space-between" align="center">
      <span>Title</span>
      <button>Save</button>
    </Box>
  );
}

Components

| Component | Use case | | --- | --- | | Box | Flex container with direction, alignment, gap, and wrap controls. | | Box.Row | Ant Design Row wrapper with testId support. | | Box.Column | Ant Design Col wrapper with col shorthand and testId support. |

Common Usage

Flex Row

<Box direction="row" align="center" justify="space-between">
  <Label>Status</Label>
  <Value>Active</Value>
</Box>

Flex Column

<Box direction="column" rowGap={1}>
  <Field label="Name" />
  <Field label="Email" />
  <Field label="Phone" />
</Box>

No Wrap

<Box direction="row" wrap={false}>
  <Tag>Tag 1</Tag>
  <Tag>Tag 2</Tag>
</Box>

Full Width

<Box direction="row" block>
  <SearchInput />
  <Button type="primary">Search</Button>
</Box>

Inline Flex

<Box display="inline-flex" align="center" direction="row">
  <Icon />
  <span>Label</span>
</Box>

Row and Column Grid

<Box.Row gutter={16}>
  <Box.Column col={12}>
    <Input name="firstName" label="First name" />
  </Box.Column>
  <Box.Column col={12}>
    <Input name="lastName" label="Last name" />
  </Box.Column>
</Box.Row>

Props

Box

| Prop | Type | Description | | --- | --- | --- | | display | 'flex' \| 'inline-flex' | Display mode. Defaults to 'flex'. | | direction | 'row' \| 'column' \| 'row-reverse' \| 'column-reverse' | Flex direction. | | align | 'flex-start' \| 'center' \| 'flex-end' | Cross-axis alignment. | | justify | 'flex-start' \| 'center' \| 'flex-end' \| 'space-between' \| 'space-around' | Main-axis alignment. | | wrap | boolean | Enable flex wrapping. Defaults to true. | | block | boolean | Set width to 100%. | | rowGap | number | Gap between rows in rem units. | | height | string | Sets minHeight. | | className | string | Additional CSS class names. | | style | CSSProperties | Inline styles. | | testId | string | Maps to data-testid. | | children | ReactNode | Content. |

Box.Column

| Prop | Type | Description | | --- | --- | --- | | col | number | Shorthand for span. | | testId | string | Maps to data-testid. | | All ColProps | — | All Ant Design Col props (span, offset, xs, sm, md, lg, xl, xxl, etc.). |

Box.Row

| Prop | Type | Description | | --- | --- | --- | | testId | string | Maps to data-testid. | | All RowProps | — | All Ant Design Row props (gutter, align, justify, wrap, etc.). |

Consumer Example

import { Box } from '@fvc/box';

export function FilterBar({ onSearch, onReset }) {
  return (
    <Box direction="column" rowGap={1} block>
      <Box.Row gutter={16}>
        <Box.Column col={8}>
          <Input name="name" label="Name" />
        </Box.Column>
        <Box.Column col={8}>
          <Input name="status" label="Status" />
        </Box.Column>
        <Box.Column col={8}>
          <Input name="date" label="Date" />
        </Box.Column>
      </Box.Row>

      <Box direction="row" justify="flex-end">
        <Button type="secondary" onClick={onReset}>Reset</Button>
        <Button type="primary" onClick={onSearch}>Search</Button>
      </Box>
    </Box>
  );
}

Testing

<Box direction="row" testId="action-bar">
  <Button>Save</Button>
</Box>
screen.getByTestId('action-bar');

Customisation

@fvc/box exposes its visual tokens as CSS custom properties declared in src/styles/variables.scss. Override any of these in your own stylesheet — no fork, no file in the component, no re-bundle required.

/* consumer's own app stylesheet */
:root {
  --box-bg-color: #f9fafb;
  --box-border-width: 1px;
  --box-border-color: #e5e7eb;
  --box-border-radius: 8px;
  --box-padding: 16px;
}

Available variables

| Variable | Default | Controls | | --- | --- | --- | | --box-bg-color | transparent | Background color of the Box container | | --box-border-width | 0 | Border thickness of the Box container | | --box-border-color | transparent | Border color of the Box container | | --box-border-radius | 0 | Corner radius of the Box container | | --box-padding | 0 | Inner padding of the Box container | | --box-col-min-height | 1px | Minimum height of the fvc-box-col sub-element |

Development

bun run lint
bun run type-check
bun run test
bun run build