kk-web-components
v1.0.7
Published
A collection of reusable web components, including ui-icon and others.
Downloads
241
Maintainers
Readme
KK Web Components
A collection of reusable web components.
Installation
npm install kk-web-components
Usage
Importing the Components
import "kk-web-components";
// Optionally configure UiIcon globally
window.UiIcon = {
version: "1.0",
filePath: "/icons/iconset.svg",
defaultSize: 24,
};
Components
<ui-icon>
- Attributes:
name
: The name of the icon in the sprite sheet.size
: The size of the icon (default:24
).rotation
: Rotate the icon in degrees (default:0
).viewbox
: Optional customviewBox
for the SVG.
Example:
<ui-icon name="home" size="32" rotation="45"></ui-icon>
<ui-icon name="settings"></ui-icon>