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

cosmic-vue

Package Overview
Dependencies
Maintainers
7
Versions
114
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cosmic-vue

Cosmic-vue is a implementation of cosmic, which is a meta component framework.

  • 0.0.68
  • latest
  • npm
  • Socket score

Version published
Maintainers
7
Created
Source

Cosmic Vue

Cosmic-vue is a implementation of cosmic, which is a meta component framework.

🚧ing...welcome to contribute!

Story Book

Setting Default UI

You should set resolve.alias option in your vite.config.js or other build config, such as:

// vite.config.js
{
    resolve: {
        alias: {
            'cosmic-ui': 'cosmic-ui-alpha', // default ui of cosmic
            // 'cosmic-ui': resolve('../local-ui-folder'),
        }
    }
}

Import UI CSS

Default Cosmic UI packages provides the following:

.
├── dist
│   ├── style.css           # CSS of all components
│   ├── variables.css           # Design Tokens
│   ├── utilities.css       # Default utilities class
│   ├── ui.css              # Bundle CSS = style.css + variables.css + utilities.css
│   ├── index.es.js         # exports of all css modules in es module
│   └── index.umd.js        # exports of all css modules in umd
└── ...

Generally, you should import ui.css in your project.

If you need to decide some design token yourself, you can import them separately:

@import 'cosmic-ui/style.css';
@import 'cosmic-ui/utilities.css';
@import './your-variables.css';

It is not necessary to import utilities.css if using utility-first CSS framework (Windi Css / Tailwind CSS) in your project.

Replace UI for Component Instance

<script>
    import { button, buttonRouned } from 'cosmic-ui';
    import { buttonCustomed } from './button-customed.css';
</script>
<template>
    <Button />
    <Button :styles="button" />
    <Button :styles="buttonRouned" />
    <Button :styles="buttonCustomed" />
<template>

FAQs

Package last updated on 03 May 2022

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