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

@fluxus-ui/native

v0.4.0

Published

Fluxus for React Native: the same tokens and motion vocabulary, on Reanimated.

Readme

@fluxus-ui/native

Fluxus for React Native: the same tokens and motion vocabulary as the web, on Reanimated. Design and decisions: SPEC.md §15.

npx expo install @fluxus-ui/native react-native-reanimated react-native-worklets

It needs the New Architecture (Reanimated 4 does). Peer dependencies: react, react-native, react-native-reanimated, react-native-worklets.

With Expo, babel-preset-expo already adds the worklets plugin. Without Expo, add it to the app's Babel config, last in the list:

module.exports = { presets: ['module:@react-native/babel-preset'], plugins: ['react-native-worklets/plugin'] };

Inside a monorepo, the app must run one copy of React and of Reanimated: see examples/native/metro.config.js.

import { Button, Text, ThemeProvider, themes } from '@fluxus-ui/native';

export default function App() {
  return (
    <ThemeProvider theme={themes.base}>
      <Text variant="title">Lecciones</Text>
      <Button variant="primary" onPress={() => {}}>
        Entrar
      </Button>
    </ThemeProvider>
  );
}

src/generated/tokens.ts is written by pnpm --filter @fluxus-ui/ui tokens:native from packages/ui/tokens/*.tokens.json: a theme is the same file for the web and for here.

Some pieces need a library of their own, and live in their own entry so that nobody else installs it:

import { Icon } from '@fluxus-ui/native/icon'; // react-native-svg and @fluxus-ui/icons
import { Screen } from '@fluxus-ui/native/screen'; // react-native-safe-area-context
import { Swap } from '@fluxus-ui/native/blur'; // expo-blur: the Swap that loses focus on a phone too
import { Audio } from '@fluxus-ui/native/audio'; // expo-audio: the player, playing
import { enableHaptics } from '@fluxus-ui/native/haptics'; // expo-haptics: what the hand feels

The main entry never imports them: an app without them works. What it can use of them it is given: haptics by registration (enableHaptics(), once at the root), an icon as a prop or a child.

What is pressed can wait: if onPress of a Button, a Card or a ListItem, or onChange of Tabs, returns a promise, it fills from where it was pressed until the promise settles. If the promise is rejected, the fill goes back to the finger: the app says why, in its own catch. <Swap id={what}> makes what is shown give way to what comes.

Forms: TextField (with reveal for a password, rows for several lines), TextArea, SearchField, Checkbox, Switch, RadioGroup and Slider. The slider takes the touch with React Native's own responder: it needs no gesture library.

What opens above: BottomSheet and Dialog (with ConfirmDialog) take open and onClose; Menu and Popover take a trigger; Select is a field that opens a sheet. They are a Modal of React Native with nothing of its own: no library. Back on Android always closes. If what is chosen or confirmed returns a promise, what was pressed waits and the window closes once it is fulfilled; if it fails, it stays open. BottomSheet and Select take inset: the safe area at the bottom, which the app knows (useSafeAreaInsets().bottom).

A notice of useToast called while one of them is open is painted inside it too: behind the window nobody would see it. A window of the app's own (Modal) gets them with <ToastLayer />.

Disclosure and Accordion show and hide what is under a title. It is the one piece that animates a height: what is below travels with it.

Screen with scroll gives its ScrollView: scrollRef to take it somewhere (scrollToEnd in a chat), scrollProps for what else it takes (onScroll). Its padding stays the one of the theme.

Link is a link in text: alone, with a target of 44 points; inline, inside a sentence. It opens href with the system, or calls onPress (the browser of the app, a screen). If onPress returns a promise the link waits for it: faded, and taking no other press. Bubble is a message of a chat, on the side of who wrote it (side="start" or "end"), with author and meta.

AudioPlayer is a button, how far it is and the time; it plays nothing by itself (playing, position, duration, onToggle, onSeek, and loading while the sound is not here yet). <Audio source={…} labels={{ play, pause }} />, from @fluxus-ui/native/audio, is the same playing with expo-audio: it waits from the press until the sound comes, and tells onError if it cannot.

The icons of @fluxus-ui/icons move as on the web, on the UI thread: <Icon icon={menu} />. Inside a Button, a Card or a ListItem an icon takes the state of the control (on when it has aria-expanded or aria-checked), its colour, and its push when pressed: a menu in the trigger of a Menu becomes a cross while the menu is open, and nobody wires it. state and progress set them by hand. With reduced motion a state changes at once and nothing is pushed. An icon with no other state and no push draws once, with nothing animated. setMotionScale(4) makes every animation of Fluxus four times slower, to look at it.

Components answer: a Button with feedback draws a tick where its text was when what its press returns is fulfilled, and shakes its text once if it fails. A Checkbox draws its tick, the knob of a Switch widens towards where it goes while pressed, a Toast draws its mark by tone, a Bubble with status (sending, sent, read, failed) draws its ticks and shakes once when it fails, and the icon of an EmptyState comes with a small gesture. <Success label="Pago enviado" />, from the icon entry, grows and draws a tick in a circle. With enableHaptics() the hand feels them too. The ticks are drawn with views, without SVG. With reduced motion nothing shakes or grows, and marks appear drawn.

For the screens of an app: Screen takes onRefresh (pull to refresh, the native control, while the promise is pending) and footer (the action of the screen, fixed under the scroll, above the keyboard). List is a FlatList that groups by a label (sections), loads with skeletons, refreshes, asks for more at its end, and fades in only the rows that arrive; DayDivider says where a day begins. A notice of useToast may carry an action («Deshacer»), beside its text. Segmented is one of a few, as on iOS, with a count each; Tile, a tile of a home screen; Section, rows under a title as the settings of iOS; CodeField, a code of a few digits that the system can fill from a message. From the icon entry: Steps and StepsStage, a route of steps and its stages, and AttachmentGrid, the squares where photos and documents are added. Each is felt through feel() when haptics are on.

The app's own font, loaded with expo-font: <ThemeProvider fonts={{ regular: 'Atkinson-Regular', medium: 'Atkinson-Medium', bold: 'Atkinson-Bold' }}>. Without it, the font of the system.

Nothing jumps: <Appear> is a view that comes rising, goes fading and glides to a new place; presence() gives the three props for any Animated.View. In a browser they are off.

An app's own theme: npx fluxus-native-theme --theme its.tokens.json --out its-theme.ts (the command of @fluxus-ui/ui, a dev dependency of the app), then <ThemeProvider theme={theme}>. examples/native does it with an example of ALBA.

A theme may add the tokens of its app under the group app (app.surface.note), with their $type; nothing else can be added. useTheme<typeof theme>() gives them by name, and a wrong name does not compile.

Checked by node verify-native.mjs (types and Jest). Jest runs no native code and paints nothing: how it looks and moves is checked on a phone.