1.1.13 • Published 6 months ago

@kindle-ui/core v1.1.13

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Kindle-UI

English Version | 简体中文

一个用于在浏览器中构建 Kindle 界面的 React 组件库。

本项目是我高考前最后一个坑啦,欢迎 PR!

Amazon 官方已于今年八月陆续推送新版本的 UI。

🍊 特性

  • 11 个交互式 Kindle 组件(对话框、按钮、列表、文本框、导航栏...)
  • 夜间模式
  • 原汁原味 Kindle OS 字体(可选)
  • Kindle 经典外观复刻(Kindle Oasis, Kindle Paperwhite, Kindle Voyage)
  • 100% TypeScript
  • 多样式对话框
  • Expermintal Browser App
  • Font Setting App
npm i kindle-ui

App

App 是 kindle 中高度集成的应用程序,大多数情况下你无法对其进行编辑。 如果你在你的项目中使用它们,你可能还需要自己添加一个路由器。

实验性浏览器

🪟 组件

Navbar

Navbar 是一个集成的 Kindle 原生组件。 所有图标都是不可编辑的,但你仍然可以更改一些状态和回调函数,例如电池、设备名称等。

Container

使用 Container 容器可以赋予颜色模式切换的能力,并且可以添加设备外观。

import { Container, KindleOasis } from "@kindle-ui/core";

function App() {
	return (
		<Container dark deviceFrame={KindleOasis}>
            {/* ... */}
		</Container>
	);
}

Typography

使用Typography来呈现文章或其他富文本内容。

nameoptionaldefaultdescription
greyImagefalsetrue图片显示为黑白

Button

nameoptionaldefaultdescription
hreftrue----

List

	<List>
		<ListItem component={Link} to="/reader">
			<ListItemText primary="尘埃落定" second="阿来著" />
		</ListItem>
		<ListItem component="a" href="https://github.com">
			<ListItemText
				primary="The Adventure of Sherlok Holmoes (福尔摩斯探案集)"
				second="Arthur Conan Doyle"
			/>
			<ListItemIcon
				onClick={() => {
					alert("Hello");
				}}
			>
				<EllipsisVerticalIcon />
			</ListItemIcon>
		</ListItem>
	</List>
nameoptionaldefaultdescription
hreftrue----

Grid

该组件模仿 Kindle 的书架布局。

字体

如果要使用 Kindle 原生字体,需要先安装kindle-fonts.

npm i kindle-fonts
# or
yarn add kindle-fonts

Then import it in your project:

import "kindle-fonts/bookerly.css";
import "kindle-fonts/amazon-ember.css";

贡献

我们十分欢迎你参与建设。请参见 CONTRIBUTING.md

License

MIT

灵感来源于 这个博客

1.1.9

9 months ago

1.1.8

9 months ago

1.1.7

9 months ago

1.1.6

9 months ago

1.1.5

9 months ago

1.1.4

9 months ago

1.1.12

6 months ago

1.1.11

6 months ago

1.1.10

8 months ago

1.1.13

6 months ago

1.1.3

12 months ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

2 years ago