Banner
The primary purpose of a banner component is to capture the attention of the user, convey important information, promote a specific message, or highlight a key feature or call to action.
Usage
Code EditorCopyimport { Banner } from '@erudilabs/alma'
Types
Code EditorCopyimport type { BannerThemeProps, BannerBorderProps, BannerShapeProps } from '@erudilabs/alma'
BannerThemeProps = 'default' | 'primary' | 'danger' | 'success' | 'warning'
BannerShapeProps = 'flat' | 'square'
BannerBorderProps = 'full' | 'top' | 'right' | 'bottom' | 'left' | 'none'
Component
Here preview and detail explain of Banner
component
Default
Code EditorCopy<Banner>The more complete your profile, the closer your chance to get paid monthly education fees!</Banner>
Theme
These themes allow you to apply different visual styles to the Banner
, Whether it's indicating different statuses, categories, or providing visual cues, the ability to customize Banner
themes adds flexibility and enhances the visual appeal of your UI components.
Primary
Code EditorCopy<Banner theme="primary">The more complete your profile, the closer your chance to get paid monthly education fees!</Banner>
Danger
Code EditorCopy<Banner theme="danger">The more complete your profile, the closer your chance to get paid monthly education fees!</Banner>
Warning
Code EditorCopy<Banner theme="warning">The more complete your profile, the closer your chance to get paid monthly education fees!</Banner>
Success
Code EditorCopy<Banner theme="success">The more complete your profile, the closer your chance to get paid monthly education fees!</Banner>
Shape
Prop allows you to specify the shape
of the banner. It can be set as circle
for a circular banner or rounded
for a banner with rounded corners.
Flat
Code EditorCopy<Banner theme="success" shape="flat">The more complete your profile, the closer your chance to get paid monthly education fees!</Banner>
Square
Code EditorCopy<Banner theme="success" shape="square">The more complete your profile, the closer your chance to get paid monthly education fees!</Banner>
Border
Prop allows you to specify the border of the banner
.
Full
Code EditorCopy<Banner shape="flat" border="full">The more complete your profile, the closer your chance to get paid monthly education fees!</Banner>
Top
Code EditorCopy<Banner shape="flat" border="top">The more complete your profile, the closer your chance to get paid monthly education fees!</Banner>
Right
Code EditorCopy<Banner shape="flat" border="right">The more complete your profile, the closer your chance to get paid monthly education fees!</Banner>
Bottom
Code EditorCopy<Banner shape="flat" border="bottom">The more complete your profile, the closer your chance to get paid monthly education fees!</Banner>
Left
Code EditorCopy<Banner shape="flat" border="left">The more complete your profile, the closer your chance to get paid monthly education fees!</Banner>
None
Code EditorCopy<Banner shape="flat" border="none">The more complete your profile, the closer your chance to get paid monthly education fees!</Banner>
Inline block
Code EditorCopy<Banner theme="primary" block={false}>The more complete your profile, the closer your chance to get paid monthly education fees!</Banner>
With icon
These themes allow you to apply an Icon, we have standardization icons
Icon primary
Code EditorCopy<Banner withIcon theme="primary">The more complete your profile, the closer your chance to get paid monthly education fees!</Banner>
Icon danger
Code EditorCopy<Banner withIcon theme="danger">The more complete your profile, the closer your chance to get paid monthly education fees!</Banner>
Icon warning
Code EditorCopy<Banner withIcon theme="warning">The more complete your profile, the closer your chance to get paid monthly education fees!</Banner>
Icon success
Code EditorCopy<Banner withIcon theme="success">The more complete your profile, the closer your chance to get paid monthly education fees!</Banner>
Props Reference
Prop
Type
Default
id?
string
-
testId?
string
-
className?
string
-
children
ReactNode
-
theme?
BannerThemeProps
default
border?
BannerBorderProps
full
shape?
BannerShapeProps
square
block?
boolean
true
withIcon?
boolean
false