Toolverse
All skills

writing-react-native-storybook-stories

by storybookjs

Create and edit React Native Storybook stories using Component Story Format (CSF). Use when writing .stories.tsx files, adding stories to React Native components, configuring Storybook addons (controls, actions, backgrounds, notes), setting up argTypes, decorators, parameters,

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Category
Mobile
Views
4

About this skill

Create and edit React Native Storybook stories using Component Story Format (CSF). Use when writing .stories.tsx files, adding stories to React Native components, configuring Storybook addons (controls, actions, backgrounds, notes), setting up argTypes, decorators, parameters, or working with portable stories for testing. Applies to any task involving @storybook/react-native story authoring.

How to use

  1. Utwórz plik historii obok komponentu React Native, nadając mu nazwę ComponentName.stories.tsx. Plik powinien zawierać domyślny eksport obiektu meta oraz nazwane eksporty dla poszczególnych historii.

  2. Zaimportuj typy Meta i StoryObj z @storybook/react-native, a także Twój komponent. Skonfiguruj obiekt meta z właściwością component wskazującą na komponent, którym chcesz się zajmować.

  3. Zdefiniuj poszczególne historie jako nazwane eksporty w formacie UpperCamelCase, na przykład Basic, Primary czy Secondary. Każda historia powinna być typowana jako StoryObj i zawierać właściwość args z wartościami właściwości komponentu.

  4. Aby dodać kontrolki dla właściwości, skonfiguruj argTypes w obiekcie meta. Dla zaawansowanych scenariuszy użyj właściwości render do zdefiniowania niestandardowej funkcji renderowania, na przykład opakowując komponent w ScrollView.

  5. Dodaj dekoratory i parametry do obiektu meta lub do poszczególnych historii, aby skonfigurować dodatki Storybook takie jak backgrounds, actions czy notes.

  6. Jeśli potrzebujesz współdzielić właściwości między historiami, zdefiniuj je w jednej historii, a następnie rozszerz je w innych przy użyciu spread operatora, na przykład {...Primary.args, variant: 'secondary'}.

Related skills

ios-simulator-skill

by conorluddy

21 production-ready scripts for iOS app testing, building, and automation. Provides semantic UI navigation, build automation, accessibility testing, and simulator lifecycle management. Optimized for AI agents with minimal token output.

Mobile
19154

openscad

by mitsuhiko

Create and render OpenSCAD 3D models. Generate preview images from multiple angles, extract customizable parameters, validate syntax, and export STL files for 3D printing platforms like MakerWorld.

Mobile
4291

mobile-design

by sickn33

Mobile-first design and engineering doctrine for iOS and Android apps. Covers touch interaction, performance, platform conventions, offline behavior, and mobile-specific decision-making. Teaches principles and constraints, not fixed layouts. Use for React Native, Flutter, or

Mobile
6091

kotlin-multiplatform

by vitorpamplona

Platform abstraction decision-making for Amethyst KMP project. Guides when to abstract vs keep platform-specific,\nsource set placement (commonMain, jvmAndroid, platform-specific), expect/actual patterns. Covers primary targets\n(Android, JVM/Desktop, iOS) with web/wasm future

Mobile
15105

build-iphone-apps

by glittercowboy

Build professional native iPhone apps in Swift with SwiftUI and UIKit. Full lifecycle - build, debug, test, optimize, ship. CLI-only, no Xcode. Targets iOS 26 with iOS 18 compatibility.

Mobile
1182

sequential-thinking

by mrgoonie

Use when complex problems require systematic step-by-step reasoning with ability to revise thoughts, branch into alternative approaches, or dynamically adjust scope. Ideal for multi-stage analysis, design planning, problem decomposition, or tasks with initially unclear scope.

Mobile
60238