Coder Social home page Coder Social logo

joburgard / mayu-ui Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 2.45 MB

An extensively themable component library for Svelte.

License: The Unlicense

JavaScript 3.72% TypeScript 29.08% HTML 0.88% Svelte 64.58% CSS 1.75%
component-library melt-ui svelte sveltekit unocss

mayu-ui's Introduction

Mayu UI

An extensively themable component library for Svelte.

Warning

This project is very early stages and not production ready. Breaking changes may appear with any release.

We want to deliver a great component library that can be simply styled by an extensive theming system. Creating your own theme will be very simple with the provided Themebuilder.

It will be built on top of Melt-UI, the great headless-ui library for Svelte.

How to use it

1. Modify your uno.config.ts

export default defineConfig({
  presets: [presetWind(), presetIcons()],
  transformers: [transformerDirectives(), transformerVariantGroup()],
  content: {
    pipeline: {
      include: [
        // ...
        // add this line
        'node_modules/mayu-ui/dist/**/*.{svelte,js}',
      ],
    },
    // if you use unocss classes in your app.html
    filesystem: ['src/app.html'],
  },
});

2. Create a theme.css file

├── src
│   ├── app.d.ts
│   ├── app.html
│   └── theme.css <--- this

Fill it with your theme from the Themebuilder.

3. Import the needed css files

<!-- src/routes/+layout.svelte -->
<script>
  import '@unocss/reset/tailwind.css';
  import '../theme.css';
  import 'virtual:uno.css';
</script>

4. Use the components

<script>
  import { buttonVariants, Input } from 'mayu-ui';
</script>

<Input type="text" />
<button class={buttonVariants()}>Click me</button>

License

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

Please see the LICENSE-File for the full license text.

For more information, please refer to http://unlicense.org/

mayu-ui's People

Contributors

joburgard avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.