Reactopia
ProductsBrowseAboutContact
Products
ProductsBrowseAbout
Yash Mahajan

Reactopia

Workflow products (Migrate, Verify, Release), plus Browse, SVG tools, and Discover. Built by Yash Mahajan.

Product

  • Workflow products
  • Migrate
  • Verify
  • Release
  • Components
  • Discover
  • SVG tools
  • Platform roadmap

Legal

  • Privacy Policy
  • Terms of Use
  • Cookie Policy
  • License
  • Credits
  • Contact

More

  • Discover
  • SVG tools
  • Changelog
  • Contact

Project

  • About
  • Changelog
  • GitHub
  • X

© 2026 Reactopia. All rights reserved.

PrivacyTermsCookies

Getting Started

IntroductionContributing

Components

SeparatorUiButtonBadgeStackUiInputIn devUiSelectIn devUiTextareaIn dev

Hooks

useDebounceuseLocalStorageuseMediaQueryuseMounted

Utilities

cngroupBysleep
Components
Stack

Stack

Vertical flex layout helper with gap for React Native.

BetacomponentReact NativeUpdated 2026-10-07MIT LicenseSource on GitHubReport Issue
Dependencies:npm install react react-native
BadgeuseDebounce

Introduction

Vertical layout helper for React Native: column flex with configurable gap and alignment. Complements the Separator component for list-style UIs.

Platform: React Native. Dependencies: react, react-native.

Component

import React from "react";
import { View, type ViewProps, type ViewStyle } from "react-native";
export type StackProps = ViewProps & {
gap?: number;
align?: ViewStyle["alignItems"];
justify?: ViewStyle["justifyContent"];
};
export function Stack({
gap = 8,
align = "stretch",
justify = "flex-start",
style,
children,
...rest
}: StackProps) {
return (
<View
style={[{ flexDirection: "column", alignItems: align, justifyContent: justify, gap }, style]}
{...rest}
>
{children}
</View>
);
}

On older React Native versions without gap in flexbox, replace gap with margin on children or use Separator between items.

Example

<Stack gap={12}>
<Title />
<Subtitle />
<Actions />
</Stack>

Footer

For horizontal rows, mirror the same pattern with flexDirection: "row" (a Row helper).

tsx