# 快速开始

> 

Dujie 是一个面向 UI 场景的 DSL。

## 第一个程序

创建一个 `main.dj`：

```dj
func main() -> widget {
    text("Hello, World!")
}
```

## 变量与插值

```dj
func main() -> widget {
    let name = "World";
    text(`Hello, ${name}!`)
}
```

## 带动态入口数据

```dj
func main(props: map<string, any>) -> widget {
    let title = props["title"];

    if title is string(s) {
        text(s)
    } else {
        panic("title must be string")
    }
}
```

## 当前文档阅读顺序

- [基础语法](./02.basic-syntax)
- [数据类型](./03.data-types/00.index)
- [流程控制](./04.control-flow/00.index)
- [函数](./05.functions/00.index)
- [模块](./06.modules/00.index)
