bởi Jaxon C.

A modular, copy-paste component library built with NativeWind (Tailwind CSS) for React, Next.js, and React Native projects, offering RSC support, accessible design, and a powerful CLI.
This block provides the headless, unstyled creator functions and accessibility hooks that power every gluestack-ui v3 component (Accordion, Actionsheet, Alert, Button, Checkbox, Input, Modal, and more). The typical buyer is a React Native or Expo developer who wants to wire up their own styled primitives to production-ready accessibility logic without accepting gluestack's default Tailwind/NativeWind layer.
accordion/ - Accordion creator function and ARIA hooks (useAccordion, useAccordionItem)actionsheet/ - Actionsheet (bottom sheet) creator with drag, backdrop, and scroll supportalert/ - Alert creator (Alert, AlertIcon, AlertText sub-components)alert-dialog/ - AlertDialog creator with backdrop, body, close button, footeravatar/ - Avatar creatorbutton/ - Button creator function and ARIA hookscheckbox/ - Checkbox creator and ARIA hooksdivider/ - Divider creatorfab/ - Floating Action Button creatorform-control/ - FormControl creator for field-level validation wiringicon/ - Icon creatorimage/ - Image creatorinput/ - Input creatorlink/ - Link creatormenu/ - Menu creator and ARIA hooksmodal/ - Modal creatoroverlay/ - Overlay primitive used by modals, popovers, and tooltipspopover/ - Popover creatorpressable/ - Pressable creatorprogress/ - Progress creatorradio/ - Radio creator and ARIA hooksselect/ - Select creatorslider/ - Slider creator and ARIA hooksspinner/ - Spinner creatorswitch/ - Switch creator and ARIA hookstextarea/ - Textarea creatortoast/ - Toast creatortooltip/ - Tooltip creatorindex.tsx / index.js - Barrel exports for every creator and ARIA hookKhởi chạy sandbox cách ly và chạy phía máy chủ — không cần cài đặt cục bộ.
Tetrees AI Review cho phiên bản này
This TypeScript cli / script completed archive review. Structure, dependency manifests, documentation, functional source, and common risk patterns were checked by the Tetrees verification pipeline; runtime phases are stated separately.
Deterministic AVCP artifact review
Quy trình avcp-2026-08-04.1 · SHA-256 13412ec938399bc2…
This version-scoped review deterministically inspects the submitted archive for structure, dependencies, documentation, functional source, and common malicious or high-risk signals. Build and test phases are reported as passed only after an isolated sandbox audition. It is not a guarantee of perfect security.
Đã đánh giá 4 thg 8, 2026
Đưa sản phẩm này thẳng vào AI IDE, trình tạo web hoặc cloud IDE của bạn.
Kết nối Tetrees với AI IDE tương thích để liệt kê sản phẩm bạn sở hữu và nhận ZIP đã xác minh mà không cấp quyền tải lên của người bán.
Chưa có đánh giá.
Sign in to join the discussion
Loading discussion…
npm install react react-native
npm install @react-native-aria/accordion @react-native-aria/button @react-native-aria/checkbox
npm install @react-native-aria/focus @react-native-aria/interactions @react-native-aria/listbox
npm install @react-native-aria/menu @react-native-aria/overlays @react-native-aria/radio
npm install @react-native-aria/slider @react-native-aria/switch @react-native-aria/tooltip
npm install @react-stately/collections @react-stately/list @react-stately/menu
npm install @react-stately/overlays @react-stately/radio @react-stately/slider
npm install @react-stately/toggle @react-stately/tree
npm install react-native-reanimated
If you are using Expo:
npx expo prebuild
# then for iOS:
cd ios && pod install
Ensure react-native-reanimated babel plugin is active in babel.config.js:
plugins: ['react-native-reanimated/plugin']
Copy the source/ directory into your project, e.g. src/gluestack-core/.
Add a TypeScript path alias in tsconfig.json:
{
"compilerOptions": {
"paths": {
"@gluestack-core/*": ["./src/gluestack-core/*"]
}
}
}
babel.config.js using babel-plugin-module-resolver:plugins: [
['module-resolver', {
alias: { '@gluestack-core': './src/gluestack-core' }
}],
'react-native-reanimated/plugin'
]
import { createAccordion, createButton, useAccordion } from '@gluestack-core/index';
function createAccordion<
AccordionProps, ItemProps, HeaderProps, TriggerProps,
ContentProps, IconProps, TitleTextProps, ContentTextProps
>(components: {
Root: React.ComponentType<AccordionProps>;
Item: React.ComponentType<ItemProps>;
Header: React.ComponentType<HeaderProps>;
Trigger: React.ComponentType<TriggerProps>;
Content: React.ComponentType<ContentProps>;
Icon: React.ComponentType<IconProps>;
TitleText: React.ComponentType<TitleTextProps>;
ContentText: React.ComponentType<ContentTextProps>;
}): IAccordionComponentType<...>
Pass your own styled primitives (View, Pressable, Text, etc.) and receive a fully composed Accordion component with .Item, .Header, .Trigger, .Content, .Icon, .TitleText, and .ContentText sub-components attached. Use this when you want gluestack's ARIA/keyboard behavior with your own visual design.
function createActionsheet<
ActionsheetProps, BackdropProps, ItemProps, ItemTextProps,
DragIndicatorProps, IndicatorWrapperProps, ContentProps,
ScrollViewProps, VirtualizedListProps, FlatListProps,
SectionListProps, SectionHeaderTextProps, IconProps, AnimatePresenceProps
>(components: {
Root: React.ComponentType<ActionsheetProps>;
Backdrop: React.ComponentType<BackdropProps>;
Item: React.ComponentType<ItemProps>;
ItemText: React.ComponentType<ItemTextProps>;
DragIndicator: React.ComponentType<DragIndicatorProps>;
IndicatorWrapper: React.ComponentType<IndicatorWrapperProps>;
Content: React.ComponentType<ContentProps>;
ScrollView: React.ComponentType<ScrollViewProps>;
VirtualizedList: React.ComponentType<VirtualizedListProps>;
FlatList: React.ComponentType<FlatListProps>;
SectionList: React.ComponentType<SectionListProps>;
SectionHeaderText: React.ComponentType<SectionHeaderTextProps>;
Icon: React.ComponentType<IconProps>;
AnimatePresence: React.ComponentType<AnimatePresenceProps>;
}): IActionsheetComponentType<...>
Builds a bottom-sheet Actionsheet with gesture-driven drag, animated content entry, and a tap-to-dismiss backdrop. Pass your own styled wrapper components for each slot.
// from accordion/aria/useAccordion.ts
function useAccordion(props: AccordionAria): AccordionState;
// from accordion/aria/useAccordionItem.ts
function useAccordionItem(props: AccordionItemAria, state: AccordionState): AccordionItemResult;
Low-level ARIA hooks for building a custom Accordion without using createAccordion. useAccordion manages open-item state; useAccordionItem returns the props to spread onto the trigger and panel elements. Useful when the creator abstraction is too heavy.
Build an Accordion entirely from React Native primitives and plug in gluestack's ARIA behavior.
import React from 'react';
import { View, Text, Pressable } from 'react-native';
import { createAccordion } from '@gluestack-core/index';
const Accordion = createAccordion({
Root: View,
Item: View,
Header: View,
Trigger: Pressable,
Content: View,
Icon: View,
TitleText: Text,
ContentText: Text,
});
export default function MyAccordion() {
return (
<Accordion type="single" defaultValue={['item-1']}>
<Accordion.Item value="item-1">
<Accordion.Header>
<Accordion.Trigger>
<Accordion.TitleText>What is gluestack-ui?</Accordion.TitleText>
<Accordion.Icon />
</Accordion.Trigger>
</Accordion.Header>
<Accordion.Content>
<Accordion.ContentText>
A headless component library for React and React Native.
</Accordion.ContentText>
</Accordion.Content>
</Accordion.Item>
</Accordion>
);
}
Wire up an Actionsheet that opens on button press with a draggable indicator and animated backdrop.
import React, { useState } from 'react';
import { View, Text, Pressable } from 'react-native';
import Animated from 'react-native-reanimated';
import { createActionsheet } from '@gluestack-core/index';
const Actionsheet = createActionsheet({
Root: View,
Backdrop: Pressable,
Item: Pressable,
ItemText: Text,
DragIndicator: View,
IndicatorWrapper: View,
Content: Animated.View,
ScrollView: View,
VirtualizedList: View,
FlatList: View,
SectionList: View,
SectionHeaderText: Text,
Icon: View,
AnimatePresence: View,
});
export default function MySheet() {
const [open, setOpen] = useState(false);
return (
<View>
<Pressable onPress={() => setOpen(true)}>
<Text>Open Sheet</Text>
</Pressable>
<Actionsheet isOpen={open} onClose={() => setOpen(false)}>
<Actionsheet.Backdrop onPress={() => setOpen(false)} />
<Actionsheet.Content>
<Actionsheet.DragIndicatorWrapper>
<Actionsheet.DragIndicator />
</Actionsheet.DragIndicatorWrapper>
<Actionsheet.Item onPress={() => setOpen(false)}>
<Actionsheet.ItemText>Delete</Actionsheet.ItemText>
</Actionsheet.Item>
<Actionsheet.Item onPress={() => setOpen(false)}>
<Actionsheet.ItemText>Share</Actionsheet.ItemText>
</Actionsheet.Item>
</Actionsheet.Content>
</Actionsheet>
</View>
);
}
Use useAccordion and useAccordionItem directly to build a web-accessible accordion without the creator factory.
import React from 'react';
import { View, Text, Pressable } from 'react-native';
import { useAccordion, useAccordionItem } from '@gluestack-core/index';
function RawAccordion() {
const state = useAccordion({ defaultExpandedKeys: new Set(['a']) });
const { triggerProps, contentProps } = useAccordionItem(
{ key: 'a' },
state
);
return (
<View>
<Pressable {...triggerProps}>
<Text>Section A</Text>
</Pressable>
<View {...contentProps}>
<Text>Content for section A</Text>
</View>
</View>
);
}
export default RawAccordion;
index.tsx / index.js - Dual-format barrel re-exporting every creator function and ARIA hook; import from here in application code.accordion/aria/ - useAccordion and useAccordionItem hooks plus their TypeScript types.accordion/creator/ - createAccordion factory, sub-component wrappers, animated height helper, and context.actionsheet/creator/ - createActionsheet factory with backdrop animation, drag gesture, and scroll-view variants.alert/creator/ - createAlert factory with Alert, AlertIcon, AlertText slots.alert-dialog/creator/ - createAlertDialog factory with backdrop, body, close button, content, and footer slots.avatar/creator/ - Avatar creator.button/aria/ - Button ARIA hooks.button/creator/ - Button creator.checkbox/aria/ - Checkbox ARIA hooks.checkbox/creator/ - Checkbox creator.divider/creator/ - Divider creator.fab/creator/ - Floating Action Button creator.form-control/creator/ - FormControl creator for label/error wiring.icon/creator/ - Icon creator.image/creator/ - Image creator.input/creator/ - Input creator.link/creator/ - Link creator.menu/aria/ - Menu ARIA hooks.menu/creator/ - Menu creator.modal/creator/ - Modal creator.overlay/creator/ - Shared overlay primitive (portal, backdrop).popover/creator/ - Popover creator.pressable/creator/ - Pressable creator.progress/creator/ - Progress bar creator.radio/aria/ - Radio ARIA hooks.radio/creator/ - Radio creator.select/creator/ - Select creator.slider/aria/ - Slider ARIA hooks.slider/creator/ - Slider creator.spinner/creator/ - Spinner creator.switch/aria/ - Switch ARIA hooks.switch/creator/ - Switch creator.textarea/creator/ - Textarea creator.toast/creator/ - Toast creator.tooltip/creator/ - Tooltip creator.react-native-reanimated not configured - The Actionsheet and AnimatedHeight helpers require Reanimated; add react-native-reanimated/plugin as the last Babel plugin and run pod install.index.tsx (ESM) instead of index.js (CJS) as the entry in your bundler's resolve.mainFields or alias config.tsconfig.json targets "moduleResolution": "bundler" or "node16" so re-exports resolve through the barrel correctly.Root, Item, Header, etc.) must be supplied to the creator; passing undefined silently drops that sub-component and causes runtime TypeError calls.ScrollView inside Actionsheet - Pass the native ScrollView from react-native directly to the ScrollView slot so the gesture responder chain resolves correctly; avoid wrapping it in another Animated component.@react-native-aria/* - All @react-native-aria packages must be the same minor version; mixed versions cause duplicate context errors at runtime.I have copied the gluestack-ui v3 core source into my project at `src/gluestack-core/`.
The integration guide is in `USAGE.md` in the same directory.
The upstream package is `gluestack-ui-v3` (mobile domain), source root `packages/gluestack-core/src`.
Please help me integrate these components into my existing React Native / Expo project step by step:
1. Read `USAGE.md` fully before taking any action.
2. Add the required npm dependencies listed in the "Required dependencies" section.
3. Configure `tsconfig.json` and `babel.config.js` path aliases so I can import from `@gluestack-core/index`.
4. Using only exports that appear in `src/gluestack-core/index.tsx`, create a `createAccordion` call that wraps my existing styled View/Pressable/Text components.
5. Do the same for any other components I need (list them).
6. Show me a working screen component that renders the composed components.
7. Point out any native build steps (pod install, prebuild) I need to run.
Do not invent any API that is not present in `src/gluestack-core/index.tsx` or the files referenced in `USAGE.md`.
The upstream source is part of the gluestack-ui project maintained by GeekyAnts. See source/LICENSE if present for the exact license terms (the repository uses the MIT license). Credit: GeekyAnts / gluestack team.
This product’s unique contribution is clean room implementation of valuable code block into AVCP compatible standard.
Hướng dẫn cài đặt đầy đủ và prompt tích hợp sẽ mở khóa sau khi mua.
Mobile App Templates & App Source Code
Miễn phí