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 { Checkbox } from '@dryui/ui';
</script>

<Checkbox bind:checked={agreed}>I agree to the terms</Checkbox>

Import options

Root package

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

Per-component subpath

ts
import { Checkbox } from '@dryui/ui/checkbox'

Customize

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

Notification Settings

svelte
<Stack gap="sm">
  <label class="checkbox-row">
    <Checkbox checked />
    <div>
      <p class="cb-label">Email notifications</p>
      <p class="cb-desc">Receive emails about account activity.</p>
    </div>
  </label>
  <label class="checkbox-row">
    <Checkbox />
    <div>
      <p class="cb-label">Push notifications</p>
      <p class="cb-desc">Receive push notifications on your device.</p>
    </div>
  </label>
  <label class="checkbox-row">
    <Checkbox />
    <div>
      <p class="cb-label">SMS notifications</p>
      <p class="cb-desc">Receive text messages for urgent alerts.</p>
    </div>
  </label>
  <label class="checkbox-row">
    <Checkbox checked />
    <div>
      <p class="cb-label">Marketing emails</p>
      <p class="cb-desc">Receive tips, product updates, and offers.</p>
    </div>
  </label>
</Stack>

Unchecked

svelte
<Checkbox />

Checked

svelte
<Checkbox checked />

Indeterminate

svelte
<Checkbox indeterminate />

Sizes

svelte
<Checkbox size="sm" />
<Checkbox size="md" />
<Checkbox size="lg" />

Disabled

svelte
<Checkbox disabled />
<Checkbox checked disabled />

Interactive

svelte
<script lang="ts">
  let checked = $state(false);
</script>
<label>
  <Checkbox bind:checked />
  {checked ? 'Checked' : 'Unchecked'}
</label>

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
checked
boolean
false
indeterminate
boolean
false
size
smmdlg
'md'
disabled
boolean

Forwards <input> attributes via rest props. Common examples: name, autocomplete, inputmode. Omitted: size.