Component packs › Marble › Marble Rating

Marble Rating

Marbles drop into a cup for each point and bounce to rest; lower the score and the extra ones hop out and roll away.

Marble Rating is a rating from Marble, a component pack with 6 marble controls: Controls made of glass marbles that roll, knock and settle like the real thing. Price: $2 for the whole pack.

Built with: bounce with loss, staggered drops, radio group.

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

Marble Rating props

PropTypeDefaultDescription
valuenumber
countnumber
labelstring
namesstring[]
onChange(v: number) => void
autoplaynumber | false

Methods on the ref

Use it in React

import MarbleRating from './MarbleRating';

<MarbleRating />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Marble

Good for: Toggle switches, Loaders and progress, Physics UI components.