Welcome to the Kung Fu Garden
Explore various micro projects and platforms by x51 and friends.
@kung-fu/components v0.4.0
A collection of vanilla JavaScript components for enhancing HTML elements
This library provides several utilities for common UI patterns:
- Audio player with playlist support
- Automatic list style type rotation for nested lists
- Image to figure conversion for better semantics
Examples
// Import all components
import * as components from '@kung-fu/components';
// Use the components
components.createAudioPlayer('audio-container', 'default.mp3');
components.rotateListStyleType();
components.wrapImageWithFigure();
// Import specific components
import { createAudioPlayer, wrapImageWithFigure } from '@kung-fu/components';
// Use the components
createAudioPlayer('audio-container');
wrapImageWithFigure('.content-image');