React native component

From berkcangumusisik/claude-code-practices · View interactive version

React native component is an AI agent skill from the GitHub repository berkcangumusisik/claude-code-practices. Generates a React Native component with platform-specific styles and accessibility

How to use this skill

Skill file

Generate React Native Component

Component: $1

Description: $2

  1. Detect stack:
cat package.json | grep -E '"react-native"|"expo"|"nativewind"|"@shopify/restyle"|"tamagui"'
ls src/components/ components/ 2>/dev/null | head -5
  1. Read 1-2 existing components to match patterns.
  1. Generate the component:
import { StyleSheet, Text, TouchableOpacity, Platform } from 'react-native'

interface $1Props {
  label: string
  onPress: () => void
  disabled?: boolean
}

export function $1({ label, onPress, disabled }: $1Props) {
  return (
    <TouchableOpacity
      style={[styles.container, disabled && styles.disabled]}
      onPress={onPress}
      disabled={disabled}
      accessible
      accessibilityRole="button"
      accessibilityLabel={label}
      accessibilityState={{ disabled }}
    >
      <Text style={styles.label}>{label}</Text>
    </TouchableOpacity>
  )
}

const styles = StyleSheet.create({
  container: {
    padding: 16,
    borderRadius: 8,
    ...Platform.select({
      ios: { shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.1 },
      android: { elevation: 2 },
    }),
  },
  // ...
})
  1. Include:
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.