# Binary inspector

A hex editor for one file: a sample, or one of your own, opened or dropped and read in the browser alone. A PNG's chunks or a ZIP's headers list beside the bytes and select them, an inspector reads the selection as numbers and text, and the edits download as a new file.

## Guidelines shown here

- [Destructive actions](/ui/guidelines/patterns/destructive-actions/index.md)

  Edit a few bytes: Undo takes each one back. Revert… drops them all, so it is the one step that asks, and its dialog points at Download as the way to keep a copy.

- [Forms](/ui/guidelines/patterns/forms/index.md)

  Edit a byte, then pick another sample: the unsaved edits are guarded by the same dialog a form uses before you leave it.

- [Loading, empty & error](/ui/guidelines/patterns/loading-empty-and-error/index.md)

  Pick another sample: skeleton rows hold its place while it loads. Should the fetch fail, the error takes that place, with Retry.

- [Feedback](/ui/guidelines/patterns/feedback/index.md)

  Paste more bytes than fit, or text that is not hex: a toast says what was pasted and what was refused. Revert ends in one that names the file.

- [Overlays](/ui/guidelines/patterns/overlays/index.md)

  Below lg the inspector waits in a Sheet from the bottom bar. Revert… asks in a ConfirmDialog, and opening another file over edits asks in UnsavedChangesDialog.

- [Desktop & pointer](/ui/guidelines/platforms/desktop-and-pointer/index.md)

  Drop a file anywhere to open it: a shortcut for Open file…, which does the same without a drag. Undo and Redo name themselves in a tooltip.

- [Touch & mobile](/ui/guidelines/platforms/touch-and-mobile/index.md)

  On a phone the structure is a Select above the bytes and the inspector a Sheet, while Revert… keeps its word because nothing undoes it.

## Components

- [ui · ConfirmDialog](/ui/storybook/?path=/docs/ui-confirmdialog--docs)
- [ui · LoadFailure](/ui/storybook/?path=/docs/ui-loadfailure--docs)
- [ui · DropdownMenu](/ui/storybook/?path=/docs/ui-primitives-dropdownmenu--docs)
- [ui · FileDrop](/ui/storybook/?path=/docs/ui-primitives-filedrop--docs)
- [ui · GroupHeading](/ui/storybook/?path=/docs/ui-primitives-groupheading--docs)
- [ui · InfoPopover](/ui/storybook/?path=/docs/ui-primitives-infopopover--docs)
- [ui · NavList](/ui/storybook/?path=/docs/ui-primitives-navlist--docs)
- [ui · Pane](/ui/storybook/?path=/docs/ui-primitives-pane--docs)
- [ui · SegmentedControl](/ui/storybook/?path=/docs/ui-primitives-segmentedcontrol--docs)
- [ui · Select](/ui/storybook/?path=/docs/ui-primitives-select--docs)
- [ui · Sheet](/ui/storybook/?path=/docs/ui-primitives-sheet--docs)
- [ui · Skeleton](/ui/storybook/?path=/docs/ui-primitives-skeleton--docs)
- [ui · Toaster](/ui/storybook/?path=/docs/ui-primitives-toaster--docs)
- [ui · Tree](/ui/storybook/?path=/docs/ui-primitives-tree--docs)
- [ui · Toolbar](/ui/storybook/?path=/docs/ui-toolbar--docs)
- [ui · UnsavedChangesDialog](/ui/storybook/?path=/docs/ui-unsavedchangesdialog--docs)
- [ui-hex · HexEditor](/ui/storybook/?path=/docs/ui-hex-hexeditor--docs)
- [ui-hex · HexInspector](/ui/storybook/?path=/docs/ui-hex-hexinspector--docs)
