Theme

Start Here

Start from the smallest working snippet, then move to interactive examples and the full API contract below.

Styled quick start

Copy this entrypoint first. It includes the imports required to get the component on screen.

svelte
<script lang="ts">
  import '@dryui/ui/themes/default.css';
  import '@dryui/ui/themes/dark.css';
  import { Flex } from '@dryui/ui';
</script>

<Flex justify="between" align="center">
  <span>Left</span>
  <Button>Right</Button>
</Flex>

Import options

Root package

ts
import { Flex } from '@dryui/ui'

Per-component subpath

ts
import { Flex } from '@dryui/ui/flex'

Customize

Use the interactive examples to see common variants, states, and composition patterns before building your own.

Row direction

Item 1
Item 2
Item 3
svelte
<Flex direction="row" gap="md">
  <div>Item 1</div>
  <div>Item 2</div>
  <div>Item 3</div>
</Flex>

Column direction

Item 1
Item 2
Item 3
svelte
<Flex direction="column" gap="md">
  <div>Item 1</div>
  <div>Item 2</div>
  <div>Item 3</div>
</Flex>

Wrap

Item 1
Item 2
Item 3
Item 4
Item 5
svelte
<Flex direction="row" wrap="wrap" gap="md">
  <div>Item 1</div>
  <div>Item 2</div>
  <div>Item 3</div>
  <div>Item 4</div>
  <div>Item 5</div>
</Flex>

Justify and align

Left
Center
Right
svelte
<Flex direction="row" justify="between" align="center" gap="md">
  <div>Left</div>
  <div>Center</div>
  <div>Right</div>
</Flex>

Compose

The full API contract lives here: props, CSS variables, and the public data attributes you can target when styling.

Prop Type Default Required Bindable
direction
rowcolumnrow-reversecolumn-reverse
Maps to flex-direction.
'row'
wrap
nowrapwrapwrap-reverse
Maps to flex-wrap.
'nowrap'
gap
smmdlgxl
Uses DryUI spacing scale tokens, not raw CSS units.
'md'
justify
startcenterendbetweenaroundevenly
Maps to justify-content.
'start'
align
startcenterendstretchbaseline
Maps to align-items.
'stretch'
children
Snippet

Forwards <div> attributes via rest props. Common examples: id, style, role.