# createRating API

> Auto-generated API reference for `createRating` from @vuetify/v0 (Vuetify0).
> Source of truth: https://0.vuetifyjs.com/api/create-rating

## Related

- https://0.vuetifyjs.com/composables/forms/create-rating
- https://0.vuetifyjs.com/composables/forms/create-numeric
- https://0.vuetifyjs.com/composables/forms/create-slider
- https://0.vuetifyjs.com/components/forms/rating
- https://0.vuetifyjs.com/composables/data/create-pagination

## Functions

### createRating

Creates a rating instance.

```ts
(_options?: RatingOptions) => R
```

### createRatingContext

Creates a rating context for dependency injection.

```ts
(_options?: RatingContextOptions) => ContextTrinity<R>
```

### useRating

Returns the current rating instance from context.

```ts
(namespace?: string) => R
```

## Options

| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| `value` | `number \| ShallowRef<number> \| undefined` | `0` | no | Initial value or ref for v-model. |
| `size` | `MaybeRefOrGetter<number> \| undefined` | `5` | no | Total items. |
| `half` | `MaybeRefOrGetter<boolean> \| undefined` | `false` | no | Enable 0.5 step increments. |

## Methods

| Name | Type | Description |
|---|---|---|
| `select` | `(value: number) => void` | Set rating to specific value |
| `next` | `() => void` | Increment by step (1 or 0.5) |
| `prev` | `() => void` | Decrement by step (1 or 0.5) |
| `first` | `() => void` | Set to 0 |
| `last` | `() => void` | Set to size |

## Properties

| Name | Type | Description |
|---|---|---|
| `value` | `WritableComputedRef<number, number>` | Current rating, clamped to 0–size |
| `size` | `number` | Total items |
| `half` | `boolean` | Whether half-steps are enabled |
| `items` | `ComputedRef<RatingItemDescriptor[]>` | Array of items with computed state |
| `isFirst` | `Readonly<Ref<boolean, boolean>>` | Whether value is at minimum (0) |
| `isLast` | `Readonly<Ref<boolean, boolean>>` | Whether value is at maximum (size) |
