> For the complete documentation index, see [llms.txt](https://docs.navigaglobal.com/writer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.navigaglobal.com/writer/developer-guide/writer-plugin-style-guide/ui-components.md).

# UI Components

Most of the UI component displayed here but for full list check out [API / UI Components](/writer/api-reference/uicomponents.md)

### States

If we are creating new content component and extends Component from substance we are getting state handling right out of the box. The different states we have more general, selected and focused. With this we can render different content and style based of that. A good example of component are the Image component in the content area.

![Default state](/files/-LouDksaLQO-NeYvlxSe)

![Focus and selected state](/files/-LouDpGIMg7cYhJA3HCy)

```javascript
import {Component} from "substance"

class MyComponent extends Component {

    render($$) {
        // Default things

        const nodeState = this.props.isolatedNodeState

        if (nodeState === 'focused' || nodeState === 'selected') {
            // Present this
        } 
        else {
            // Do something else
        }
    }
}
```

### Components styles

We have introduced a type property so you can send in a space separated string ("primary small disabled") for the latest of our components for give the component different styles. In that way it's easy to add and remove styles without extending the component props list and keep it more slim and readable.

```javascript
$$(UIButton, {
    'type': 'primary small'
})
```

See more example for UIButton and UIChip below.

## Naviga Content Icon Pack

Icons made and provided through the writer and used by UI components. When we're referring to icons this if the icons you can use.

Available icon for specific Writer version can be seen here: \
[Icons for Writer 7.0.0](http://content-icon-pack.s3-website-eu-west-1.amazonaws.com/writer/7.0.0/)\
[Icons for Writer 7.1.0](http://content-icon-pack.s3-website-eu-west-1.amazonaws.com/writer/7.1.0/)\
[Icons for Writer 7.2.0](http://content-icon-pack.s3-website-eu-west-1.amazonaws.com/writer/7.2.0/)\
[Icons for Writer 8.0.0](http://content-icon-pack.s3-website-eu-west-1.amazonaws.com/writer/8.0.0/)\
[Icons for Writer 8.1.0](http://content-icon-pack.s3-website-eu-west-1.amazonaws.com/writer/8.1.0/)

## UIButton

For technical implementation see [UI Components: UIButton](/writer/api-reference/uicomponents/uibutton.md)

### Some styles and examples

![This is standard button available in the Writer](/files/-M3HJJLCZBUXagz1kdrD)

Examples

```javascript
// Primary button
$$(UIButton, {
    type: 'primary'
})

// Default button
$$(UIButton, {
    type: 'default'
})

// Alert outlined
$$(UIButton, {
    type: 'alert outlined'
})
```

```javascript
// Cancel button with 
$$(UIButton, {
    label: 'Cancel',
    type: 'secondary'
})

// Primary button
$$(UIButton, {
    label: 'Apply',
    type: 'primary'
})
```

![](/files/-LotnGnwMwjn8Go8oYNw)

![Buttons on dark background](/files/-M3HJU16b5XL48pcnrOg)

Examples

```javascript
// Dark outline button
$$(UIButton, {
    type: 'dark outlined'
})

// Dark Negative Primary button
$$(UIButton, {
    type: 'dark negative primary'
})

// Dark default
$$(UIButton, {
    type: 'dark default'
})
```

![](/files/-M3HJU18I1vCwFSpPBIH)

Examples

```javascript
// Text Default button
$$(UIButton, {
    type: 'text default'
})

// Text Primary button
$$(UIButton, {
    type: 'text primary'
})
```

![](/files/-M3HJU19PRpmuBjIFrA6)

Examples

```javascript
// Default icon button
$$(UIButton, {
    type: 'primary',
    icon: 'fa-plus'
})

// Text Primary icon button
$$(UIButton, {
    type: 'text primary',
    icon: 'fa-plus'
})
```

#### Width

![](/files/-M3HJU1AWChjjXLGlrgo)

```javascript
// Block
$$(UIButton, {
    label: 'Block button',
    width: 'block'
})
```

#### Sizes

![](/files/-M3HJU1B3Hy09T7PnRB0)

```javascript
$$(UIButton, {
    label: 'Large',
    size: 'large'
})

// Default
$$(UIButton, {
    label: 'Default',
})

// Small
$$(UIButton, {
    label: 'Small',
    size: 'small'
})
```

## UIButtonGroup

### Implementation

For technical implementation see [UI Components: UIButtonGroup](/writer/api-reference/uicomponents/uibuttongroup.md)

![](/files/-M3L07gDzhNLh89zKtfX)

## UIIconButton

### Implementation

For technical implementation see: [UI Components: UIIconButton](/writer/api-reference/uicomponents/uiiconbutton.md)

### Styles and examples

![](/files/-MFUr9F3MAMamBff7QS0)

![](/files/-MFUr4QpUHT1UZON7WLW)

## UIChip

### Implementation

For technical implementation see: [UI Components: UIChip](/writer/api-reference/uicomponents/uichip.md)

### Styles and examples

![](/files/-MF5nwsAmW9_oqEAOjCc)

Examples

```javascript
$$(UIChip, {
    avatarUrl: 'https://urltoimage.com/nicklas.png',
    value: 'Nicklas Janresjö',
    type: 'alert'
})
```

![](/files/-Lou1dibu9rpXAbmIJ8D)

## UICheckbox

### Implementation

For technical implementation see: [UI Components: UICheckbox](/writer/api-reference/uicomponents/uicheckbox.md)

### Styles and examples

![](/files/-MF5n5FWMhORChTDLUBu)

## UIToggle

### Implementation

For technical implementation see: [UI Components: UIToggle](/writer/api-reference/uicomponents/uitoggle.md)

### Styles and examples

![](/files/-MF5nGOyao7CpJ0suyqr)

## UITextarea

### Implementation

For technical implementation see: [UI Components: UITextarea](/writer/api-reference/uicomponents/uitextarea.md)

### Styles and examples

![](/files/-MF5nX8LfdxkbznFNnOP)

## UIInputText

### Implementation

For technical implementation see: [UI Components: UIInputText](/writer/api-reference/uicomponents/uiinputtext.md)

### Styles and examples

![](/files/-MF5nQEWJgF5uWZoWZWm)

## UISelect

### Implementation

For technical implementation see: [UI Components: UISelect](/writer/api-reference/uicomponents/uiselect.md)

### Styles and examples

![](/files/-MF5oLSpZRBdxK29yccM)

![](/files/-MF5oOf4w9T3RxD0yxKm)

## UIAvatar

Used together with other components as complement. For example when presentation avatar in lists or in UIChip.

### Implementation

For technical implementation see: [UI Components: UIAvatar](/writer/api-reference/uicomponents/uiavatar.md)

### Styles and examples

![Could be used inside list](/files/-MFUUALyDmUTFyDDQ8zL)

## UIDatePicker

### Implementation

For technical implementation see: [UI Components: UIDatePicker](/writer/api-reference/uicomponents/uidatepicker.md)

### Styles and examples

![](/files/-MFUa_Qu9MJ2-CPbbotf)

![UIDatePicker can be used with two styles default or secondary](/files/-MFUa_QwGyVwn6rCGBhH)

![You can apply prefix to presentation](/files/-MFUa_QxThgag7IaLsoy)

![Available sizes ](/files/-MFUa_Qyj9o-Zo0_EOer)

## UITimePicker

Developed together with UIDatePicker. See sizes and prefix on UIDatePicker

### Implementation

For technical implementation see: [UI Components: UITimePicker](/writer/api-reference/uicomponents/uitimepicker.md)

### Styles and examples

![](/files/-MFUcC86laStg3_vzE_1)

![](/files/-MFUcISUWMXlKGd6U2zC)

## UIFieldEditor

An editor component that lets the user edit text fields on a node.

### Implementation

For technical implementation see: [UI Components: UIFieldEditor](/writer/api-reference/uicomponents/uifieldeditor.md)

### Styles and examples

![](/files/-MFUlwOtbwJ_0h57kQb3)

## UIInlineImage

Inline image component which rerenders itself when its FileNode is loaded.

### Implementation

For technical implementation see: [UI Components: UIInlineImage](/writer/api-reference/uicomponents/uiinlineimage.md)

### Styles and examples

![](/files/-MFUnKnYrR5xMdhyPdm2)

## UIByline

Byline component that will allow you to add authors to content

### Implementation

For technical implementation see: [UI Components: UIByline](/writer/api-reference/uicomponents/uibyline.md)

### Styles and examples

![](/files/-MF_a-rHxYc5mo9VXG0y)

## UITooltip

### Implementation

For technical implementation see: [UI Components: UITooltip](/writer/api-reference/uicomponents/uitooltip.md)

### Styles and examples

![](/files/-MF_aypMV9pwYXuHG06Y)

## UIPagination

### Implementation

For technical implementation see: [UI Components: UIPagination](/writer/api-reference/uicomponents/uipagination.md)

### Styles and examples

![](/files/-MOVaesYBo1a_pZ-g8D9)

## UIDropdown

### Implementation

For technical implementation see: [UI Components: UIDropdown](/writer/api-reference/uicomponents/uidropdown.md)

### Styles and examples

![](/files/-MOVbGXicEfaezeCHJ9F)

| Property        | Description                                               |
| --------------- | --------------------------------------------------------- |
| size (optional) | Default: normal. huge \| large \| normal \| small \| tiny |

## UIPill

### Implementation

For technical implementation see: [UI Components: UIPill](/writer/api-reference/uicomponents/uipill.md)

### Styles and examples

**Rounded (default)**

![](/files/-MOVgKNFi1S5fas5vXpR)

**Square**

![](/files/-MOVh3yfoxUP-Zcg46N1)

## UIIcon

### Implementation

For technical implementation see: UI Components: [UIIcon](/writer/api-reference/uicomponents/uiicon.md)

For available icons see [Naviga Content Icon Pack](/writer/developer-guide/writer-plugin-style-guide/ui-components.md#naviga-content-icon-pack)

**Append weight to name if you take the name from above link**

### Styles and examples

```javascript
$$(UIIcon, {
    name: 'space-rocket-flying-regular',
    size: 20,
    color: '#000'
})
```

## UIButtonList

For technical implementation see: [UI Components: UIButtonList](/writer/api-reference/uicomponents/uibuttonlist.md)

For available icons see [Naviga Content Icon Pack](#naviga-content-icon-pack)

**Append weight to name if you take the name from above link**

### Styles and examples

![](/files/-MR0Lk3dUbcTEUHUkMmm)

## UIIconBadge

### Implementation

For technical implementation see: [UI Components: UIIconBadge](/writer/api-reference/uicomponents/uiiconbadge.md)

For available icons see [Naviga Content Icon Pack](/writer/developer-guide/writer-plugin-style-guide/ui-components.md#naviga-content-icon-pack)

### Styles and examples

![Default, on dark background and blurred version](/files/-MhJGTmZ5todAtpiSqR8)

## UIIconButtonMenu

### Implementation

For technical implementation see: [UI Components: UIIconButtonMenu](/writer/api-reference/uicomponents/uiiconbuttonmenu.md)

### Styles and examples

![](/files/-MhJI7x3aoX8RWMNgDbK)
