# Enums and constants of UIConstants

> Reference for the enums, constants and nested types of dev.crossfly.ui.UIConstants.

Source: https://crossfly.dev/docs/reference/enums-uiconstants — CrossFly documentation. Full docs as one file: https://crossfly.dev/llms-full.txt

# Enums and constants of `UIConstants`

`UIConstants` is the hub of shared enums, constants and types. Since `Component`/`Layout`/`Styles`
**implement** `UIConstants`, these names are accessible **without a qualified import** inside them.
Values verified against the source code (2026 API).

## Layout and position
| Enum | Values |
|---|---|
| `Position` | `START` · `CENTER` · `END` |
| `Orientation` | `HORIZONTAL` · `VERTICAL` |
| `ScreenSize` | `SIZE` (actual dimension) · `MIN` (smaller side) · `MAX` (larger side) |
| `RelPos` | `AUTOPOS` · `AUTOPOSCENTERED` · `START` · `CENTER` · `END` · `BEFORE` · `SAMEPOS` · `AFTER` · `CENTER_OF` · `END_OF` · `KEEPPOS` |
| `RelSize` | `AUTOSIZE` · `FILL` · `FIT` · `SAMESIZE` · `KEEPSIZE` |
| `Transition` | `NONE` · `FADE` · `SLIDE_LEFT` · `SLIDE_RIGHT` · `SLIDE_UP` · `SLIDE_DOWN` · `SCALE` · `SCALE_DOWN` |

## Appearance
| Enum | Values |
|---|---|
| `ImageSize` | `ORIGINAL` · `RATIO` · `STRETCH` · `FIT` · `FIT_WIDTH` · `FIT_HEIGHT` · `FIT_HALF_WIDTH` · `FIT_HALF_HEIGHT` |
| `LineStyle` | `SOLID` · `DOTTED` |
| `Pressable` | `NO` · `YES` · `STICKY` |

## Text input
| Enum | Values |
|---|---|
| `EditMode` | `NORMAL` · `DATE` · `CURRENCY` · `NUMERIC` · `TIME` · `PASSWORD` |
| `Capitalise` | `NORMAL` · `UPPER` · `LOWER` |
| `Keyboard` | `NONE` · `DEFAULT` · `NUMERIC` · `KEYPAD` · `CALCULATOR` · `DATE` · `TIME` |

> `EditMode.getKeyboard()` maps the mode to the implicit keyboard (`DATE`→DatePicker, `CURRENCY`→Keypad
> calculator, `TIME`→TimePicker, etc.). See [Masks and keyboards](/docs/ui/forms-and-input/masks-and-keyboards).

## Non-enum constants
| Constant | Value | Use |
|---|---|---|
| `LAY_AUTO` | `0f` | natural size of the content (in `add()`) |
| `LAY_FILL` | `-1f` | fills the remaining space (in `add()`) |

Colors remain **`int` ARGB** — the color constants and utilities are in `UIConstants`/`Styles` and
`ColorUtils` (see Colors and the [Cheat sheets](/docs/reference/cheat-sheets)).

## Nested types (functional / marker interfaces)
`UIConstants` also nests the shared contracts: **`Action`** (`run(Component)`), **`Paintable`**,
**`Icon`**, **`Scrollable`**, **`Checkable`**, **`TextComponent`**, **`TextInputComponent`**. That is why
they appear as `UIConstants.Action` etc. (the 2026 migration moved them inside `UIConstants`).

## See also
- [Cheat sheets](/docs/reference/cheat-sheets) · [Widget catalog](/docs/reference/widget-catalog)
