FAQ
Does TSkeleton depend on Tailwind CSS or any framework?
No. TSkeleton ships zero runtime dependencies. Each component is a plain custom element with its own shadow DOM and embedded stylesheet. The original standalone templates used the Tailwind CDN, but the library does not.
Which frameworks can I use it with?
Any of them. The components are standard Web Components, so they work with React, Vue, Svelte, Angular and plain HTML. See Usage for examples.
How do I change the skeleton colors?
Three ways:
- Per-instance attributes:
color,color-dark,color-light,highlight. - CSS variables on the element or an ancestor (for example
--sk-color). - Globally with
configure({ ... }).
See Configuration.
How do I stop the animation?
Set the variant attribute to none:
<skeleton-youtube variant="none"></skeleton-youtube>
Can I use just one component without the rest?
Yes. Import the subpath to register only that component:
import 'tskeleton/facebook'
This keeps the bundle small and is tree-shaking friendly.
Why is registerAll() called more than once safe?
registerAll() is idempotent. defineSkeleton() ignores names that are already registered and no-ops outside the browser.
Can I create my own skeleton?
Yes. Extend SkeletonBase and implement render(), then register it with defineSkeleton(name, MyClass). Custom skeletons inherit all theming behavior. See Usage and API Reference.
Does the package work during server-side rendering?
Importing the library is SSR-safe — SkeletonBase falls back to a plain class and defineSkeleton()/configure() no-op when HTMLElement, customElements or document are unavailable. Register and render components in the browser.
What is the version of the package?
The current version is 0.2.0 (see package.json and .version). The package has not been published to the npm registry yet.