# stenax

> Stenax UI Kit

Latest version **0.1.0** (published 2018-08-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install stenax
pnpm add stenax
yarn add stenax
bun add stenax
```

Provides the command `stenax`.

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2018-08-25 |
| First published | 2018-08-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=6 |
| Dependencies | 1 |
| Unpacked size | 516.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Joydip roy |
| Maintainers | rjoydip |

## Links

- npm: https://www.npmjs.com/package/stenax
- Repository: https://github.com/rjoydip/stenax
- Issues: https://github.com/rjoydip/stenax
- npm.io page: https://npm.io/package/stenax

## Dependencies (1)

- [ramda](https://npm.io/package/ramda.md) ^0.25.0

## Recent versions

- 0.1.0 (latest) — 2018-08-25
- 0.0.3-beta.1 — 2018-08-15
- 0.0.3-beta.0 — 2018-08-15
- 0.0.3 — 2018-08-15
- 0.0.21 — 2018-08-15
- 0.0.2 — 2018-08-15
- 0.0.1-beta — 2018-08-15
- 0.0.1 — 2018-08-12

## README

<div align="center">

  <h1>Stenax</h1>

![NpmVersion](https://img.shields.io/npm/v/stenax.svg?style=plastic)
[![Built With Stencil][build-with-stencil]](https://stenciljs.com)

[![node](https://img.shields.io/node/v/stenax.svg)](https://nodejs.org)
[![Build Status](https://travis-ci.org/rjoydip/stenax.svg?branch=master)](https://travis-ci.org/rjoydip/stenax)
[![Build status](https://ci.appveyor.com/api/projects/status/qe5x7i3ift8q7rkv/branch/master?svg=true)](https://ci.appveyor.com/project/rjoydip/stenax/branch/master)
[![dependencies Status](https://david-dm.org/rjoydip/stenax/status.svg)](https://david-dm.org/rjoydip/stenax?type=dev)
[![devDependencies Status](https://david-dm.org/rjoydip/stenax/dev-status.svg)](https://david-dm.org/rjoydip/stenax?type=dev)

[![install size](https://packagephobia.now.sh/badge?p=stenax@0.0.21)](https://packagephobia.now.sh/result?p=stenax@0.0.21)
[![License](https://img.shields.io/npm/l/make-coverage-badge.svg)](https://github.com/rjoydip/stenax/blob/master/LICENSE)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Frjoydip%2Fstenax.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Frjoydip%2Fstenax?ref=badge_shield)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://reactjs.org/docs/how-to-contribute.html#your-first-pull-request)

Stenax is a UI component library build with [Stencil](https://stenciljs.com).

</div>

## Instalation

### via NPM

```bash
# npm
npm install stenax
```

```bash
# yarn
yarn add stenax
```

### CLI useage

```bash
npm link
```

```bash
$ stenax

Usage
$ npm start <input> <option>

Inputs
  generate,     g  Generate boilerplate

Options
  component,    c  Generate component boilerplate

Examples
  $ npm run cmd generate component <component name>
```

### via CDN

- https://unpkg.com/stenax@latest/dist/stenax.js
- https://cdn.jsdelivr.net/npm/stenax@latest/dist/stenax.js

## Getting Started

Quick-start CDN

```html
<!DOCTYPE html>
<html>
<head>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
</head>
<body>
  <div id="app">
    <sx-button sx-type="filled">Hello Stenax</sx-button>
  </div>
  <script src="https://cdn.jsdelivr.net/npm/stenax@latest/dist/stenax.min.js"></script>
</body>
</html>
```

# API

## Color

Element uses a specific set of palettes to specify colors to provide a consistent look and feel for the products you build.

### Main Color

The main color of Element is bright and friendly blue.

![Main Color](https://rawgit.com/rjoydip/stenax/master/docs/assets/color/main-colo.png)

### Secondary Color

Besides the main color, you need to use different scene colors in different scenarios (for example, dangerous color indicates dangerous operation)

![Secondary Color](https://rawgit.com/rjoydip/stenax/master/docs/assets/color/secondary-color.png)

### Neutral Color

Neutral colors are for text, background and border colors. You can use different neutral colors to represent the hierarchical structure.

![Neutral Color](https://rawgit.com/rjoydip/stenax/master/docs/assets/color/neutral-color.png)

## Layout

Quickly and easily create layouts with the basic 24-column.

### Basic layout

Create basic grid layout using columns.

```html
<sx-row>
  <sx-col span="24">
    <div class="grid-content bg-purple-dark color-white text-center">L1</div>
  </sx-col>
</sx-row>
<sx-row>
  <sx-col span="12">
    <div class="grid-content bg-purple color-white text-center">L2</div>
  </sx-col>
  <sx-col span="12">
    <div class="grid-content bg-purple-light color-white text-center">L3</div>
  </sx-col>
</sx-row>
<sx-row>
  <sx-col span="8">
    <div class="grid-content bg-purple color-white text-center">L4</div>
  </sx-col>
  <sx-col span="8">
    <div class="grid-content bg-purple-light color-white text-center">L5</div>
  </sx-col>
  <sx-col span="8">
    <div class="grid-content bg-purple color-white text-center">L6</div>
  </sx-col>
</sx-row>
<sx-row>
  <sx-col span="6">
    <div class="grid-content bg-purple-light color-white text-center">L7</div>
  </sx-col>
  <sx-col span="6">
    <div class="grid-content bg-purple color-white text-center">L7</div>
  </sx-col>
  <sx-col span="6">
    <div class="grid-content bg-purple-light color-white text-center">L8</div>
  </sx-col>
  <sx-col span="6">
    <div class="grid-content bg-purple color-white text-center">L9</div>
  </sx-col>
</sx-row>
<sx-row>
  <sx-col span="4">
    <div class="grid-content bg-purple-light color-white text-center">L10</div>
  </sx-col>
  <sx-col span="4">
    <div class="grid-content bg-purple color-white text-center">L11</div>
  </sx-col>
  <sx-col span="4">
    <div class="grid-content bg-purple-light color-white text-center">L12</div>
  </sx-col>
  <sx-col span="4">
    <div class="grid-content bg-purple color-white text-center">L13</div>
  </sx-col>
  <sx-col span="4">
    <div class="grid-content bg-purple-light color-white text-center">L14</div>
  </sx-col>
  <sx-col span="4">
    <div class="grid-content bg-purple color-white text-center">L15</div>
  </sx-col>
</sx-row>
```

![Basic layout](https://rawgit.com/rjoydip/stenax/master/docs/assets/layout/basic-layout.png)

### Column spacing

Column spacing is supported.

```html
<sx-row gutter="20">
  <sx-col span="6">
    <div class="grid-content bg-purple-dark color-white text-center">L1</div>
  </sx-col>
  <sx-col span="6">
    <div class="grid-content bg-purple color-white text-center">L2</div>
  </sx-col>
  <sx-col span="6">
    <div class="grid-content bg-purple-dark color-white text-center">L3</div>
  </sx-col>
  <sx-col span="6">
    <div class="grid-content bg-purple color-white text-center">L4</div>
  </sx-col>
</sx-row>
```

![Column spacing](https://rawgit.com/rjoydip/stenax/master/docs/assets/layout/column-spacing-layout.png)


### Hybrid layout

Form a more complex hybrid layout by combining the basic 1/24 columns.

```html
<sx-row gutter="20">
  <sx-col span="16">
    <div class="grid-content bg-purple-dark color-white text-center">L1</div>
  </sx-col>
  <sx-col span="8">
    <div class="grid-content bg-purple color-white text-center">L2</div>
  </sx-col>
</sx-row>
<sx-row gutter="20">
  <sx-col span="8">
    <div class="grid-content bg-purple color-white text-center">L3</div>
  </sx-col>
  <sx-col span="8">
    <div class="grid-content bg-purple color-white text-center">L4</div>
  </sx-col>
  <sx-col span="4">
    <div class="grid-content bg-purple-dark color-white text-center">L5</div>
  </sx-col>
  <sx-col span="4">
    <div class="grid-content bg-purple-dark color-white text-center">L6</div>
  </sx-col>
</sx-row>
<sx-row gutter="20">
  <sx-col span="4">
    <div class="grid-content bg-purple-dark color-white text-center">L7</div>
  </sx-col>
  <sx-col span="16">
    <div class="grid-content bg-purple color-white text-center">L8</div>
  </sx-col>
  <sx-col span="4">
    <div class="grid-content bg-purple-dark color-white text-center">L9</div>
  </sx-col>
</sx-row>
```

![Hybrid layout](https://rawgit.com/rjoydip/stenax/master/docs/assets/layout/hybrid-layout.png)

### Column offset

You can specify column offsets.

```html
<sx-row gutter="20">
  <sx-col span="6">
    <div class="grid-content bg-purple-dark color-white text-center">L1</div>
  </sx-col>
  <sx-col span="6" offset="6">
    <div class="grid-content bg-purple-dark color-white text-center">L2</div>
  </sx-col>
</sx-row>
<sx-row gutter="20">
  <sx-col span="6" offset="6">
    <div class="grid-content bg-purple color-white text-center">L3</div>
  </sx-col>
  <sx-col span="6" offset="6">
    <div class="grid-content bg-purple-light color-white text-center">L4</div>
  </sx-col>
</sx-row>
<sx-row gutter="20">
  <sx-col span="12" offset="6">
    <div class="grid-content bg-purple color-white text-center">L5</div>
  </sx-col>
</sx-row>
```

![Column offset](https://rawgit.com/rjoydip/stenax/master/docs/assets/layout/column-offset-layout.png)

### Alignment

Use the flex layout to make flexible alignment of columns.

```html
<sx-row gutter="10">
  <sx-col xs="8" sm="6" md="4" lg="3" xl="1">
    <div class="grid-content bg-purple-dark color-white text-center">L1</div>
  </sx-col>
  <sx-col xs="4" sm="6" md="8" lg="9" xl="11">
    <div class="grid-content bg-purple-light color-white text-center">L2</div>
  </sx-col>
  <sx-col xs="4" sm="6" md="8" lg="9" xl="11">
    <div class="grid-content bg-purple color-white text-center">L3</div>
  </sx-col>
  <sx-col xs="8" sm="6" md="4" lg="3" xl="1">
    <div class="grid-content bg-purple-light color-white text-center">L4</div>
  </sx-col>
</sx-row>
```

![Alignment](https://rawgit.com/rjoydip/stenax/master/docs/assets/layout/alignment-layout.png)

### Responsive Layout

Taking example by Bootstrap's responsive design, five breakpoints are preset: xs, sm, md, lg and xl.

```js
/* Comming Soon */
```

## Icons

Element provides a set of common icons.

### Basic usage

Just assign the class name to `name=iconName`.

```html
<sx-icon name="edit"></sx-icon>
<sx-icon name="loading" size="20"></sx-icon>
<sx-icon name="back" size="30" color="red"></sx-icon>
```

### Icons

```js
/* Comming Soon */
```

## Button

Commonly used button.

### Basic usage

```html
<sx-row>
  <sx-button>Default</sx-button>
  <sx-button type="primary">Primary</sx-button>
  <sx-button type="success">Success</sx-button>
  <sx-button type="info">Info</sx-button>
  <sx-button type="warning">Warning</sx-button>
  <sx-button type="danger">Danger</sx-button>
</sx-row>

<sx-row>
  <sx-button plain>Plain</sx-button>
  <sx-button type="primary" plain>Primary</sx-button>
  <sx-button type="success" plain>Success</sx-button>
  <sx-button type="info" plain>Info</sx-button>
  <sx-button type="warning" plain>Warning</sx-button>
  <sx-button type="danger" plain>Danger</sx-button>
</sx-row>

<sx-row>
  <sx-button round>Round</sx-button>
  <sx-button type="primary" round>Primary</sx-button>
  <sx-button type="success" round>Success</sx-button>
  <sx-button type="info" round>Info</sx-button>
  <sx-button type="warning" round>Warning</sx-button>
  <sx-button type="danger" round>Danger</sx-button>
</sx-row>

<sx-row>
  <sx-button circle></sx-button>
  <sx-button type="primary" circle></sx-button>
  <sx-button type="success" circle></sx-button>
  <sx-button type="info" circle></sx-button>
  <sx-button type="warning" circle></sx-button>
  <sx-button type="danger" circle></sx-button>
</sx-row>

<sx-row>
  <sx-button circle>A</sx-button>
  <sx-button type="primary" circle>B</sx-button>
  <sx-button type="success" circle>C</sx-button>
  <sx-button type="info" circle>D</sx-button>
  <sx-button type="warning" circle>E</sx-button>
  <sx-button type="danger" circle>F</sx-button>
</sx-row>

<sx-row>
  <sx-button icon="search" circle color="black"></sx-button>
  <sx-button type="primary" icon="edit" circle></sx-button>
  <sx-button type="success" icon="check" circle></sx-button>
  <sx-button type="info" icon="message" circle></sx-button>
  <sx-button type="warning" icon="star-off" circle></sx-button>
  <sx-button type="danger" icon="delete" circle></sx-button>
</sx-row>
```

![Alignment](https://rawgit.com/rjoydip/stenax/master/docs/assets/button/basic-button.png)

### Disabled Button

The disabled attribute determines if the button is disabled.

```html
<sx-row>
  <sx-button disabled>Default</sx-button>
  <sx-button type="primary" disabled>Primary</sx-button>
  <sx-button type="success" disabled>Success</sx-button>
  <sx-button type="info" disabled>Info</sx-button>
  <sx-button type="warning" disabled>Warning</sx-button>
  <sx-button type="danger" disabled>Danger</sx-button>
</sx-row>

<sx-row>
  <sx-button plain disabled>Plain</sx-button>
  <sx-button type="primary" plain disabled>Primary</sx-button>
  <sx-button type="success" plain disabled>Success</sx-button>
  <sx-button type="info" plain disabled>Info</sx-button>
  <sx-button type="warning" plain disabled>Warning</sx-button>
  <sx-button type="danger" plain disabled>Danger</sx-button>
</sx-row>
```

![Alignment](https://rawgit.com/rjoydip/stenax/master/docs/assets/button/disable-button.png)

### Text Button

Buttons without border and background.

```html
<sx-button type="text">Text Button</sx-button>
<sx-button type="text" disabled>Text Button</sx-button>
```

![Alignment](https://rawgit.com/rjoydip/stenax/master/docs/assets/button/text-button.png)

### Icon Button

Use icons to add more meaning to Button. You can use icon alone to save some space, or use it with text. 

```html
<sx-button type="primary" icon="edit"></sx-button>
<sx-button type="primary" icon="share"></sx-button>
<sx-button type="primary" icon="delete"></sx-button>
<sx-button type="primary" icon="search">Search</sx-button>
<sx-button type="primary">Upload
  <sx-icon color="white" name="upload"></sx-icon>
</sx-button>
```

![Alignment](https://rawgit.com/rjoydip/stenax/master/docs/assets/button/icon-button.png)

### Button Group

Displayed as a button group, can be used to group a series of similar operations.

```html
<sx-button-group>
  <sx-button type="primary" icon="arrow-left">Previous Page</sx-button>
  <sx-button type="primary">
    Next Page
    <sx-icon color="white" name="arrow-right"></sx-icon>
  </sx-button>
</sx-button-group>
<sx-button-group>
  <sx-button type="primary" icon="edit"></sx-button>
  <sx-button type="primary" icon="share"></sx-button>
  <sx-button type="primary" icon="delete"></sx-button>
</sx-button-group>
```

![Alignment](https://rawgit.com/rjoydip/stenax/master/docs/assets/button/button-group.png)

### Loading Button

Click the button to load data, then the button displays a loading state.

```html
<sx-button type="primary" loading>Loading</sx-button>
```

![Alignment](https://rawgit.com/rjoydip/stenax/master/docs/assets/button/loading-button.png)

### Sizes

Besides default size, Button component provides three additional sizes for you to choose among different scenarios.

```html
 <sx-row>
  <sx-button>Default</sx-button>
  <sx-button size="medium">Medium</sx-button>
  <sx-button size="small">Small</sx-button>
  <sx-button size="mini">Mini</sx-button>
</sx-row>
<sx-row>
  <sx-button round>Default</sx-button>
  <sx-button size="medium" round>Medium</sx-button>
  <sx-button size="small" round>Small</sx-button>
  <sx-button size="mini" round>Mini</sx-button>
</sx-row>
```

![Alignment](https://rawgit.com/rjoydip/stenax/master/docs/assets/button/sizes-button.png)

> Note: All the component design are taken from [ElemeFE/element](https://github.com/ElemeFE/element).

## License

MIT © [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IuNy02OC42SDMzMmMzNy45LDAsOTIuNywzMC43LDkyLjcsNjguNlYxNDEuN3oiLz4KPC9zdmc%2BCg%3D%3D&colorA=16161d&style=flat-square

---
_Source: https://npm.io/package/stenax · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
