Overview
The ds-details label/value columns are primarily for presenting pairs of text based content. While certain form elements can be used in value column - if all the content in the value column are form fields, they should instead use ds-field.
It is always preferable to use html dl/dt/dd elements, rather than a table/tr/td elements - table elements should only be used when multiple columns of values are required.
Options
Basic usage
Visual States
ds-details supports the 4x preset visual states - alert, warning, success and info.
Multiple columns
Multiple columns are only supported when using html <table> element. Available from v1.6.55+
Column headings
Column headings are only supported when using html <table> element. Available from v1.6.55+
Footer
Buttons
Any buttons directly inside the dd or td will be ‘appended’ to the right of the cell.
To retain standard buttons styling, wrap the buttons in a div.
Multiple buttons
Form controls
The following field components are optimised to be used directly inside ds-details:
Field
Input
Select
Menubutton
Loading state
A details can be triggered to display a loading state - where the details contents are hidden, and the replaced by a centered spinning loading icon – without affecting the dimensions of the details.
Additional options are available using Message state
Message state
Message state extends and can be used with Loading state. If a details has a data-attribute data-ds-message the details contents are hidden, and replaced by an icon and the text of the data-ds-message.
Styles
Custom styles exist for specific use cases.
Vertical style
Simple style
Simple style when applied to tables uses simpler more standard rules for styling table contents and is useful for text based table contents.
Plain style
Tests
Inline error message
Manifest
The component manifest describes this component's API — its modifiers, structure, data attributes, CSS custom properties, accessibility notes, and example markup. It is consumed by tooling such as AI assistants and code generators.
Latest version: https://assets.soracom.io/sds/latest/ds-details/index.mjs