Skip to content

feat: add canned CSS animation utilities - #4545

Open
OscarTheWhiteHatHacker wants to merge 1 commit into
skeletonlabs:mainfrom
OscarTheWhiteHatHacker:feat/canned-animations
Open

feat: add canned CSS animation utilities#4545
OscarTheWhiteHatHacker wants to merge 1 commit into
skeletonlabs:mainfrom
OscarTheWhiteHatHacker:feat/canned-animations

Conversation

@OscarTheWhiteHatHacker

Copy link
Copy Markdown

Summary

Adds a curated set of canned CSS animations to Skeleton, exposed as Tailwind animate-* utilities — no custom keyframes required. This addresses the feature request in #3214.

Covers the most common UI animation needs:

Entryanimate-pop-in, animate-fade-in, animate-zoom-in, animate-slide-in-up/down/left/right
Attentionanimate-shake (form errors), animate-wiggle, animate-pulse-soft

Implementation

  • packages/skeleton/src/keyframes/animations.css — 10 original keyframes, prefixed skeleton- to avoid naming collisions with user keyframes.
  • packages/skeleton/src/base/theme.css — new --animate-* theme tokens (Tailwind v4 @theme), so durations/easing can be overridden per project.
  • packages/skeleton/src/index.css — imports the new keyframes.
  • Docs — new "Animations" page under Tailwind Utilities with live examples.
  • Changeset — minor bump for @skeletonlabs/skeleton.

Verification

  • Compiled packages/skeleton/src/index.css with Tailwind CSS v4.3.3: all 10 animate-* utilities generated, all 10 keyframes emitted.
  • Verified in a real browser: each element's computed animation-name/duration/iteration-count resolves correctly (e.g. skeleton-shake 0.5s × 1, skeleton-wiggle 0.6s infinite); animations visibly run (pop/zoom overshoot, wiggle rotation, pulse fade).
  • prettier --check passes on all changed files.

Entry animations use both fill mode (elements start hidden); docs show the motion-reduce:animate-none pattern for reduced-motion users.

@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
www.skeleton.dev Ready Ready Preview Aug 7, 2026 10:16am

Request Review

@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown

@OscarTheWhiteHatHacker is attempting to deploy a commit to the Skeleton Labs Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot

changeset-bot Bot commented Aug 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 85bc61e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@skeletonlabs/skeleton Minor
@skeletonlabs/skeleton-svelte Minor
skeleton Minor
@skeletonlabs/docs Minor
@skeletonlabs/skeleton-common Minor
@skeletonlabs/skeleton-react Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Adds a curated set of reusable micro-animations exposed as Tailwind
`animate-*` utilities, covering entry effects (pop-in, fade-in,
zoom-in, slide-in-*) and attention effects (shake, wiggle, pulse-soft).

Keyframes are prefixed with `skeleton-` to avoid naming collisions
and defined via `--animate-*` theme tokens so durations and easing can
be customized per project. Includes docs and examples. Ref skeletonlabs#3214.
@endigo9740

Copy link
Copy Markdown
Contributor

@OscarTheWhiteHatHacker this is an interesting contribution. I can see the value. Just now I'm currently in the midst of trying to sort out a personal emergency, so note my review my be delayed for now. Thanks for the support though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants