# Rating (UI SDK): Sizes

> `size` is `sm`, `default` or `lg`.

Canonical: https://hextaui.com/docs/ui-sdk-rating/examples/sizes

Component docs: https://hextaui.com/docs/ui-sdk-rating

## Add this example

```bash
npx shadcn@latest add https://hextaui.com/r/ui-sdk-rating-sizes.json
```

This adds `components/examples/ui-sdk-rating/sizes.tsx` with the Rating component and the HextaUI theme tokens.

## Source

```tsx title="components/examples/ui-sdk-rating/sizes.tsx"
import { Rating, RatingItem } from "@/components/ui/ui-sdk-rating"

function UiSdkRatingSizes() {
  return (
    <div className="flex flex-col items-center gap-4">
      <Rating aria-label="Small rating" size="sm" defaultValue={3}>
        <RatingItem />
      </Rating>
      <Rating aria-label="Default rating" defaultValue={3}>
        <RatingItem />
      </Rating>
      <Rating aria-label="Large rating" size="lg" defaultValue={3}>
        <RatingItem />
      </Rating>
    </div>
  )
}

export { UiSdkRatingSizes }
```

## Props in this example

### Rating

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `defaultValue` | `number \| null` | – |  |
| `size` | `"sm" \| "default" \| "lg"` | `"default"` |  |

## More Rating examples

- [Half stars](https://hextaui.com/docs/ui-sdk-rating/examples/half)
- [Read-only](https://hextaui.com/docs/ui-sdk-rating/examples/read-only)
- [Deselectable](https://hextaui.com/docs/ui-sdk-rating/examples/deselectable)
- [Controlled](https://hextaui.com/docs/ui-sdk-rating/examples/controlled)
- [Form](https://hextaui.com/docs/ui-sdk-rating/examples/form)
- [Custom icon](https://hextaui.com/docs/ui-sdk-rating/examples/custom-icon)
- [Disabled](https://hextaui.com/docs/ui-sdk-rating/examples/disabled)
- [Right to left](https://hextaui.com/docs/ui-sdk-rating/examples/rtl)
