React Props First is a VS Code extension for React IntelliSense that prioritizes custom JSX and TSX props before inherited DOM and ARIA attributes in autocomplete.
Use it when component-specific props like variant, size, or loading are buried below inherited attributes such as disabled, onClick, and aria-label.
Install React Props First from the Visual Studio Marketplace, or run:
code --install-extension yurii.react-props-firstReact Props First hooks into TypeScript's completion pipeline through a TypeScript server plugin. TypeScript still produces the normal IntelliSense completion list; the plugin only changes each completion item's sortText.
When completion is requested inside a JSX opening tag, the plugin:
- Finds the JSX component at the cursor.
- Asks TypeScript for the component's props type.
- Checks where each prop was declared.
- Ranks props declared in project or component code before props inherited from React, DOM, and ARIA types.
For example, in this component:
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
variant?: "primary" | "secondary";
loading?: boolean;
}
function Button(props: ButtonProps) {
return <button {...props} />;
}variant and loading are ranked before inherited DOM and ARIA attributes like disabled, onClick, and aria-label.
React Props First works best with typed React components in .tsx files:
<Button />It also supports .jsx files when TypeScript can infer the component's props, most commonly through JSDoc:
/**
* @typedef {React.ButtonHTMLAttributes<HTMLButtonElement> & {
* variant?: "primary" | "secondary",
* loading?: boolean
* }} ButtonProps
*/
/** @param {ButtonProps} props */
function Button(props) {
return <button {...props} />;
}Plain untyped JSX is not reliable because JavaScript does not define a formal prop type:
function Button(props) {
return <button {...props} />;
}In that exact case, TypeScript does not know which custom props exist, so the extension cannot prioritize custom props.
The extension does not change completions outside JSX attribute-name positions, and it does not add, remove, or rewrite completion items.
reactPropsFirst.enabled: enable or disable completion ordering.reactPropsFirst.enableJavaScript: enable ordering in.jsxfiles when TypeScript can infer component props.reactPropsFirst.debug: write diagnostic messages to the TypeScript server log.
npm install
npm testCheck the published extension metadata and download count:
npx vsce show yurii.react-props-firstPublisher dashboard:
https://marketplace.visualstudio.com/manage/publishers/yurii
Use Conventional Commits for commit messages.
Examples:
feat: add jsx prop completion rankingfix: avoid sorting outside jsx attributeschore: update lint configuration

