);
}
```
### RTL/LTR
Global configuration `direction` can change the text direction of components。`rtl` means right to left (similar to Hebrew or Arabic), `ltr` means left to right (similar to most languages such as English)
Special components:
- Command call of Modal, Notification and Toast needs to be passed to 'direction' through prop.
- If you want to internationalize the directional icon, you need to handle it on your own. We think RTL for icon will make it difficult to understand and maintain. Semi has adapted the icons in other components.
- Table fixed columns or headers, tree data, and virtualized tables do not support RTL at the moment, Slider does not support RTL at the moment.
```jsx live=true dir="column" hideInDSM
import React, { useState } from 'react';
import { ConfigProvider, ButtonGroup, Button, Row, Col, Notification, DatePicker, TimePicker, Timeline, Popover, Tag, Tooltip, Badge, Avatar, Steps, Pagination, Modal, Breadcrumb, Rating, Nav, Spin, Cascader, Radio, Select, Input, Typography, TextArea, Checkbox, Switch } from '@douyinfe/semi-ui';
import { IconVigoLogo, IconEdit, IconCamera, IconList, IconSidebar, IconChevronDown } from '@douyinfe/semi-icons';
import en_GB from '@douyinfe/semi-ui/locale/source/en_GB';
function Demo(props = {}) {
const { Option } = Select;
const [direction, setDirection] = useState();
const flexStyle = {display: 'flex', marginBottom: 32, flexWrap: 'wrap'};
const titleStyle = {margin: '50px 0 16px 0'};
const rowStyle = {margin: '16px 10px'};
const badgeStyle = {
width: '42px',
height: '42px',
borderRadius: '4px',
display: 'inline-block',
};
const tagStyle = {marginRight: 8, marginBottom: 8};
const buttonStyle = {...tagStyle};
const opts = {
title: 'Hi,Bytedance',
content: 'ies dance dance dance',
duration: 3,
direction,
};
const treeData = [
{
label: 'Zhejiang',
value: 'zhejiang',
children: [
{
label: 'Hangzhou',
value: 'hangzhou',
children: [
{
label: 'Xihu',
value: 'xihu',
},
{
label: 'Xianhan',
value: 'xiaoshan',
},
{
label: 'Lin’an',
value: 'linan',
},
],
},
{
label: 'Ningbo',
value: 'ningbo',
children: [
{
label: 'Haishu',
value: 'haishu',
},
{
label: 'Jiangbei',
value: 'jiangbei',
}
]
},
],
}
];
return (
);
}
```
## API Reference
| Properties | Instructions | type | Default |
| ---------- | --------------------------------------------------------------------------------------------------------------------- | -------------- | ------- |
| direction | Sets the direction of the text | `ltr`\| `rtl` | `ltr` |
| getPopupContainer | Specifies the parent DOM, and the bullet layer will be rendered to the DOM, you need to set 'position: relative` | function():HTMLElement | () => document.body |
| locale | Multi-language configuration, same as the [usage](/en-US/other/locale) of `locale` parameter in `LocaleProvider` | object | |
| timeZone | [Time zone identifier](#Time_Zone_Identifier) | string\|number | |
### Time Zone Identifier
- Numbers, such as `1`,`-9.5`, represent the time offset from UTC, the unit is hour, and it can be negative or decimal;
- A string, such as `"GMT-09: 30"`,`"GMT+08: 00"`, which is a characterization offset string starting with `"GMT"`, or [IANA](https://time.is/time_zones), such as `"Asia/Shanghai"`,`"America/Los_Angeles"`, etc.
When you use numbers or similar writing of `GMT-09:00`, Semi will internally convert these time zone identifiers to the IANA.
- If you set `-9` or `GMT-09:00`, it will be converted to `Pacific/Gambier`. There may be multiple IANA identifiers corresponding to certain numbers. Semi prefers IANA identifiers without daylight saving time;
- If the number does not have a corresponding IANA identifier without daylight saving time, such as `-3.5`, `3.5`, `10.5`, `13.75`, then we are mapping an IANA identifier with daylight saving time, and the time zone with daylight saving time will be adjust the offset. For example, `-3.5` will add 1h to the standard time after entering daylight saving time.
If you want to accurately set the time zone of a region, it is recommended to use the IANA identifiers instead of the previous usage. Here you can check the [IANA list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), and whether the time zone has daylight saving time.
### FAQ
- The ConfigProvider does not provide the function of global custom prefix classname. How to achieve similar requirements (for example, Semi is used in the SDK, and it is expected that the packaged dom style does not have the .semi-xx prefix, so as not to be affected by the host's global CSS)?
- Since prefixCls needs to be consumed by the js/css of the component layer at the same time, Semi put this switch in the configuration item of webpack plugin, rather than as a configuration item of ConfigProvider.
- If you use webpack, please configure it in the parameters of `SemiWebpackPlugin`
```diff
# webpack config example: webpack.config.js
const SemiWebpackPlugin = require('@douyinfe/semi-webpack-plugin');
module.exports = {
+ plugins: [new SemiWebpackPlugin({ prefixCls: 'imes' })],
}
```