0.0.473 • Published 2 years ago

oxeye-daisy v0.0.473

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

Oxeye Daisy

A Svelte component librairy using Tailwind + DaisyUI

Button

Import the Button component:

<script lang="ts">
  import { Button } from 'oxeye-daisy';
</script>

A simple button:

<Button>Click me</Button>

To customize it's style, you can follow the DaisyUI documentation. Every attributes is customizable via props. Here's an example where we customize the color, the size and the outline:

<Button color="secondary" size="sm" outline>Click me</Button>

Here's the possible props to customize the Button component:

<script lang="ts">
  export let color: Color = 'default';
  export let size: Size = 'md';
  export let alignment: Alignment = 'center';
  export let shape: Shape = 'default';
  export let fontCase: Case = 'default';
  export let active: boolean = false;
  export let disabled: boolean = false;
  export let outline: boolean = false;
  export let wide: boolean = false;
  export let block: boolean = false;
  export let loading: boolean = false;
  export let noAnimation: boolean = false;
</script>

You should get the autocomplete for props like color, size, etc... The types only represents the possible value offered by DaisyUI.

If you want a input element of type submit:

<!--
export type Input = {
  value: string;
  type?: 'button' | 'submit' | 'reset';
  name?: string;
};
-->
<Button
  input={{ value: 'Click me', type: 'submit', name: 'name' }}
  color="secondary"
  size="sm"
  outline
/>
0.0.473

2 years ago

0.0.472

2 years ago

0.0.471

2 years ago

0.0.47

2 years ago

0.0.46

2 years ago

0.0.45

2 years ago

0.0.44

2 years ago

0.0.43

2 years ago

0.0.42

2 years ago

0.0.41

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago