Back to Skills

react-native-web-styling

verified

Use when styling React Native Web components. Provides patterns for StyleSheet API, platform-specific styles, responsive design, and theming.

View on GitHub

Marketplace

han

TheBushidoCollective/han

Plugin

jutsu-react-native-web

Technique

Repository

TheBushidoCollective/han
60stars

jutsu/jutsu-react-native-web/skills/react-native-web-styling/SKILL.md

Last Verified

January 24, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/TheBushidoCollective/han/blob/main/jutsu/jutsu-react-native-web/skills/react-native-web-styling/SKILL.md -a claude-code --skill react-native-web-styling

Installation paths:

Claude
.claude/skills/react-native-web-styling/
Powered by add-skill CLI

Instructions

# React Native Web - Styling

Comprehensive styling patterns for React Native Web, including responsive design, theming, and platform-specific styles.

## Key Concepts

### StyleSheet API

Use `StyleSheet.create()` for optimized styles:

```typescript
import { StyleSheet } from 'react-native';

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    padding: 16,
  },
  text: {
    fontSize: 16,
    color: '#333',
    lineHeight: 24,
  },
});
```

### Flexbox Layout

React Native uses Flexbox for layout (defaults differ from web):

```typescript
const styles = StyleSheet.create({
  // Default flexDirection is 'column' (not 'row' like web)
  container: {
    flex: 1,
    flexDirection: 'row',
    justifyContent: 'space-between',
    alignItems: 'center',
  },
});
```

### Platform-Specific Styles

Use `Platform.select()` for different styles per platform:

```typescript
import { Platform, StyleSheet } from 'react-native';

const styles = StyleSheet.create({
  container: {
    ...Platform.select({
      web: {
        maxWidth: 1200,
        marginHorizontal: 'auto',
      },
      native: {
        paddingHorizontal: 16,
      },
    }),
  },
});
```

## Best Practices

### Responsive Design

✅ Use percentage-based widths and flexbox:

```typescript
const styles = StyleSheet.create({
  container: {
    width: '100%',
    maxWidth: 1200,
  },
  column: {
    flex: 1,
    minWidth: 300,
  },
  row: {
    flexDirection: 'row',
    flexWrap: 'wrap',
  },
});
```

### Media Queries (Web)

✅ Use `useWindowDimensions` for responsive behavior:

```typescript
import { useWindowDimensions, StyleSheet } from 'react-native';

function ResponsiveComponent() {
  const { width } = useWindowDimensions();
  const isDesktop = width >= 768;

  return (
    <View style={[styles.container, isDesktop && styles.containerDesktop]}>
      {/* Content */}
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    padding: 16,
  },
  contai

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
7039 chars