Skip to content

Conversation

@tobiasstrebitzer
Copy link

Description

Adds support for configurable file casing when installing components from the registry.

Changes

  • Added change-case dependency to package.json
  • Added fileCase setting to config schema (see enum options below)
  • Updated transform-import.ts to ensure import dependencies follow the same case
  • Updated update-files.ts to apply the file case setting

Supported File Cases

  • camelCase: exampleComponent.tsx
  • capitalCase: Example Component.tsx
  • constantCase: EXAMPLE_COMPONENT.tsx
  • dotCase: example.component.tsx
  • kebabCase: example-component.tsx
  • pascalCase: ExampleComponent.tsx
  • pascalSnakeCase: Example_Component.tsx
  • pathCase: example/component.tsx
  • sentenceCase: Example component.tsx
  • snakeCase: example_component.tsx
  • trainCase: Example-Component.tsx

Testing

  • ✅ Tested npx shadcn@latest add command to ensure file casing applies correctly
  • ✅ Tested adding multiple components to ensure relative imports are correct
  • ✅ Ensured all existing tests are passing

Related

@vercel
Copy link
Contributor

vercel bot commented Dec 24, 2025

@tobiasstrebitzer 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.

[feat]: Change component file name case Feature request: Case option in CLI/config

1 participant