# svelte-luna

> Luna is a simple, elegant and beautiful UI component library for Svelte.

Latest version **0.6.2** (published 2022-07-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install svelte-luna
pnpm add svelte-luna
yarn add svelte-luna
bun add svelte-luna
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.6.2 |
| Published | 2022-07-25 |
| First published | 2021-05-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Dependencies | 0 |
| Unpacked size | 101.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 11 |
| Author | Andrea Montorio |
| Maintainers | kendall |
| Keywords | svelte, svelte-ui, luna, ui |

## Links

- npm: https://www.npmjs.com/package/svelte-luna
- Repository: https://github.com/loskware/svelte-luna
- Homepage: https://loskware.github.io/svelte-luna
- Issues: https://github.com/loskware/svelte-luna/issues
- npm.io page: https://npm.io/package/svelte-luna

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.6.2 (latest) — 2022-07-25
- 0.6.1 — 2022-07-18
- 0.6.0 — 2022-07-16
- 0.5.9 — 2022-06-18
- 0.5.8 — 2022-06-15
- 0.5.7 — 2022-06-13
- 0.5.6 — 2022-06-13
- 0.5.5 — 2022-06-13
- 0.5.4 — 2022-06-13
- 0.5.3 — 2022-06-13
- 0.5.2 — 2022-06-12
- 0.5.1 — 2022-06-12
- 0.5.0 — 2022-06-12
- 0.4.1 — 2022-06-10
- 0.4.0 — 2022-06-10
- … 43 more at https://npm.io/package/svelte-luna/versions

## README

# LUNA

Luna is a simple, elegant and beautiful UI component library for Svelte.

_Remember that Luna is still in an `EARLY STAGE`. Many aspects could change in the future._

## Get started

Install the package:

```bash
npm i svelte-luna
```

Then import luna in your project:

```js
import {
  Avatar,
  Button,
  Card,
  CheckBox,
  CircleProgress,
  Divider,
  FlipView,
  LineProgress,
  Dropdown,
  DropdownMenu,
  ContextMenu,
  MenuItem,
  Radio,
  Segment,
  SegmentedControl,
  Select,
  Switch,
  TextField,
} from "svelte-luna";

// OR

import Avatar from "svelte-luna/widgets/Avatar.svelte";
import Button from "svelte-luna/widgets/Button.svelte";
import Card from "svelte-luna/widgets/Card.svelte";
// ecc...

```

Remember to import the required css files (rollup-plugin-css-only is required):

```js
import "svelte-luna/css/theme.css";
import "svelte-luna/css/global.css";
```

If you prefer you can copy the css files from the package folder into your project and import them directly into your html.
Finally select the desired theme (`dark-theme` or `light-theme`):
```html
<body class="dark-theme"></body>
<!-- OR -->
<body class="light-theme"></body>

<!-- You can assign the desired theme wherever you want -->
<MyComponent class="dark-theme"></MyComponet>

<!-- dynamic theme example -->
<script>
  import {theme} from "stores/theme";

  $: {
    document.body.className = $theme;
  }
</script>
```

### Actions
Luna provides some Svelte actions.
```js
import {
  autofocus,
  badge,
  modal,
  pannable,
} from "svelte-luna/actions";
```

## Styling

To customize the appearance of the components you can override the CSS variables found in `svelte-luna/css/theme.css`.

## Project Showcase
There is currently no documentation for Luna but you can find a components showcase at https://loskware.github.io/svelte-luna

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