find_prop_usage
Searches JSX files to find all instances where a given prop is used, helping audit usage and patterns.
Instructions
Find all usages of a specific prop across JSX/React files.
Use this tool when you need to:
Locate where a prop is used throughout the codebase
Find all components that use a specific prop like "onClick", "className", etc.
Audit prop usage for refactoring or deprecation
Understand prop propagation patterns
EXAMPLES:
Find all onClick handlers in current directory: { "propName": "onClick" }
Find className usage in components directory: { "propName": "className", "directory": "src/components" }
Find variant prop only on Button components in current directory: { "propName": "variant", "componentName": "Button" }
Find all disabled props in specific directory: { "propName": "disabled", "directory": "src/forms" }
Returns:
List of component instances using the prop
File paths and line numbers
Values passed to the prop
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| propName | Yes | Name of the prop to search for (e.g., "onClick", "className", "variant") | |
| directory | No | Directory to search in (defaults to current directory) | . |
| componentName | No | Filter: only search within this component name (e.g., "Button") |