---
title: "camelCase"
description: "Convert a kebab-case string to camelCase by stripping dashes and uppercasing the following letter."
package: "@maz-ui/utils"
url: "https://maz-ui.com/ecosystem/utils/camel-case"
---

# camelCase

> Convert a kebab-case string to camelCase by stripping dashes and uppercasing the following letter.

- Package: `@maz-ui/utils`
- Import: `import { camelCase } from '@maz-ui/utils/helpers/camelCase'`
- Web: https://maz-ui.com/ecosystem/utils/camel-case

## Usage

```ts
import { camelCase } from '@maz-ui/utils'

camelCase('my-component-name') // → 'myComponentName'
camelCase('hello-world') // → 'helloWorld'
```

## API

```ts
function camelCase(str: string): string
```

| Parameter | Type     | Description           |
| --------- | -------- | --------------------- |
| `str`     | `string` | The string to convert |

## Notes

`camelCase` is intentionally minimal - it only handles `kebab-case` input. For more general normalization (snake_case, spaces, PascalCase), use [`normalizeString`](./normalize-string.md) with the `case: 'camelCase'` option.
