4.0.9 • Published 2 years ago
@nodestrap/element v4.0.9
<Element />
A basic building block without any applied stylesheet of nodestrap components.
This is the most generic element for the base of (more) complex components.
Preview
<Element>
hello world
</Element>
Rendered to:
<div>
hello world
</div>
<Element tag='span' classes={['button', 'awesome']} variantClasses={['big', 'dark']} stateClasses={['hovered']}>
hello world
</Element>
Rendered to:
<span class="button awesome big dark hovered">
hello world
</span>
<Element semanticTag={['ul', 'ol']} semanticRole='list'>
hello world
</Element>
<Element semanticTag={['ul', 'ol']} semanticRole='list' tag='ul'>
hello world
</Element>
<Element semanticTag={['ul', 'ol']} semanticRole='list' tag='ol'>
hello world
</Element>
<Element semanticTag={['ul', 'ol']} semanticRole='list' tag='div'>
hello world
</Element>
Rendered to:
<ul>
hello world
</ul>
<ul>
hello world
</ul>
<ol>
hello world
</ol>
<div role="list">
hello world
</div>
Features
- Dynamic tag name
tag='div'
. - Smart semantic tag & role.
- Access the DOM element via
elmRef=
(similar toref=
).
Installation
Using npm:
npm i @nodestrap/element
Support Us
If you feel our lib is useful for your projects,
please make a donation to avoid our project from extinction.
We always maintain our projects as long as we're still alive.
4.0.9
2 years ago
4.0.8
2 years ago
4.0.5
2 years ago
4.0.7
2 years ago
4.0.6
2 years ago
4.0.4
2 years ago
4.0.1
2 years ago
4.0.0
2 years ago
4.0.3
2 years ago
4.0.2
2 years ago
2.0.24
3 years ago
2.0.22
3 years ago
2.0.23
3 years ago
2.0.20
3 years ago
2.0.21
3 years ago
2.0.19
3 years ago
2.0.18
3 years ago
2.0.17
3 years ago
2.0.16
3 years ago
2.0.15
3 years ago
2.0.13
3 years ago
2.0.14
3 years ago
1.0.13
3 years ago
0.0.13
3 years ago