Skip to content

Conversation

@antoinekm
Copy link

Hey @shadcn!

I've been working components types and thought we could improve the developer experience by using explicit type aliases instead of inline React.ComponentProps types (for v4, maybe we should also add it for v3?).

Changes

  • Add explicit type definitions in all components
  • Place types directly before their corresponding component functions
  • Export types separately using export type {}

Benefits

  • Better IntelliSense and autocompletion
  • Self-documenting component APIs
  • Easier component extension and customization
  • Consistent patterns across codebase

This is a non-breaking change that improves TypeScript developer experience without affecting runtime behavior. Planning to roll this out to more components if this approach looks good!

Related issues
Close: #51, #120, #167, #448, #739, #1013, #2014, #4082, #4083, #7570

@vercel
Copy link

vercel bot commented Jun 13, 2025

@antoinekm is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

How can I extends the props of a component?

2 participants