Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

code-hike-classer-vue3

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

code-hike-classer-vue3

A little package to make Vue3 component libraries interoperable with most styling solutions.

  • 0.1.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

A little package to make React component libraries interoperable with most styling solutions.

online demo

https://stackblitz.com/edit/vitejs-vite-oqvfsr

install

npm i

# with usage demo
npm run dev

classer + emotion usage

full demo:

npm run dev

  • Provider
<script setup lang="ts">
import { css } from '@emotion/css';
import { ClasserProvider } from 'code-hike-classer-vue3';
import Child from './components/Child.vue';

const color = 'white';
const motion = css`
  background-color: hotpink;
  &:hover {
    color: ${color};
  }
`;
</script>

<template>
  <classer-provider
    :classes="{
      'sp-title': 'title-1 title-2',
      'sp-motion': motion,
    }"
  >
    <child />
  </classer-provider>
</template>
  • Child
<template>
  <button :class="[c('title', 'motion', 'other')]">i am child</button>
</template>

<script setup lang="ts">
import { useClasser } from 'code-hike-classer-vue3';

const c = useClasser('sp', { 'sp-other': 'custom-class' });
</script>

  • result
<div class="sp-title sp-motion sp-other title-1 title-2 css-64o2cv custom-class">i am child</div>

css-64o2cv is motion style

sipport browsers

npx browserslist

Keywords

FAQs

Package last updated on 09 Aug 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc