0.1.3 • Published 2 years ago

svexy-ui v0.1.3

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Svexy UI

Note

This is my first open source package. So please help me to make it best UI Library for Svelte. Everyone is invite to play and help me build this.

Getting started

  • Add following lines into your tailwind config
/** @type {import('tailwindcss').Config} */
const colors = require('tailwindcss/colors.js');
module.exports = {
	content: [
		'./src/**/*.{html,js,svelte,ts}',
		'./node_modules/svexy-ui/components/**/*.{html,js,svelte,ts}'
	],
	theme: {
		colors: {
			gray: colors.gray,
			black: colors.black,
			white: colors.white,
			danger: colors.rose,
			info: colors.sky,
			warning: colors.amber,
			success: colors.teal,
			primary: colors.orange,
			secondary: colors.violet,
			tertiary: colors.rose
		},
		extend: {}
	},
	plugins: []
};
  • Do not change variable names.
  • You can config all the color as per your need but have to follow this method

How to use Button

let variants = ['solid', 'outlined', 'soft'];
let colors = ['primary', 'secondary', 'tertiary', 'dark', 'info', 'warning', 'danger', 'success'];
<script>
  import Button from 'svexy-ui';
</script>
<Button variant={variant} color={color} shadow >Button<Button/>
  • Pass pill if want to rounded.
  • Pass shadow if need shadow of same color.
  • Pass href for <a> tag.
  • Pass disabled for disabled Button

Useful Links

Authors