Getting Started
Installation
To install Stacks
, you should use your preferred package manager.
bun add @grapp/stacks
Unistyles
Once you have installed the library, check out the Unistyles setup guide at this link (opens in a new tab). This guide provides a step-by-step process for configuring Unistyles in your app. You can skip this step if you have installed and configured Unistyles properly.
Stacks
Adding Stacks
support to the existing Unistyles
configuration is a simple process. To do this, you need to add the following properties to your theme:
const theme = {
...
stacks: {
spacing: 4,
debug: false,
},
};
If you are using TypeScript, it is necessary to create types for breakpoints after overriding Unistyles
types.
declare module 'react-native-unistyles' {
export interface UnistylesBreakpoints extends AppBreakpoints {}
export interface UnistylesThemes extends AppThemes {}
}
declare module '@grapp/stacks' {
export interface StacksBreakpoints extends Breakpoints {}
}
Explore
You can now explore the various components and become familiar with their properties by visiting the Components
page.