FileSelect
Select a file or folder path via external picker
Accessibility
- Pair the control with a visible label or aria-label and keep helper or error text programmatically associated.
- Preserve expected keyboard entry, selection, and state announcements for the chosen input pattern.
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 { FileSelect } from '@dryui/ui';
</script>
<FileSelect.Root>
<FileSelect.Trigger>...</FileSelect.Trigger>
<FileSelect.Value>...</FileSelect.Value>
<FileSelect.Clear>...</FileSelect.Clear>
</FileSelect.Root> Import options
Root package
ts
import { FileSelect } from '@dryui/ui' Per-component subpath
ts
import { FileSelect } from '@dryui/ui/file-select' API
Props, CSS variables, and the public data attributes you can target when styling.
| Prop | Type | Description | Default | Required | Bindable |
|---|---|---|---|---|---|
FileSelect.Root | |||||
| value | null | Current controlled or bindable value. | null | — | — |
| onrequest | (() => Promise<string | null>) | — | — | — | — |
| onchange | ((value: string | null) => void) | — | — | — | — |
| disabled | boolean | Prevents interaction and applies disabled styling. | false | — | — |
| children | Snippet | Content rendered inside the component. | — | ✓ | — |
FileSelect.Trigger | |||||
| size | smmdlg | Size preset affecting density, spacing, or typography. | — | — | — |
| children | Snippet | Content rendered inside the component. | — | ✓ | — |
FileSelect.Value | |||||
| placeholder | string | Hint text shown when no value is selected or entered. | 'No file selected' | — | — |
FileSelect.Clear | |||||
| children | Snippet | Content rendered inside the component. | — | — | — |