@shawnlll/lit-demo
v0.1.8
Published
Small collection of Lit-based web components. Additional components are showcased at **https://shiwwenliu.github.io/lit-demo/**.
Readme
@shawnlll/lit-demo
Small collection of Lit-based web components. Additional components are showcased at https://shiwwenliu.github.io/lit-demo/.
Installation
pnpm add @shawnlll/lit-demo
# or npm install / yarn addQuick usage
Register every component (side-effect import):
import '@shawnlll/lit-demo'Then drop the custom element into any HTML:
<lw-button
type="success"
text="Save changes"
></lw-button>LwButton highlights
type="primary | success | warning | danger | info"controls theme colors.size="mini | small | medium | large"adjusts padding and font size.plain,round,disabled, andloadingtoggle visual states.- Pass text via the
textattribute, or omit it and use the default slot. - Emits native
clickevents; whenloadingistruethe button is automatically disabled to prevent accidental submits.
More components
Usage examples and prop tables are available in Storybook: https://shiwwenliu.github.io/lit-demo/.
