kebab-case to camelCase
kebab-case is common for URLs, CSS classes and properties, HTML attributes and CLI flags; camelCase is used for JavaScript / TypeScript / Java variables and JSON keys in many web APIs. Moving data between languages, databases and APIs often means converting between the two.
Examples
| kebab-case | camelCase |
|---|---|
| background-color | backgroundColor |
| font-size | fontSize |
| user-profile-card | userProfileCard |
| max-width | maxWidth |
| data-test-id | dataTestId |