artifacts.space/Docs
Sign in

Get started

  • Introduction
  • Quickstart
  • Client setup

Reference

  • MCP reference
  • Formats
  • Themes

Work together

  • Sharing, teams, and agents

Run it

  • Limits and quotas
  • Self-hosting

Earlier formats

  • JSON Render
  • Components

    Layout

    • Section
    • Stack
    • Grid
    • Card
    • Tabs
    • Accordion
    • Separator
    • Box

    Content

    • Heading
    • Text
    • Markdown
    • Code
    • Callout
    • Badge
    • List
    • Steps
    • Link
    • Quote
    • Icon
    • Avatar
    • AvatarGroup
    • Kbd
    • Rating

    Data

    • Table
    • Metric
    • Chart
    • KeyValue
    • Progress
    • Timeline
    • Diagram

    Planning

    • Board
    • Calendar

    Inputs

    • Checklist
    • Checkbox
    • Select
    • Switch
    • Slider
    • Button
    • Input
    • Textarea

    Media

    • Image
    • File
    • Placeholder
  • Dynamic props and actions
  • Charts
  • Section templates
  • Validation
  • Stout guarantees
  • Playground
  • Prompting your agent
artifacts.space
DocsSourceSign inCreate accountSupportPrivacyTerms

© 2026 Webrenew LLC

Components · Content

Rating

A star rating to look at, not to set. value from 0 to max (default 5 stars), in whole or half stars. Screen readers hear "4.5 out of 5", after label when set ("Average rating: 4.5 out of 5"). showValue writes the number beside the stars; size: sm, md, or lg.

ExamplesLink to this section

A product rating
4.5

from 1,280 reviews

Show JSONHide JSON
{
  "version": 1,
  "root": "row",
  "elements": {
    "row": {
      "type": "Box",
      "props": {
        "direction": "horizontal",
        "align": "center",
        "gap": "sm",
        "wrap": true
      },
      "children": ["stars", "count"]
    },
    "stars": {
      "type": "Rating",
      "props": { "value": 4.5, "label": "Average rating", "showValue": true }
    },
    "count": {
      "type": "Text",
      "props": { "text": "from 1,280 reviews", "tone": "muted", "size": "sm" }
    }
  }
}
Sizes
Show JSONHide JSON
{
  "version": 1,
  "root": "box",
  "elements": {
    "box": {
      "type": "Box",
      "props": { "gap": "sm" },
      "children": ["small", "large"]
    },
    "small": { "type": "Rating", "props": { "value": 3, "size": "sm" } },
    "large": { "type": "Rating", "props": { "value": 5, "size": "lg" } }
  }
}

PropsLink to this section

Generated from the zod schema the server validates with. Unknown props are ignored with a warning. Any prop can also be a dynamic value such as { "$state": "/path" }; it is checked again once it resolves.

PropTypeLimits and defaults
valuerequirednumber0–10
maxinteger1–10
labelstringmax 80 chars
showValueboolean—
size"sm" | "md" | "lg"—

RulesLink to this section

  • A Rating is to look at: a reader cannot set it.
  • value is a whole or half star, from 0 to max (1 to 10, default 5).
  • Screen readers hear the score in words ("Average rating: 4.5 out of 5"), not each star.

Children and eventsLink to this section

Rating is a leaf: it does not show children. Validation warns when a leaf has some; wrap them in a Stack or Card instead.

It emits no events.

Edit this page on GitHub
PreviousKbdNextTable

On this page

  • Examples
  • Props
  • Rules
  • Children and events