Skip to content

VvEl Component

The VvEl Component provides a variety of props and config module based settings to make a variety of element configurations for any element itself or as a parent, child, or sibling element with color contextual relations with other contextual elements.

Import

To import a VvEl Component installed by the vueventus CLI or vv-update CLI:

javascript
// ./src/components/SomeComponent.vue
import VvEl from './vv/elements/VvEl.vue'

TIP

CLI installed components pass through VueVentus defaults via component props. Each prop default value can be customized globally by overriding VvConfig defaults in your app ./src/app.vv.ts file or singularly in a component instance.

Alternatively, you can install the raw library VvEl Component with:

javascript
import { VvEl } from '@obewds/vueventus'

TIP

Importing raw VueVentus library components will still apply your ./src/app.vv.ts settings automatically through the Vue provide() and inject() pattern. All raw VueVentus library components automatically check for a provided "vv" keyed object with a ConfigVv type interface.

CLI or Raw?

The main difference between raw library components and CLI installed components, is that you have no control over component defaults with raw library components. This is less flexible than using CLI installed components, because control of component defaults can greatly reduce the number of props a dev has to type for component instances, which reduces app code.

Meanwhile, the control CLI installed components provide through customizable defaults, opens up to a global level (styling management system) control for default component state characteristic values (particularly powerful with color and proportional size characteristics).

Prop: borderPalette

Type: String
Default: "default"

The VvEl Component borderPalette prop sets the component instance border color based both on the borderColor prop and the borderPalette prop value together.

Syntax

html
<VvEl border-palette="default" class="border p-2">
    VvEl
</VvEl>

Result

VvEl

Typing for Downstream Component Instances

Coming Soon!

Prop: borderColor

Type: String
Default: ""

The VvEl Component borderColor prop sets the component instance border color based both on the borderPalette prop and the borderColor prop value together.

Syntax

html
<VvEl border-color="error" class="border p-2">
    VvEl
</VvEl>

Result

VvEl
borderColor prop defaults examples
border-color="default"
border-color="error"
border-color="primary"
border-color="secondary"
border-color="success"

Typing for Downstream Component Instances

Coming Soon!

Prop: debug

Type: Boolean
Default: false

The VvEl Component debug prop toggles the debugging state of a component instance. When in debugging mode, each component instance prop value can be viewed through data-vv-el- prefixed HTML attributes.

Syntax

html
<VvEl :debug="true">
    VvEl debug
</VvEl>

Result

VvEl debug

Prop: groundPalette

Type: String
Default: "default"

The VvEl Component groundPalette prop sets the component instance border color based both on the groundColor prop and the groundPalette prop value together.

Syntax

html
<VvEl ground-palette="default" ground-color="primary" class="p-2">
    VvEl
</VvEl>

Result

VvEl
groundPalette "default" palette examples
ground-palette="default" ground-color="default"
ground-palette="default" ground-color="error"
ground-palette="default" ground-color="primary"
ground-palette="default" ground-color="secondary"
ground-palette="default" ground-color="success"
groundPalette "console" palette examples
ground-palette="console" ground-color="default"
ground-palette="console" ground-color="error"
ground-palette="console" ground-color="primary"
ground-palette="console" ground-color="secondary"
ground-palette="console" ground-color="success"
groundPalette "monochromatic" palette examples
ground-palette="monochromatic" ground-color="default"
ground-palette="monochromatic" ground-color="error"
ground-palette="monochromatic" ground-color="primary"
ground-palette="monochromatic" ground-color="secondary"
ground-palette="monochromatic" ground-color="success"
groundPalette "pastel" palette examples
ground-palette="pastel" ground-color="default"
ground-palette="pastel" ground-color="error"
ground-palette="pastel" ground-color="primary"
ground-palette="pastel" ground-color="secondary"
ground-palette="pastel" ground-color="success"

Typing for Downstream Component Instances

Coming Soon!

Prop: groundColor

Type: String
Default: "default"

The VvEl Component groundColor prop sets the component instance border color based both on the groundPalette prop and the groundColor prop value together.

Syntax

html
<VvEl ground-color="secondary" class="p-2">
    VvEl
</VvEl>

Result

VvEl
groundColor prop defaults examples
ground-color="default"
ground-color="error"
ground-color="primary"
ground-color="secondary"
ground-color="success"

Typing for Downstream Component Instances

Coming Soon!

Prop: size

Type: String
Default: "md"

The VvEl Component size prop sets the component instance size-based classes which in the context of elements typically involves font size atomic classes.

Syntax

html
<VvEl size="lg">
    Large VvEl Text
</VvEl>

Result

VvEl "lg" Text
size prop VvEl size examples
VvEl "5xs" Text
VvEl "4xs" Text
VvEl "3xs" Text
VvEl "2xs" Text
VvEl "xs" Text
VvEl "sm" Text
VvEl "md" Text
VvEl "lg" Text
VvEl "xl" Text
VvEl "2xl" Text
VvEl "3xl" Text
VvEl "4xl" Text
VvEl "5xl" Text
VvEl "6xl" Text
VvEl "7xl" Text
VvEl "8xl" Text
VvEl "9xl" Text
VvEl "10xl" Text
VvEl "11xl" Text
VvEl "12xl" Text

Typing for Downstream Component Instances

Coming Soon!

Prop: tag

Type: String
Valid Values: ValidElementTags Module
Default: "div"

The VvEl Component tag prop sets the HTML tag attribute to a value that should be present in the ValidElementTags Module to be a valid value for this component.

Syntax

html
<VvEl tag="span" class="border-b-2">
    VvEl
</VvEl>

Result

VvEl

Typing for Downstream Component Instances

Coming Soon!

Prop: textPalette

Type: String
Default: "default"

The VvEl Component textPalette prop sets the component instance border color based both on the textColor prop and the textPalette prop value together.

Syntax

html
<VvEl text-palette="default" text-color="primary">
    VvEl
</VvEl>

Result

VvEl

Typing for Downstream Component Instances

Coming Soon!

Prop: textColor

Type: String
Default: "default"

The VvEl Component textColor prop sets the component instance border color based both on the textPalette prop and the textColor prop value together.

Syntax

html
<VvEl text-color="secondary">
    VvEl
</VvEl>

Result

VvEl
textColor prop defaults examples
text-color="default"
text-color="error"
text-color="primary"
text-color="secondary"
text-color="success"

Typing for Downstream Component Instances

Coming Soon!

Slot: #default

The VvEl Component has a standard #default Vue slot to insert child elements/nodes into the component.

Syntax

html
<VvEl>
    Slot <span class="text-red-500 dark:text-red-300">Content</span>
</VvEl>

Result

Slot Content

Released under the MIT License