Fieldset

A spined frame grouping several fields under a legend.

Component

Fieldset belongs to the Fields group in the CyberSpec catalog. It uses @ui-sdk/react/field.

Installation

Use a React 19 project with shadcn configured. Render the installed components inside the Cyber root, and import your global stylesheet in the app entry point.

bunx --bun shadcn@latest add https://www.cyberspec.dev/r/fieldset.json

Example

"use client"

import { Fieldset } from "@/components/ui/fieldset"
import { Switch } from "@/components/ui/switch"
import { TextField } from "@/components/ui/text-field"

export default function FieldsetDemo() {
  return (
    <>
      <Fieldset legend="Uplink" description="Where this deck phones home between jobs." code="NODE 3F:A2 // VANTA RELAY">
        <TextField label="Relay host" defaultValue="glasswater-03.relay" autoComplete="off" />
        <TextField label="Channel" prefix="CH" defaultValue="7741" inputMode="numeric" autoComplete="off" />
        <Switch label="Stealth route" defaultChecked />
      </Fieldset>
    </>
  )
}

Install this example

bunx --bun shadcn@latest add https://www.cyberspec.dev/r/fieldset-demo.json

Resources

View as Markdown