Component view

A component view allows you to zoom-in to a container, to see the components that reside inside it.

workspace {

    model {
        u = person "User"
        s = softwareSystem "Software System" {
            webapp = container "Web Application" {
                c1 = component "Component 1"    
                c2 = component "Component 2"    
            }
            database = container "Database"
        }

        u -> c1 "Uses"
        c1 -> c2 "Uses"
        c2 -> database "Reads from and writes to"
    }

    views {
        component webapp {
            include *
            autoLayout lr
        }
    }
    
}

This DSL defines a component view for the container webapp, and include * includes the default set of model elements for the view.

Component views can be rendered using the Structurizr cloud service/on-premises installation or exported to a number of other formats via the Structurizr CLI export command.