component basic example is not working

0 votes
asked Oct 18, 2023 in Question / help by rohiy
I am trying to use basic component example on my local build but it is not working for me

@startuml
[First component]
[Another component] as Comp2
component Comp3
component [Last\ncomponent] as Comp4
@enduml

1 Answer

0 votes
answered Oct 18, 2023 by The-Lu (68,800 points)
edited Oct 18, 2023 by The-Lu

Hi R.,

Could you use long form with alias, as:

@startuml
[First component]
component "Another component" as Comp2
component Comp3
component "Last\ncomponent" as Comp4
@enduml

Regards,
Th.

commented Oct 18, 2023 by The-Lu (68,800 points)

Hi all,

The both are OK:

CodeOutput
@startuml
[First component]
[Another component] as Comp2
component Comp3
component [Last\ncomponent] as Comp4
@enduml
@startuml
[First component]
component "Another component" as Comp2
component Comp3
component "Last\ncomponent" as Comp4
@enduml

Regards,
Th.

...