Address autocomplete for KDS Adressevælger

KDS Adressevælger replaces DAWA's autocomplete. dk-address turns it into a Danish address field for React, from street name to floor and door.

Package manager
npm i @dk-address/react
Get started

onSelect(selection.details)

Pick a street, then a house number. The caret waits where each part goes.

Suggestions show on the map as you type.

What dk-address adds to KDS Adressevælger

  • The caret moves to the next part

    Picking a street leaves the caret where the house number goes. Picking a building leaves it where floor and door go.

  • House numbers match as you type

    KDS only matches whole house numbers. dk-address matches a street's numbers by prefix, so 2 already finds 28.

  • Your styles or your library

    Unstyled parts that take your classes, ready blocks for shadcn/ui and Ant Design, or a hook for any other autocomplete.

Compared with KDS's own component

KDS publishes a JavaScript component on GitHub. Both find the same addresses; here's what changes for your code and for the people filling in the field.

TopicKDS's componentdk-address
InstallCopy files from GitHub, again for every updatenpm i @dk-address/react
TypesNone: plain JavaScriptTypeScript, with English names
Your code readsKDS's response format, so KDS's API changes reach your codedk-address's types, so API changes are handled in an update
After picking a streetThe text is replaced; the caret isn't placedThe caret goes where the house number goes
House numbersWhole numbers only: 2 doesn't find 28Matched by prefix as you type
StylingGlobal CSS classesYour classes on each part, or shadcn/ui and Ant Design blocks
The full comparison

Start from what you already use

Every path uses the same search and caret handling. Only the UI around it changes.

For apps without React, @dk-address/core has the same behaviour without a framework.