Typically used as headers. Follow semantic hierarchy — Title 1s should be followed by Title 2s followed by Title 3s and so on, without skipping any levels.
Tags can be changed using the tag prop. However, be sure follow markdown semantics (h1's are followed by h2's followed by h3's and so on).
Title kit will use h3
tag by default, and size 3
as well.
Size and tag props are not in correlation with each other, meaning any size can be used along with any tag.
<%= pb_rails("title", props: { }) do %> Default Title <% end %> <br/> <%= pb_rails("title", props: { text: "Title 1", tag: "h1", size: 1 }) %> <%= pb_rails("title", props: { text: "Title 2", tag: "h2", size: 2 }) %> <%= pb_rails("title", props: { text: "Title 3", tag: "h3", size: 3 }) %> <%= pb_rails("title", props: { text: "Title 4", tag: "h4", size: 4 }) %>
Title size 1
& size 2
will use font-weight: 700
by default, if you want a lighter font weight, use the bold
prop set to false
.
Title size 3
uses a light font weight by default and will not accept a bold font weight.
Title size 4
uses a heavy font weight by default and will not accept a lighter font weight.
Title kit will use default
color by default. Other available colors are:
*light
lighter
success
error
link
<%= pb_rails("title", props: { text: "Default Color", tag: "h1", size: 3 }) %> <%= pb_rails("title", props: { text: "Title Color", tag: "h1", size: 3, color: "link" }) %> <%= pb_rails("title", props: { text: "Title Color", tag: "h1", size: 3, color: "success" }) %> <%= pb_rails("title", props: { text: "Title Color", tag: "h1", size: 3, color: "error" }) %>
Props | Type | Values |
---|---|---|
max_width |
array
|
xs
sm
md
lg
xl
0
none
|
z_index |
array
|
1
2
3
4
5
6
7
8
9
10
|
number_spacing |
array
|
tabular
|
shadow |
array
|
none
deep
deeper
deepest
|
line_height |
array
|
tightest
tighter
tight
normal
loose
looser
loosest
|
display |
array
|
block
inline_block
inline
flex
inline_flex
none
|
cursor |
array
|
auto
default
none
contextMenu
help
pointer
progress
wait
cell
crosshair
text
verticalText
alias
copy
move
noDrop
notAllowed
grab
grabbing
eResize
nResize
neResize
nwResize
sResize
seResize
swResize
wResize
ewResize
nsResize
neswResize
nwseResize
colResize
rowResize
allScroll
zoomIn
zoomOut
|
flex_direction |
array
|
row
column
rowReverse
columnReverse
|
flex_wrap |
array
|
wrap
nowrap
wrapReverse
|
justify_content |
array
|
start
end
center
spaceBetween
spaceAround
spaceEvenly
|
justify_self |
array
|
auto
start
end
center
stretch
|
align_items |
array
|
flexStart
flexEnd
start
end
center
baseline
stretch
|
align_content |
array
|
start
end
center
spaceBetween
spaceAround
spaceEvenly
|
align_self |
array
|
auto
start
end
center
stretch
baseline
|
flex |
array
|
auto
initial
0
1
2
3
4
5
6
7
8
9
10
11
12
none
|
flex_grow |
array
|
1
0
|
flex_shrink |
array
|
1
0
|
order |
array
|
1
2
3
4
5
6
7
8
9
10
11
12
|
position |
array
|
relative
absolute
fixed
sticky
|
margin |
array
|
none
xxs
xs
sm
md
lg
xl
|
margin_bottom |
array
|
none
xxs
xs
sm
md
lg
xl
|
margin_left |
array
|
none
xxs
xs
sm
md
lg
xl
|
margin_right |
array
|
none
xxs
xs
sm
md
lg
xl
|
margin_top |
array
|
none
xxs
xs
sm
md
lg
xl
|
margin_x |
array
|
none
xxs
xs
sm
md
lg
xl
|
margin_y |
array
|
none
xxs
xs
sm
md
lg
xl
|
padding |
array
|
none
xxs
xs
sm
md
lg
xl
|
padding_bottom |
array
|
none
xxs
xs
sm
md
lg
xl
|
padding_left |
array
|
none
xxs
xs
sm
md
lg
xl
|
padding_right |
array
|
none
xxs
xs
sm
md
lg
xl
|
padding_top |
array
|
none
xxs
xs
sm
md
lg
xl
|
padding_x |
array
|
none
xxs
xs
sm
md
lg
xl
|
padding_y |
array
|
none
xxs
xs
sm
md
lg
xl
|
classname |
string
|
|
dark |
boolean
|
|
id |
string
|
|
data |
hash
|
|
aria |
hash
|
|
children |
proc
|
Props | Type | Values | Default |
---|---|---|---|
color |
enum
|
default
light
lighter
success
error
link
|
|
size |
enum
|
1
2
3
4
|
3
|
tag |
enum
|
h1
h2
h3
h4
h5
h6
p
div
span
|
h3
|
text |
string
|
||
variant |
enum
|
link
|
|
bold |
boolean
|
true
|