Candy heart

7 of 14 · Enter boxes it

No dependencies
Code format

Install with shadcn

Needs a free account token. Get a token

npx shadcn@latest add @movin/input-candy-heart

About this component

A message stamped on a conversation heart: each letter is pressed into the chalky sugar with a dip of the heart, a long message squeezes onto two lines, and Enter tumbles the heart into the box and slides in a blank one.

Dependencies
None
Difficulty
Intermediate
Reduced motion
Respected
Theme
Light and dark
Follows page color-scheme

Triggers3

  • State change
  • Click
  • Spring

Techniques4

  • clip-path
  • Keyframes
  • Radial gradient
  • State machine

Accessibility

Keyboard and screen readers

One native input named "Message on the candy heart"; the tray is aria-hidden and the count, the boxing and any refusal are announced.

Reduced motion

The heart swaps without tumbling.

Use it in anything you build, commercial and client work included. Licence

More inputs

See all

5 of 20 · sets in 8 s · Enter pours a new slab

Wet cementGet code

27 of 44 · the first letter is illuminated

Drop capGet code

5 of 8 · hard enamel, gold plate

Enamel pinGet code

5 of 10 · Enter varnishes it

MarquetryGet code