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

<Text as="p" color="secondary" size="sm">Use Text for supporting copy, labels, and starter-kit body content.</Text>

Import options

Root package

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

Per-component subpath

ts
import { Text } from '@dryui/ui/text'

Customize

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

Paragraph copy

DryUI starters use Text for descriptive copy, release notes, and documentation callouts.

svelte
<script lang="ts">
  import { Text } from '@dryui/ui';
</script>

<Text as="p" color="secondary" size="lg">
  DryUI starters use Text for descriptive copy, release notes, and documentation callouts.
</Text>

Inline metadata

Incident digest

Last updated 12 minutes ago
svelte
<script lang="ts">
  import { Heading, Stack, Text } from '@dryui/ui';
</script>

<Stack gap="sm">
  <Heading level={3}>Incident digest</Heading>
  <Text as="span" variant="muted" size="sm">Last updated 12 minutes ago</Text>
</Stack>

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
as
pspandiv
'p'
color
defaultmutedsecondary
Use muted or secondary for supporting copy without reaching for inline color styles.
'default'
size
smmdlg
Applies DryUI text scale tokens for compact or emphasized body copy.
'md'
children
Snippet

Forwards <element> attributes via rest props. Common examples: id, class, aria-label.