0.2.2 • Published 3 months ago

@oruga-ui/theme-oruga v0.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Install

npm install @oruga-ui/theme-oruga

or

yarn add @oruga-ui/theme-oruga

Configure

import { createApp } from 'vue'
import App from './App.vue'

// import Oruga
import Oruga from '@oruga-ui/oruga-next'

// import Oruga theme styling
import '@oruga-ui/theme-oruga/dist/oruga.css'

createApp(App)
    .use(Oruga)
    .mount('#app')

The Oruga Default theme comes with two different stylesheets:

  • oruga.css provides a lightweight stylesheet containing only essential CSS rules for Oruga components such as display, position, z-index and other basic attributes.
  • oruga-full.css contains the full Oruga style (the default style used for documentation).

The Oruga Default theme uses the default classes set by Oruga and doesn't come with any JS configuration at all.

Note that the package also works for @oruga-ui/oruga (Vue 2).

Customization (SASS/SCSS)

For customasing any SASS variables you have to set them pefore the SCSS Import.

// Include any default variable overrides here (though functions and maps won't be available here)
// ...

// Include the full Oruga theme here
@import "/node_modules/@oruga-ui/theme-oruga/dist/scss/oruga-full";

// Then add additional custom code here
// ...

Override default config

In case you want to replace the default style of a component you can override or add new classes; more details about components customization on https://oruga.io/documentation/#customization

import { createApp } from 'vue'

import Oruga from '@oruga-ui/oruga-next'

import '@oruga-ui/theme-oruga/dist/oruga-full.css'

const customConfig = {
    checkbox: {
        override: true,
        rootClass: 'checkbox'
    }
}

createApp(App)
    .use(Oruga, customConfig)
    .mount('#app')

Contributors

Thank you to everyone involved for improving this project, day by day 💚

Complete list.

License

Code released under MIT license.

0.2.2

3 months ago

0.2.1

5 months ago

0.2.0

5 months ago

0.0.1

8 months ago