# lu-bind
`lu-bind` is used to dynamically bind one or more attributes to an expression. It's one of the most fundamental directives in Lune.
## Shorthand
The `:` character is a shorthand for `lu-bind`.
```html
LinkLink
```
## Attribute Binding
You can bind any HTML attribute to a reactive value.
```html
Hover over me
```
### Properties vs Attributes
Lune picks between setting a DOM property and setting an attribute:
- A name the element exposes as a property is set as a property. `spellcheck`, `draggable`, `form`, `list` and `type` are excluded and always written as attributes, as are `id`, `title`, `lang` and `dir`.
- Everything else is written with `setAttribute`: names the element has no property for (`data-*`, `aria-*`, and custom attributes) and every binding on an SVG element. On this path, `null` and `undefined` remove the attribute and any other value is stringified.
### Boolean Attributes
Boolean attributes like `disabled`, `checked` and `required` are DOM properties, so they follow the DOM's own rules: a truthy value adds the attribute and a falsy one drops it.
Attributes that are _not_ properties do not work this way — they are stringified, so `:data-open="false"` renders `data-open="false"`. Bind `null` when you want such an attribute gone:
```html
```
## Class Binding
### Object Syntax
Pass an object to `:class` to dynamically toggle classes. The key is the class name, and the value is a boolean that determines if the class should be applied.
```html
```
### Array Syntax
Pass an array of class names. You can also nest objects inside the array.
```html
```
## Style Binding
### Object Syntax
Pass an object to `:style`. You can use either camelCase (recommended) or kebab-case for the CSS property names.
```html
```
### Array Syntax
Pass an array of style objects to apply multiple sets of styles.
```html
```
### CSS Custom Properties
You can also bind to CSS variables.
```html
```
## Modifiers
### `.camel`
The `.camel` modifier converts the attribute name to camelCase. This is primarily useful for SVG attributes like `viewBox`.
```html
```
## Dynamic Binding of Multiple Attributes
You can bind an entire object of attributes by using `lu-bind` without an argument.
```html