Socket
Book a DemoInstallSign in
Socket

flapstacks

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package version was removed
This package version has been unpublished, mostly likely due to security reasons

flapstacks

Flex layout primitive for React & React Native

unpublished
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
9
-30.77%
Maintainers
1
Weekly downloads
 
Created
Source

🥞 flapstacks

package version package downloads standard-readme compliant package license make a pull request

Flex layout primitive for React & React Native (wip)

📖 Table of Contents

👀 Background

This package is a tiny wrapper around the Flexbox one-dimensional layout method to allow for a prop based styling API as seen in Styled System.

Features

  • Works in React and React Native (wip)
  • Flexible shorthand props
  • TypeScript support with API docs
  • Polymorphic component type
  • Style overriding to hook into your Design System

⚙️ Install

Install the package locally within you project folder with your package manager:

With npm:

npm install flapstacks

With yarn:

yarn add flapstacks

With pnpm:

pnpm add flapstacks

📖 Usage

import { Stack } from "flapstacks";

const Box = () => (
  <div style={{ height: 100, width: 100, backgroundColor: "tomato" }} />
);

export default function App() {
  return (
    <Stack
      as="main"
      direction="column"
      cross="center"
      justifyContentSpaceBetween
      gap={2}
    >
      <Box />
      <Box />
      <Box />
      <Box />
      <Box />
    </Stack>
  );
}

Overridable styles

If you have an existing set to design tokens that you would like to connect to the props of the stack then the onOverrideStyles prop can be used:

const CustomStack = (props) => {
  const handleOverride = (style: CSSProperties) => {
      // Design tokens
      const scale = ["16px", "32px"]
      if (style.gap) {
        style.gap = scale[style.gap as number];
      }
    
      return style;
    }
  
  return <Stack {...props} onOverrideStyles={handleOverride}>
}

📚 API

For all configuration options, please see the API docs.

💬 Contributing

Got an idea for a new feature? Found a bug? Contributions are welcome! Please open up an issue or make a pull request.

🪪 License

MIT © Tiaan du Plessis

Keywords

flex

FAQs

Package last updated on 24 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts