0.9.0-alpha.5 • Published 6 hours ago

tenoxui v0.9.0-alpha.5

Weekly downloads
-
License
MIT
Repository
github
Last release
6 hours ago

Using npm:

npm i tenoxui --save-dev

Using CDN :

<script src="https://cdn.jsdelivr.net/npm/tenoxui@latest/dist/js/tui.min.js"></script>

Here's a simple usage of tenoxui css :

<div class="box-200px flex-parent-center br-8px bg-#0d0d0d p-2rem">
  <h1 class="fs-1.5rem fw-500 tc-lightgreen">Hello World!</h1>
</div>
  1. makeStyle function

Using selector and the class names as parameter, you can change the style of the element :

makeStyle("body", "bg-#0d0d0d tc-white p-20px");

Note: makeStyle only give styles to one selector

  1. makeStyles function

Using object as parameter to give styles into element :

makeStyles({
  body: "bg-#0d0d0d tc-white p-20px",
  nav: "position-fixed top-0 p-10px",
  "h1.logo": "fs-1rem fw-600",
  // Try re-usable class
  ".card": "display-flex flex-parent-center",
  ".flex": "display-flex",
  ".center": "flex-parent-center",
});

Using re-usable class:

<div class="flex center">...</div>

The div above will have same style as :

div {
  display: flex;
  align-items: center;
  justify-content: center;
}
  1. Nested Style

makeStyles also support nested styles because it's defined as an object.

HTML:

<div class="container">
  <div class="card">
    <h2 class="title">Hello</h2>
    <p class="desc">Lorem ipsum dolor sit amet consectetur.</p>
  </div>
  <div class="card">
    <h2 class="title">World</h2>
    <p class="desc">Lorem ipsum dolor sit amet consectetur.</p>
  </div>
</div>

JavaScript :

makeStyles({
  body: "bg-#0d0d0d tc-white p-20px",
  ".container": {
    "": "display-flex gap-20px jc-center", // Empty string will treated as parent's style
    // Card class will only applied when its inside container class, outside it will not styled
    ".card": {
      "": "p-20px br-8px bg-lightblue",
      ".title": "fs-1.4rem fw-600",
      ".desc": "fs-14px fw-500 lh-1.4 ta-justify",
    },
  },
});

The css style will be like this :

.container {
  display: flex;
  gap: 20px;
  justify-content: center;

  .card {
    padding: 20px;
    border-radius: 8px;
    background: lightblue;

    .title {
      font-size: 1.4rem;
      font-weight: 600;
    }

    .desc {
      font-size: 14px;
      font-weight: 500;
      line-height: 1.4;
      text-align: justify;
    }
  }
}

Full documentation on TenoxUI Documentation.

0.9.0-alpha.3

2 days ago

0.9.0-alpha.4

6 hours ago

0.9.0-alpha.5

6 hours ago

0.9.0-alpha.1

3 days ago

0.9.0-alpha.2

3 days ago

0.8.0

8 days ago

0.7.1

29 days ago

0.7.0

1 month ago

0.6.1

2 months ago

0.6.0

2 months ago

0.5.1

2 months ago

0.5.0

4 months ago

0.4.29

4 months ago

0.4.28

4 months ago

0.4.26

4 months ago

0.4.27

4 months ago

0.4.24

4 months ago

0.4.25

4 months ago

0.4.20

4 months ago

0.4.21

4 months ago

0.4.22

4 months ago

0.4.23

4 months ago

0.4.19

4 months ago

0.4.9

4 months ago

0.4.8

4 months ago

0.4.10

4 months ago

0.4.17

4 months ago

0.4.18

4 months ago

0.4.15

4 months ago

0.4.16

4 months ago

0.4.13

4 months ago

0.4.14

4 months ago

0.4.11

4 months ago

0.4.12

4 months ago

0.4.5

4 months ago

0.4.4

4 months ago

0.4.7

4 months ago

0.4.6

4 months ago

0.4.3

4 months ago

0.4.2

4 months ago

0.4.1

5 months ago

0.4.0

5 months ago

0.3.1

5 months ago

0.2.10

5 months ago

0.3.0

5 months ago

0.2.1

5 months ago

0.2.7

5 months ago

0.2.6

5 months ago

0.2.9

5 months ago

0.2.8

5 months ago

0.2.3

5 months ago

0.2.2

5 months ago

0.2.5

5 months ago

0.2.4

5 months ago

0.2.0

5 months ago

0.1.4

5 months ago

0.1.3

5 months ago

0.1.5

5 months ago

0.1.0

5 months ago

0.1.2

5 months ago

0.0.3

5 months ago

0.1.1

5 months ago

0.0.4

5 months ago

0.0.2

5 months ago

0.0.1

5 months ago