Skip to main content
Glama

get-styling-patterns

Retrieve styling patterns for React Native Expo projects using NativeWind and Tailwind CSS. Covers className approaches, arbitrary values, CSS interop, configuration, and conditional styling techniques.

Instructions

Get styling patterns (NativeWind / Tailwind CSS). Call this when styling components. Covers NativeWind v4 className approach, arbitrary values, cssInterop for third-party components, Tailwind config, JS constants, conditional styles, and setup checklist. Use topic to get a specific section only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topicNoGet a specific section only. Available: nativewind, arbitrary-values, css-interop, tailwind-config, js-constants, conditional, checklist. Omit for full content.
compactNoIf true, returns rules only without code examples. Much shorter.

Implementation Reference

  • The handler function `getStylingPatterns` retrieves styling pattern documentation, supporting topic filtering and a compact mode.
    export const getStylingPatterns = (topic?: string, compact?: boolean): string =>
      resolvePattern(pattern, topic, compact);
  • src/index.ts:146-164 (registration)
    Registration of the `get-styling-patterns` tool in `src/index.ts`.
    server.tool(
      "get-styling-patterns",
      "Get styling patterns (NativeWind / Tailwind CSS). Call this when styling components. Covers NativeWind v4 className approach, arbitrary values, cssInterop for third-party components, Tailwind config, JS constants, conditional styles, and setup checklist. Use `topic` to get a specific section only.",
      {
        topic: z
          .string()
          .optional()
          .describe(
            "Get a specific section only. Available: nativewind, arbitrary-values, css-interop, tailwind-config, js-constants, conditional, checklist. Omit for full content."
          ),
        compact: z
          .boolean()
          .optional()
          .describe("If true, returns rules only without code examples. Much shorter."),
      },
      async ({ topic, compact }) => ({
        content: [{ type: "text", text: getStylingPatterns(topic, compact) }],
      })
    );
  • Input schema definition for the `get-styling-patterns` tool.
    {
      topic: z
        .string()
        .optional()
        .describe(
          "Get a specific section only. Available: nativewind, arbitrary-values, css-interop, tailwind-config, js-constants, conditional, checklist. Omit for full content."
        ),
      compact: z
        .boolean()
        .optional()
        .describe("If true, returns rules only without code examples. Much shorter."),
    },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ZaharGusyatin/react-native-expo-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server