@nami-ui/button
TypeScript icon, indicating that this package has built-in type declarations

0.0.6 • Public • Published

id: button title: Button subtitle: 按钮

提供最基本的点击交互功能。

import { Button } from '@nami-ui/button'

export default () => (
  <Button onClick={() => alert('Hello, World!')}>
    Hello
  </Button>
)

状态

每个按钮都有 4 个状态:hoveractivefocusdisabled。通常这些状态都是根据用户行为自动切换,但你也可以让按钮强制处于某个状态:

import { Button } from '@nami-ui/button'
import { HStack } from '@nami-ui/stack'

export default () => (
  <HStack spacing>
    <Button hover>Hover</Button>
    <Button active>Active</Button>
    <Button focus>Focus</Button>
    <Button disabled>Disabled</Button>
  </HStack>
)

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.0.61latest
0.0.31test

Version History

VersionDownloads (Last 7 Days)Published
0.0.61
0.0.51
0.0.41
0.0.31
0.0.21
0.0.11

Package Sidebar

Install

npm i @nami-ui/button

Weekly Downloads

6

Version

0.0.6

License

MIT

Unpacked Size

5.26 kB

Total Files

8

Last publish

Collaborators

  • biossun
  • biossun-by-nami-ui