Vueless Docs
ComponentsGitHubWebsite
  • Installation
    • Quick start (Vue)
    • Quick start (Nuxt)
    • Class autocompletion
    • Minimal requirements
    • Storybook docs
  • Global customization
    • General
    • Colors
    • Rounding
    • Focus Outline
    • Dark mode
    • Base Classes
    • Custom tailwind classes
  • Component customization
    • General
    • Styling
    • Conditional styling
    • Extends styling from keys
    • Nested components styling
    • Classes smart merging
    • Props defaults
    • Redefining props
    • Defining custom props
    • Internationalization (i18n)
  • Creating own components
    • Vueless file structure
    • Create new component
    • Copy existing component
  • Svg Icons
    • General usage
    • Custom icons
    • Dynamic import
    • Advanced settings
  • Helpers
    • Change settings in runtime
Powered by GitBook
On this page
  • Usage
  • Inspecting config keys
  1. Component customization

General

Last updated 4 months ago

Vueless gathers all component settings in one place — a plain JavaScript object. This includes styles, default prop values, i18n, and more.

You can find component default settings in the “Default Config” section at the end of each component docs page in the .

The default Vueless component configs can be customized globally under the component key in thevueless.config.{js,ts}.

Usage

Here is an example of customizing the USelect component. In this example, we partially redefine some styles (Tailwind CSS classes), internationalization values, and default props.

vueless.config.{js,ts}
export default {
  component: {
    USelect: {
      wrapper: "border-brand-400 w-64",
      selectedLabel: "text-lg font-bold px-4",
      i18n: {
        clear: "Remove",
        addMore: "Add item",
      },
      defaults: {
        size: "lg",
        clearable: false,
        dropdownIcon: "arrow_down",
      },
    }
  }
};

Inspecting config keys

To enhance the developer experience, the component name and config key are displayed in the browser console (dev environment only) under the attributes vl-component and vl-key.

For components with nested components, two additional attributes, vl-child-component and vl-child-key, indicate the nested component and its corresponding config key.

Learn more how to .

Vueless UI documentation
style nested components