# @scaleway/use-random-name

> A small react utility to generate a random name

Latest version **2.0.2** (published 2026-05-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install @scaleway/use-random-name
pnpm add @scaleway/use-random-name
yarn add @scaleway/use-random-name
bun add @scaleway/use-random-name
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2026-05-21 |
| First published | 2021-11-18 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=24.x |
| Dependencies | 1 |
| Unpacked size | 3.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 36 |
| Maintainers | jremy_scw13, scaleway-bot, imanu, vincentaudebert, maliszewskid, phiphi, scaleway-serverless-team |

## Links

- npm: https://www.npmjs.com/package/@scaleway/use-random-name
- Repository: https://github.com/scaleway/scaleway-lib
- npm.io page: https://npm.io/package/@scaleway/use-random-name

## Dependencies (1)

- [@scaleway/random-name](https://npm.io/package/@scaleway/random-name.md) 6.0.2

## Recent versions

- 2.0.2 (latest) — 2026-05-21
- 2.0.1 — 2026-05-21
- 2.0.0 — 2026-05-19
- 1.0.12 — 2026-05-11
- 1.0.11 — 2026-04-15
- 1.0.10 — 2026-02-10
- 1.0.8 — 2025-12-24
- 1.0.7 — 2025-06-23
- 1.0.6 — 2024-12-30
- 1.0.5 — 2024-12-30
- 1.0.4 — 2024-09-12
- 1.0.3 — 2024-05-02
- 1.0.2 — 2024-04-26
- 1.0.1 — 2024-04-23
- 1.0.0 — 2024-03-06
- … 9 more at https://npm.io/package/@scaleway/use-random-name/versions

## README

# `@scaleway/random-name`

A tiny utility to generate random names

Fully inspired by [Moby name generator](https://github.com/moby/moby/blob/master/pkg/namesgenerator/names-generator.go)

---

## Install

```bash
$ pnpm add @scaleway/use-random-name
```

## Usage

As a React hook

```js
import React from 'react'
import useRandomName from '@scaleway/random-name'

const Component = () => {
  const name = useRandomName()

  return <span>{name}</span>
}
```

You can also access the underlying @scaleway/random-name package with a named export

```js
import { randomName } from '@scaleway/use-random-name'

// randomName(prefix: string = '', separator: string = '-'): string

randomName() // => "admiring-allen"
randomName('superb') // => "superb-admiring-allen"
randomName('superb', '_') // => "superb_admiring_allen"
randomName('', '_') // => "admiring_allen"
```

---
_Source: https://npm.io/package/@scaleway/use-random-name · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
