File tree 5 files changed +106
-4
lines changed
components/content/examples/center
5 files changed +106
-4
lines changed Original file line number Diff line number Diff line change
1
+ <template >
2
+ <CHStack >
3
+ <CCenter w =' 40px' h =' 40px' bg =' tomato' color =' white' >
4
+ <CIcon name =" phone" />
5
+ </CCenter >
6
+ <CCenter w =' 40px' h =' 40px' bg =' tomato' color =' white' >
7
+ <CBox as =' span' fontWeight =' bold' fontSize =' lg' >
8
+ 1
9
+ </CBox >
10
+ </CCenter >
11
+ </CHStack >
12
+ </template >
13
+
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <CCenter bg =' tomato' h =' 100px' color =' white' >
3
+ This is the Center
4
+ </CCenter >
5
+ </template >
Original file line number Diff line number Diff line change
1
+ <template >
2
+ <CHStack >
3
+ <CCircle size =' 40px' bg =' teal.800' color =' white' >
4
+ <CIcon name =" phone" />
5
+ </CCircle >
6
+ <CSquare size =' 40px' bg =' rebeccapurple' color =' white' >
7
+ <CIcon name =" phone" />
8
+ </CSquare >
9
+ </CHStack >
10
+ </template >
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : Center
3
+ description : Center Component
4
+ version : 2.0+
5
+ ---
6
+
7
+ # Center
8
+
9
+ Center is a layout component that centers its child within itself.
10
+
11
+ ## Import
12
+
13
+ ``` js
14
+ import { CCenter , CCircle , CSquare } from ' @chakra-ui/vue-next' ;
15
+ ```
16
+
17
+ - CCenter: centers its child given ` width ` and ` height `
18
+ - CSquare: centers its child given ` size ` (width and height)
19
+ - CCircle: a Square with round ` border-radius `
20
+
21
+ ## Usage
22
+
23
+ Put any child element inside it, give it any ` width ` or/and ` height ` , it'll ensure the child is centered.
24
+
25
+ :: showcase
26
+ :: simple-center { width =full }
27
+ ::
28
+ ::
29
+
30
+ ``` html
31
+ <CCenter bg =' tomato' h =' 100px' color =' white' >
32
+ This is the Center
33
+ </CCenter >
34
+ ```
35
+
36
+ ## With Icons
37
+
38
+ CCenter can be used to create frames around icons or numbers.
39
+
40
+ :: showcase
41
+ :: icon-center
42
+ ::
43
+ ::
44
+
45
+ ``` html
46
+ <CHStack >
47
+ <CCenter w =' 40px' h =' 40px' bg =' tomato' color =' white' >
48
+ <CIcon name =" phone" />
49
+ </CCenter >
50
+ <CCenter w =' 40px' h =' 40px' bg =' tomato' color =' white' >
51
+ <CBox as =' span' fontWeight =' bold' fontSize =' lg' >
52
+ 1
53
+ </CBox >
54
+ </CCenter >
55
+ </CHStack >
56
+ ```
57
+
58
+ ## Square and Circle
59
+
60
+ The Square and Circle components automatically centers its children given the size.
61
+
62
+ :: showcase
63
+ :: square-and-circle
64
+ ::
65
+ ::
66
+
67
+ ``` html
68
+ <CHStack >
69
+ <CCircle size =' 40px' bg =' teal.800' color =' white' >
70
+ <CIcon name =" phone" />
71
+ </CCircle >
72
+ <CSquare size =' 40px' bg =' rebeccapurple' color =' white' >
73
+ <CIcon name =" phone" />
74
+ </CSquare >
75
+ </CHStack >
76
+ ```
Original file line number Diff line number Diff line change 1
1
---
2
2
title : Checkbox
3
- description :
4
- Checkbox component is used in forms when a user needs to select multiple
5
- values from several options.
3
+ description : Checkbox Component
6
4
version : 2.0+
7
5
---
8
6
@@ -13,7 +11,7 @@ Checkbox component is used in forms when a user needs to select multiple values
13
11
## Import
14
12
15
13
``` js
16
- import { CCheckbox , CCheckboxGroup } from ' @chakra-ui/vue'
14
+ import { CCheckbox , CCheckboxGroup } from ' @chakra-ui/vue-next ' ;
17
15
```
18
16
19
17
## Usage
You can’t perform that action at this time.
0 commit comments