@gluestack-ui/hstack
TypeScript icon, indicating that this package has built-in type declarations

0.1.17 • Public • Published

@gluestack-style/hstack

Installation

To use @gluestack-ui/hstack, all you need to do is install the @gluestack-ui/hstack package:

$ yarn add @gluestack-ui/hstack

# or

$ npm i @gluestack-ui/hstack

Usage

HStack arranges its child elements horizontally, making it a suitable layout component for creating a row of items. It is worth noting that Row is just an alternative name for HStack. Here's an example how to use this package to create one:

import { Root, Spacer } from '../components/core/hstack/styled-components';
import { createHStack } from '@gluestack-ui/hstack';
const HStack = createHStack({
  Root,
  Spacer,
});

Customizing the hstack:

Default styling of all these components can be found in the components/core/hstack file. For reference, you can view the source code of the styled hstack components.

// import the styles
import { Root, Spacer } from '../components/core/hstack/styled-components';

// import the createHStack function
import { createHStack } from '@gluestack-ui/hstack';

// Understanding the API
const HStack = createHStack({
  Root,
  Spacer,
});

// Using the HStack component
export default () => <HStack />;

More guides on how to get started are available here.

/@gluestack-ui/hstack/

    Package Sidebar

    Install

    npm i @gluestack-ui/hstack

    Weekly Downloads

    654

    Version

    0.1.17

    License

    none

    Unpacked Size

    5.75 kB

    Total Files

    11

    Last publish

    Collaborators

    • rajat693
    • sravankumarvelangi
    • vaibhk002
    • daminipandey
    • rayan1810
    • amars29
    • geekgautam
    • gluestackadmin
    • geekashwini
    • vidhi499
    • mayankp06
    • madhavb230100
    • viraj-10
    • rohit_singh
    • meenumakkar
    • surajahmedc