Shuffle

PreviousNext

Animated text reveal where characters shuffle before settling.

Docs
react-bitscomponent

Preview

Loading preview…
Shuffle/Shuffle.css
.shuffle-parent {
  display: inline-block;
  white-space: normal;
  word-wrap: break-word;
  will-change: transform;
  line-height: 1;
  font-size: 4rem;
  font-family: 'Press Start 2P', sans-serif;
  text-transform: uppercase;
  visibility: hidden;
}

.shuffle-parent.is-ready {
  visibility: visible;
}

.shuffle-char-wrapper {
  display: inline-block;
  overflow: hidden;
  vertical-align: baseline;
  position: relative;
}

.shuffle-char-wrapper > span {
  display: inline-flex;
  will-change: transform;
}

.shuffle-char {
  line-height: 1;
  display: inline-block;
  text-align: center;
}

Installation

npx shadcn@latest add @react-bits/Shuffle-TS-CSS

Usage

import { ShuffleTSCSS } from "@/components/Shuffle-TS-CSS"
<ShuffleTSCSS />