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

@knitui/components

v0.3.0

Published

Cross-platform (React Native + Web) component kit for Knit UI.

Readme

@knitui/components

The main component kit for Knit UI — 100+ cross-platform (React Native + Web) components built on @knitui/core, all sized, themed, and composable out of one design system.

Every component renders identically on iOS, Android, and the web from a single import. They share the kit's token scales, variant/size ladders, and per-slot styling contract, so a Button, a field, and an overlay all speak the same size, variant, and styles language.

Relationship to @knitui/core

@knitui/components is the "what you render" layer. @knitui/core is the "how it looks" layer underneath it — the Tamagui config, theming, <Provider>, and the styled() / token / motion escape hatch. You import components from here and the styling primitives (styled, useMedia, token helpers, Gesture, …) plus <Provider> from @knitui/core.

Install

You never add a @tamagui/* package yourself — the kit depends on them internally and re-exports everything you need. Install the kit plus its native peers:

# Expo
npx expo install @knitui/core @knitui/components \
  react-native-gesture-handler react-native-reanimated \
  react-native-svg react-native-teleport react-native-worklets

# bare React Native / web
npm install @knitui/core @knitui/components \
  react-native-gesture-handler react-native-reanimated \
  react-native-svg react-native-teleport react-native-worklets

react-native-gesture-handler and react-native-reanimated are the load-bearing native peers on every platform; react-native-svg, react-native-teleport, and react-native-worklets back the icon, portal, and worklet layers. On web, react-native-web is the only extra peer.

Quickstart

Wrap your app once. <Provider> (from @knitui/core) sets up theming and mounts the GestureHandlerRootView for you — then drop components anywhere below:

import { Provider } from "@knitui/core";
import { Button, Card, Group, Text, TextInput } from "@knitui/components";

export default function App() {
  return (
    <Provider defaultColorScheme="system">
      <Card padding="lg">
        <Text>Sign in</Text>
        <TextInput label="Email" placeholder="[email protected]" />
        <Group>
          <Button variant="light">Cancel</Button>
          <Button>Continue</Button>
        </Group>
      </Card>
    </Provider>
  );
}

What's inside

Every name below is a real export from @knitui/components. Compound components expose their parts as static members (e.g. Card.Section, Combobox.Dropdown, Menu.Item, Tabs.Panel).

Layout & primitivesBox, Flex, Stack, Group, Grid, SimpleGrid, Container, Center, Spacer (alias Space), AspectRatio, Paper, Separator (alias Divider).

TypographyText, Title, Paragraph, Typography, Anchor, Blockquote, Code, Highlight, Mark, Kbd, List.

Buttons & actionsButton, ActionIcon, UnstyledButton, CloseButton, CopyButton, FileButton, Burger.

Text inputs & fieldsInput, InputBase, TextInput, Textarea, PasswordInput, NumberInput, MaskInput, PinInput, ColorInput, FileInput, Fieldset, PillsInput.

Selection & comboboxCombobox (+ useCombobox), Select, MultiSelect, Autocomplete, TagsInput, NativeSelect, TreeSelect.

Form controlsCheckbox, Radio, Switch, Chip, SegmentedControl, Slider (+ RangeSlider), AngleSlider, Rating.

ColorColorPicker, ColorSwatch, ThemeIcon.

Overlays & popupsModal, Drawer, Dialog, Popover, HoverCard, Tooltip, Menu, Overlay, LoadingOverlay, Affix, Portal, FocusTrap.

Feedback & statusAlert, Notification, Badge, Indicator, Loader, Progress, Skeleton, RollingNumber, NumberFormatter.

NavigationTabs, Stepper, Breadcrumbs, Pagination, NavLink, TableOfContents.

Data displayTable, Card, Accordion, Tree (+ useTree), Pill, Avatar, Image (+ createImage), BackgroundImage.

Disclosure & motionCollapse, Spoiler, Marquee, Transition, plus the motion presets (motionPresets, useMotionPreset, usePressScale, MotionConfig).

Scrolling & utilitiesScrollArea, VisuallyHidden, KeyboardAvoidingView, KeyboardAwareScrollView.

Positioning engine — a portable, cross-platform floating layer (useFloating, computePosition, flip, shift, offset, arrow, size, …) that powers every overlay and is exported for building your own.

Composability

The kit is composable-first — every component exposes the same three levers.

size and variant

Controls share one sizing ladder and color-variant system. Each component exports its own literal types, so options autocomplete and typecheck:

import { Button, type ButtonSize, type ButtonVariant } from "@knitui/components";

<Button size="lg" variant="light" />;

Per-slot styles

Multi-part components take a typed styles map keyed by named slots. Each slot targets the props of the styled part it decorates — the part's own props always win over the map:

import { Card } from "@knitui/components";

<Card
  styles={{
    root: { borderColor: "$borderColor" },
    header: { gap: "$md" },
  }}
/>;

The slot keys for a component are captured by its exported …Styles type (e.g. CardStyles, MenuStyles, TooltipStyles), and enforced at runtime by slotStyles so an unknown slot key throws rather than being silently ignored. The slot machinery itself (createSlot, defineSlots) lives in @knitui/core.

Theming & customization

Brand the whole kit with createTheme / extendTheme from @knitui/core and feed the result to <Provider config={…}> — see the @knitui/core README.

A per-component defaults/theming layer (components in createTheme, defineComponentDefaults) is planned but not yet implemented. For now, recolor with the theme system (theme="teal" / <Theme name="teal">) and set default props by wrapping your own thin component.

Control-system contract

Sibling packages (e.g. @knitui/media) that ship their own sized/colored controls import the kit's single source of truth for size, icon-sizing, and color ladders from the stable @knitui/components/control-system subpath:

import { controlMetrics, SIZE_KEYS, VARIANT_KEYS } from "@knitui/components/control-system";

Src-ship & consuming in Next.js

This package src-ships: its exports resolve to the TypeScript source under ./src, not a compiled lib. Metro (Expo / bare React Native) resolves the source field and compiles it as part of your app, so native works with no extra config.

Bundlers that don't transpile node_modules by default (notably Next.js) must be told to compile the @knitui/* scope. The Next.js plugin does this for you — wrap your config once and every kit package is transpiled:

// next.config.mjs
import { withKnitui } from "@knitui/plugins/next-plugin";
export default withKnitui({ reactStrictMode: true });

See @knitui/plugins for the metro, next, vite, and webpack setups.

Storybook & development

Every component ships stories (including a per-component Styles story that exercises the styles slots). Run the Storybook locally:

pnpm --filter @knitui/components storybook   # http://localhost:6006

Other package scripts:

pnpm --filter @knitui/components typecheck
pnpm --filter @knitui/components lint
pnpm --filter @knitui/components test

See also

  • Repo root README — the full monorepo and how the packages fit together.
  • @knitui/core — theming, <Provider>, createTheme, and the styling/motion engine.
  • @knitui/plugins — build-tool integrations (babel, metro, next, vite, webpack).
  • @knitui/icons — the icon kit wired into every control.