Skip to content

Commit 5bc7a55

Browse files
committed
Latest version docs built
1 parent 6670f93 commit 5bc7a55

File tree

167 files changed

+15062
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

167 files changed

+15062
-0
lines changed

versioned_docs/version-3.0.4/FAB.md

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
id: FAB
3+
title: FAB
4+
---
5+
6+
import { ComponentTheme } from '../../src/components';
7+
8+
A floating action button is a circular icon button that hovers over content to promote a primary action in the application.
9+
10+
## Import
11+
12+
```jsx
13+
import { Fab } from 'native-base';
14+
```
15+
16+
## Example
17+
18+
### Basic
19+
20+
```ComponentSnackPlayer path=composites,Fab,Basic.tsx
21+
22+
```
23+
24+
### Placement
25+
26+
```ComponentSnackPlayer path=composites,Fab,Placement.tsx
27+
28+
```
29+
30+
### Custom Position
31+
32+
```ComponentSnackPlayer path=composites,Fab,CustomPosition.tsx
33+
34+
```
35+
36+
## Styling
37+
38+
<ComponentTheme name="fab" componentName="FAB" />
39+
40+
## Props
41+
42+
```ComponentPropTable path=composites,Fab,Fab.tsx
43+
44+
```

versioned_docs/version-3.0.4/Kbd.md

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
id: Kbd
3+
title: KBD
4+
---
5+
6+
The keyboard key component exists to show which key or combination of keys performs a given action.
7+
8+
## Implements
9+
10+
- [`Box`](box.md)
11+
12+
## Examples
13+
14+
### Basic
15+
16+
```SnackPlayer name=KBD%20Example
17+
import React from 'react';
18+
import { VStack, HStack, Kbd, Text, NativeBaseProvider, Center } from 'native-base';
19+
20+
function KbdComponent () {
21+
return (
22+
<VStack space={8}>
23+
<HStack>
24+
<Kbd>shift</Kbd>
25+
<Text> + </Text>
26+
<Kbd>C</Kbd>
27+
</HStack>
28+
<HStack>
29+
<Kbd>shift</Kbd>
30+
<Text> then </Text>
31+
<Kbd>H</Kbd>
32+
</HStack>
33+
<HStack>
34+
<Kbd>alt</Kbd>
35+
<Text> or </Text>
36+
<Kbd>option</Kbd>
37+
</HStack>
38+
</VStack>
39+
);
40+
}
41+
export default function () {
42+
return (
43+
<NativeBaseProvider>
44+
<Center flex={1}>
45+
<KbdComponent />
46+
</Center>
47+
</NativeBaseProvider>
48+
);
49+
}
50+
```
51+
52+
## Props
53+
54+
`Kbd` implements **[Box](box.md)**, so all the Box Props can be passed to it.
+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
id: VStack
3+
title: VStack / Column
4+
---
5+
6+
`VStack` aligns items vertically.`Column` is also an alias for `VStack`.
7+
8+
## Import
9+
10+
```jsx
11+
import { VStack } from 'native-base';
12+
```
13+
14+
## Usage
15+
16+
```ComponentSnackPlayer path=primitives,VStack,basic.tsx
17+
18+
```
19+
20+
## Props
21+
22+
```ComponentPropTable path=primitives,Stack,VStack.tsx
23+
24+
```
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
`ZStack` aligns items absolutely in the z-axis.
2+
3+
## Examples
4+
5+
### Basic
6+
7+
```ComponentSnackPlayer path=primitives,ZStack,example.tsx
8+
9+
```
10+
11+
### Items Centered
12+
13+
You can pass `alignItems="center"` `justifyContent="center"` to vertically and horizontally center the children.
14+
15+
```ComponentSnackPlayer path=primitives,ZStack,CenterStack.tsx
16+
17+
```
18+
19+
## Props
20+
21+
```ComponentPropTable path=primitives,ZStack,index.tsx
22+
23+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
id: accessibility
3+
title: Accessibility
4+
---
5+
6+
NativeBase comes with the latest accessibility standards out of the box including aria and role attributes, focus management, and keyboard navigation.
7+
8+
## Accessible Roles
9+
10+
NativeBase uses [React Native ARIA](https://react-native-aria.geekyants.com/) to implements [WAI-ARIA](https://www.w3.org/TR/wai-aria-1.2/) standards to its components. This is designed to provide meaning for controls that aren't built using components provided by the platform.
11+
12+
## Accessible Labels
13+
14+
When a view is marked as accessible, it is a good practice to set an `accessibilityLabel` on the view, so that people who use voice-over know what element they have selected. Voice-over will read this string when a user selects the associated element. NativeBase with the use of [React Native ARIA](https://www.notion.so/Accessibility-83852d7c4b094e69a3e4f1047994bd1c) does this for you out of the box.
15+
16+
## Keyboard Navigation
17+
18+
Many complex components, like Tabs and Dialog, come with expectations from users on how to interact with their content using a keyboard or other non-mouse input modalities. NativeBase Primitives provide basic keyboard support in accordance with the [WAI-ARIA authoring practices](https://www.w3.org/TR/wai-aria-practices-1.2/).
19+
20+
## Focus Management
21+
22+
Proper keyboard navigation and good labelling often go hand-in-hand with managing focus. When a user interacts with a component and something changes as a result, it's often helpful to move focus with the interaction. And for screen reader users, moving focus often results in an announcement to convey the new context, which relies on proper labelling.
23+
24+
In many NativeBase Components, we move focus based on the interactions a user normally takes in a given component. For example, in `Modal`, when the modal is opened, the focus is programmatically moved to the `first focusable element` and trapped inside the modal to anticipate a response to the prompt.

0 commit comments

Comments
 (0)