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 { SegmentedControl, Field, Label } from '@dryui/ui';
</script>

<Field.Root>
  <Label>Trip type</Label>
  <SegmentedControl.Root bind:value={tripType}>
    <SegmentedControl.Item value="one-way">One way</SegmentedControl.Item>
    <SegmentedControl.Item value="round-trip">Round trip</SegmentedControl.Item>
    <SegmentedControl.Item value="multi-city">Multi-city</SegmentedControl.Item>
  </SegmentedControl.Root>
</Field.Root>

Import options

Root package

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

Per-component subpath

ts
import { SegmentedControl } from '@dryui/ui/segmented-control'

API

Props, CSS variables, and the public data attributes you can target when styling.

Prop Type Description Default Required Bindable

SegmentedControl.Root

value
string
Current controlled or bindable value. '' — ✓
disabled
boolean
Prevents interaction and applies disabled styling. false — —
orientation
horizontalvertical
Horizontal or vertical layout direction. 'horizontal' — —
children
Snippet
Content rendered inside the component. — ✓ —

SegmentedControl.Item

value
string
Current controlled or bindable value. — ✓ —
disabled
boolean
Prevents interaction and applies disabled styling. — — —
children
Snippet
Content rendered inside the component. — ✓ —