2.0.0 • Published 13 days ago

bocins v2.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
13 days ago

bocins

Bocins

Collection of reusable UI components for Vue 3 that can be used standalone or combined together to create flexible and customized interfaces. The term bocins is derived from catalan and means small bits or pieces of something.

NPM NPM NPM

Get started

Install the library

npm i bocins

Default icons are copied from /node_modules/bocins/dist/icons to /public/icons/. Replace them to use your own icons. Existing icons won't be replaced.

Import styles in your app entry point file or in your styles entry point

// main.ts
import 'bocins/dist/style.css';

// main.scss
@import 'bocins/dist/style.css';

You can customize the theme using CSS variables and extending some base styles

:root {
  font-size: 16px;
  font-family: system-ui, Arial, sans-serif;

  color-scheme: light dark;

  --color-bg: light-dark(#f8f8f8, #333);
  --color-text: light-dark(#333, #efefec);
  --color-error: #d33;
  --color-accent: #39f;
  --color-btn: var(--color-accent);
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
}

.btn[alert] { --color: var(--color-error); }

.switch {
  --color-on: lightgreen;
  --color-off: var(--color-error);
}

Usage

Import and use components directly in your vue files

<template>
  <Selector v-model="user" :options="store.users">
    <template #default="{ item: user }">
      <Avatar :src="user.avatar" :name="user.name" />
      {{ user.name }}
    </template>
  </Selector>
</template>

<script setup lang="ts">
import { ref } from 'vue';
import { Selector, Avatar } from 'bocins';
import store, { type User } from './store';

const user = ref<User>();
</script>

<style scoped>
.avatar { --size: 1.5rem; }
</style>
2.0.0

13 days ago

2.0.0-alpha-2

13 days ago

2.0.0-alpha-3

13 days ago

2.0.0-alpha-4

13 days ago

2.0.0-alpha-5

13 days ago

2.0.0-alpha-1

13 days ago

2.0.0-alpha-0

28 days ago

1.5.0

4 months ago

1.4.5

5 months ago

1.4.4

5 months ago

1.2.0

10 months ago

1.4.3

6 months ago

1.4.2

6 months ago

1.4.1

6 months ago

1.2.3

9 months ago

1.4.0

8 months ago

1.3.1

8 months ago

1.2.2

10 months ago

1.3.0

8 months ago

1.2.1

10 months ago

1.1.2

11 months ago

1.1.1

11 months ago

1.1.0

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago