DASH, SHACL for User Interfaces
SHACL is great at defining constraints for validating Linked Data, but when it comes to building user interfaces—forms, views, and input controls—there’s still a gap. That’s where DASH (Data Shapes UI Vocabulary) comes in.
Just as SHACL gives structure to your data, DASH adds structure to how that data should be presented and interacted with. You can think of DASH as a layer on top of SHACL, helping bridge the world of data modeling with the needs of user interfaces.
What is DASH?
DASH is a vocabulary—a set of Linked Data terms—that describes how to render forms and input components based on SHACL shapes. While SHACL includes minimal UI-related metadata (like sh:name
and sh:group
), DASH builds on that by defining rich annotations and behaviors that UI frameworks can use to dynamically generate user interfaces.
Put simply:
SHACL says what the data must be.
DASH says how it should be edited or displayed.
Why Do We Need DASH?
In web development, we often need to:
- Display data in structured forms
- Guide users with labels, input types, placeholders
- Control UI behavior like dropdown options, read-only fields, etc.
Without DASH, all of this UI logic has to be hardcoded separately—even though the SHACL shapes already contain much of the structural knowledge.
DASH makes it possible to embed UI metadata directly alongside your shape definitions—as Linked Data. This creates a seamless pipeline from data modeling to form generation.
Key Features of DASH
Here are some of the important concepts DASH introduces:
1. dash:SingleLineTextField
, dash:TextArea
, dash:IntegerField
…
DASH defines a variety of suggested input types. You can associate a property shape with a UI control using dash:editor
.
Example:
ex:PersonShape
a sh:NodeShape ;
sh:targetClass schema:Person ;
sh:property [
sh:path schema:givenName ;
sh:datatype xsd:string ;
dash:editor dash:SingleLineTextField ;
] .
This says that the givenName
field should be rendered as a single-line text input.
2. dash:editor
– Declarative Input Controls
The dash:editor
property links a field to a predefined editor component. UI frameworks (like ShapeThing’s SHACL Renderer) can use this to automatically render appropriate input widgets.
Some editors:
dash:SingleLineTextField
dash:TextArea
dash:DatePicker
dash:EnumSelect
3. Scoring algorithms
DASH supports rendering forms and views in various situations:
- An empty form
- A form / view defined by a shape with data
- A form / view defined only by data
It does this by having little scoring algorithms in each Editor / Viewer. These scoring algorithms have two optional arguments, the property shape and the data. When a widget matches on the property shape it returns something like 5 if it matches on data, it gives something like 10.
Given a property shape with sh:datatype xsd:date and a data term that is a string literal with xsd:string, it will render a textFieldEditor. ShapeThing SHACL renderer will also display the validation error.
This means that you can repair incorrect data but still see the original data.
4. dash:readOnly
, dash:hidden
Sometimes, you want to hide a field or make it read-only in the form. DASH supports these behaviors declaratively:
sh:property [
sh:path schema:identifier ;
dash:readOnly true ;
] .
This means identifier
will be shown, but not editable.
5. Grouping and Form Layouts
While SHACL includes sh:group
, DASH refines this concept to help structure forms more clearly. Properties can be grouped into logical sections with labels and ordering hints, improving the usability of automatically generated forms.
DASH in Practice
Tools like the ShapeThing SHACL Renderer use DASH annotations to improve auto-generated forms. When DASH metadata is available, developers can skip manually wiring up UI logic and instead let the SHACL + DASH combo drive the interface.
This is especially powerful because everything is data-driven and portable—your shapes, validation rules, and UI instructions all live as Linked Data in the same RDF graph.
Use Cases
- Rapid prototyping of Linked Data-driven UIs
- Forms that evolve naturally from SHACL shape changes
- No-code/low-code environments where SHACL + DASH define the schema and UI
- Enriching datasets with embedded UI metadata
Summary
DASH fills an important gap in the SHACL ecosystem. While SHACL is focused on validation, DASH brings in the user experience layer. It helps translate abstract data shapes into usable, meaningful UI forms without hardcoding.
To recap:
- SHACL defines structure and validation.
- DASH defines presentation and interaction.
- Together, they enable data-driven form generation and smoother integration between data models and user interfaces.
For more details and vocabulary reference, visit the official DASH documentation.