# From Schema to Component

### Vuetify Component Attribute - Schema Property

How does schema properties correspond to the Vuetify component attributes? Props in Vuetify-Controls in **kebab-case** must be converted to **camelCase** in Schema-Definition.&#x20;

```javascript
  schema: { 
    name: { 
      type:'text', 
      backgroundColor:'red', 
      clearable:true 
    }  
  }
```

type 'text' maps to component \<v-text-field>

```markup
	<v-text-field background-color="red" clearable=true></v-text-field>
```

another example

```markup
<v-text-field 
    label="Search" 
    hint="Books" 
    prepend-icon="search" 
    clearable 
/>
</v-text-field>
```

```javascript
// schema properties corresponds to attributes in <v-text-field> 
schema: { 
  myTextField: { 
    type:'text', 
    label:'Search', 
    hint:'Books', 
    prependIcon:'search', // camelCase 
    clearable:true 
  } 
}
```

complex example

```javascript
// Partials Functions for Rules
const minLen = l => v => (v && v.length >= l) || `min. ${l} Characters`
const maxLen = l => v => (v && v.length <= l) || `max. ${l} Characters`

//...
schema: {
    password: { 
        type: 'password', 
        label: 'Password', 
        hint:'Between 6-12 Chars', 
        appendIcon: 'visibility', 
        counter: 12, 
        rules: [ minLen(6), maxLen(12) ], 
        clearable: true, 
        col: 12 
    }
} 
```

###

###


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wotamann.gitbook.io/vuetify-form-base/schema/from-schema-to-component.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
