tusen-ai/naive-ui

Tracking issue for RTL supporting.

Open

#97 opened on Jun 13, 2021

View on GitHub
 (11 comments) (22 reactions) (0 assignees)TypeScript (14,240 stars) (1,531 forks)batch import
help wantedpr welcomertl

Description

Overview

RTL(Right to Left) support is a very import feature for the component library. However it'll take great efforts to fulfill the feature since all of the components need to implement extra styles, thus we need your help to achieve the goal.

We've add experimental RTL feature for n-button, n-tag, n-page-header and n-card. If you are interested in contributing to the RTL feature, please reference those components.

You can find the example in the following files.

  • ./src/button
  • ./src/radio
  • ./src/avater
  • ./src/badage
  • ./src/avatar-group
  • ./src/tag
  • ./src/card

Open RTL PRs

自动维护:open 且标题/内容包含 RTL 的 PR;用于跟踪 issue #97。

Tech Details

Here are some discussion about tech detail about implementation.

In general, Naive UI has an internal useRtl composable to mount & update rtl style on demand. It accepts RTL styles passed from n-config-provider and takes adventage of the style.

The component that supports RTL has a style file in component-name/styles/rtl.ts, which exports { name: 'ComponentName', style: CssRenderStyle }.

Components

Here are some components in need RTL support.If you intresting in it,feel free to commont.We will convert it to issue for you,then you can work on it.

  • RTL support for affix
  • RTL support for alert
  • RTL support for anchor
  • RTL support for auto-complete
  • RTL support for back-top
  • RTL support for breadcrumb
  • RTL support for calendar
  • RTL support for card
  • RTL support for carousel
  • RTL support for cascader
  • RTL support for checkbox
  • RTL support for code
  • RTL support for collapse
  • RTL support for collapse-transition
  • RTL support for color-picker
  • RTL support for data-table
  • RTL support for date-picker
  • RTL support for description
  • RTL support for dialog
  • RTL support for divider
  • RTL support for drawer
  • RTL support for dropdown
  • RTL support for dynamic-input
  • RTL support for dynamic-tags
  • RTL support for element
  • RTL support for ellipsis
  • RTL support for empty
  • RTL support for form
  • RTL support for gradient-text
  • RTL support for input
  • RTL support for input-number
  • RTL support for layout
  • RTL support for list
  • RTL support for loading-bar
  • RTL support for log
  • RTL support for menu
  • RTL support for mention
  • RTL support for message
  • RTL support for modal
  • RTL support for notification
  • RTL support for page-header
  • RTL support for pagination
  • RTL support for popconfirm
  • RTL support for popover
  • RTL support for popselect
  • RTL support for progress
  • RTL support for radio
  • RTL support for rate
  • RTL support for result
  • RTL support for scrollbar
  • RTL support for select
  • RTL support for skeleton
  • RTL support for slider
  • RTL support for space
  • RTL support for spin
  • RTL support for statistic
  • RTL support for steps
  • RTL support for switch
  • RTL support for table
  • RTL support for tabs
  • RTL support for tag
  • RTL support for thing
  • RTL support for time
  • RTL support for time-picker
  • RTL support for timeline
  • RTL support for tooltip
  • RTL support for transfer
  • RTL support for tree
  • RTL support for tree-select
  • RTL support for typography
  • RTL support for upload
  • RTL support for watermark

Contributor guide