# collapse.html
> learn how to use the collapse shortcode
The {{}} shortcode is a simple way to create collapsible sections in your documentation. This is great for hiding large amounts of content that you don’t want to overwhelm your readers with.
How it works # The {{}} shortcode accepts 2 named args: title and description.
title is the title of the collapsible section. description is the content that will be hidden until the user clicks on the title. Examples # {{}}
Expand this is the hidden content. {{}}
Click meI'm hidden content!
this is the hidden content. Source code # go {{- $title := .Get "title" | default "Expand" -}} {{- $description := .Get "description" -}} {{- $variant := .Get "variant" | default "default" -}} {{- $id := .Get "id" | default (printf "collapse-%s-%d" (md5 .Inner) (now.UnixNano)) -}} {{- if ne hugo.Environment "pdf" -}}
{{- with $title -}}
{{ . }}
{{- end -}} {{- with $description -}}
{{ . }}
{{- end -}}
{{ .Inner | markdownify }}
{{/* Inline JS removed. Collapse handled by Collapse components. */}} {{- else -}} {{/* PDF fallback - just show content */}} {{- with $title -}}
{{ . }}
{{- end -}} {{ .Inner | markdownify }} {{- end -}}
## Metadata
- **Section**: features
- **Type**: features
- **Author**: Lawrence Lane
- **Parent**: [collapse.html](/features/shortcodes/index.txt)
## Navigation
- **Current Section**: [collapse.html](/features/shortcodes/index.txt)