shadcn.io is not affiliated with official shadcn/ui
DNS Settings Block for React
A DNS settings panel that leads with a resolver you can ask, then holds the same zone as a filterable records table with TTL and conflict checks and as a zone file parsed as you type, kept in step while it is valid.
Installation
Overview
Edit a DNS zone and see what each change does to the answer, with this DNS settings panel for React with Base UI. A hairline frame with a plus mark on each corner leads with Ask the zone: pick a name and a record type in two Native Selects and read the answer a resolver would get, a CNAME followed down to its address, with how long resolvers may keep it (the shortest TTL on the way). Under it Tabs hold the same zone twice. Records is a native table with a Toggle Group that filters by type, a TTL select on every record and a Remove button, and an add band whose hint follows the type and that refuses a conflict such as a CNAME beside an A record on the same name. Zone file is a Textarea of BIND-style lines parsed as you type, with a summary like seven records, no problems, or one problem and the line it is on. While the text is valid the table follows it and it follows the table; while it has a problem the table keeps the last valid zone and refuses edits. An action foot counts unsaved changes beside a Shine Button and an outline Discard. It's built from Native Select, Toggle Group, Tabs, Textarea, Input, Field, Button, Shine Button and Guides, with a CSS entrance only. For a DNS host, a domain registrar or a hosting dashboard.
FAQ
How do I fill it with my own zone?
Edit ZONE and the SAVED list at the top: each record has a name (an at sign for the zone itself), a TTL in seconds, a type (A, AAAA, CNAME, MX or TXT) and a value written as in a zone file, so an MX value is a priority and a host and a CNAME target is a name inside the zone. The zone file text, the counts, the resolver's answers and the unsaved count are all worked out from that list. TTL_CHOICES lists the TTL options, and a record with another TTL gets its own option so nothing is lost.
How does Ask the zone work, and does it look anything up?
It never looks anything up. It follows the records in the page: if the name has a CNAME it follows it (up to six hops, inside the zone) and then lists the records of the asked type at the end; a name outside the zone stops the chain and says its own DNS host answers from there; a name with no record of that type says the name exists but holds none, or that nothing is published there. The line under the answer names the shortest TTL on the way, in words.
Which conflicts does it refuse?
A CNAME beside any other record on the same name ("A CNAME cannot share a name with the A record on app"), a second CNAME on one name, a CNAME at the zone itself, any other record on a name that is a CNAME, and an exact duplicate. Each record is also checked for its type: an IPv4 or IPv6 address, a name for a CNAME, a priority and a mail host for an MX record, and text up to 255 characters for TXT. The add band, the zone file and Remove all apply the same checks, and the add band keeps focus on the field that needs fixing.
How is the zone file read, and how do the two views stay in step?
Each line is a name, an optional TTL, an optional IN, a type and a value; a line that starts with a dollar sign sets the origin or the default TTL, a semicolon starts a comment, and a TXT value goes in quotes. Every line that can't be used is listed with its number and reason, and the summary names the first. When the text has no problems the table takes exactly those records; when it has one, the table keeps the last valid zone, the foot says to fix the line first, and Remove, a TTL change and Add refuse until it is fixed. A change in the table rewrites the text.
What stays local, and how do I make it real?
Everything. No record is published and nothing resolves: Publish zone keeps the records in this page's state and says how many changes it kept. To make it real, send the saved list to your DNS provider's API, run the same checks on the server (a client can be skipped), and read the zone back from the provider so the table and the file always show what is live.
How does it look on a phone, and is it accessible?
The table becomes one card per record, from the same markup, with the type and name, the value, the TTL select and Remove; the filter chips wrap and the add band becomes two columns. The table is native, with a caption and column headers, inside a scrolling region that takes focus; every control is named for its record ("TTL for the A record on mail"), and removing a record moves focus to the one that took its place. Switching tabs never changes the panel's height. The status line is a polite live region present from the start.
Related
- Pro
Custom Domain Settings
Domains and deliveryA custom domain settings panel that leads with what visitors get at each step and walks four stages on a vertical rail: add a domain, add a CNAME and a TXT record with copy buttons, a simulated two-try DNS check and a sample certificate.
- Pro
Email Domain Settings
Domains and deliveryA sending domain settings panel that leads with what SPF, DKIM and DMARC amount to for your mail, shows the three records as cells with status, host and value to copy, and a DMARC policy select that rewrites its record.
- Pro
DNS Lookup Chain Error
NetworkA full-screen page for an address that can't be found: an editable address, a Run the check button, and the lookup drawn as five hops that walk one at a time and stop at the one with no answer.
- Pro
Cache Policy Settings
Domains and deliveryAn ordered table of cache rules where first match wins: each path pattern has a freshness bar, how long a copy stays fresh and how long a stale one may be served, a count of the cached paths it really claims, and a purge that counts what it would clear.
- Pro
Environment Variables Settings
Domains and deliveryAn environment variables settings panel that shows where each variable is set across Production, Preview and Development, counts what is missing, fills a missing value with Copy from, and previews a pasted .env file before it imports.
- Pro
SMTP Settings
Domains and deliveryAn outgoing mail settings panel that leads with how mail will leave, a server form with presets, an encryption choice and a masked password, beside a dark terminal that plays a simulated SMTP session or stops at the mismatch a real server would give.