Dashboard UI Kit

Apps PreviewDownload Design Package

Alert

import { Alert } from '@duik/it'
import Alert from '@duik/alert'

Alert is a simple component providing an interface for delivering information to user. For a proper usage, you should handle displaying the alert (e.g. in the fixed container) by yourself. Alerts have role="alert" set by default. Maximum width is set to 760px.

Variants

<Alert
  leftEl={<Icon>rocket</Icon>}
  rightEl={<button aria-label="Close" className="close" data-dismiss="alert" type="button"><Icon>close</Icon></button>}
>
  This is a default alert
</Alert>
ReactHTML Snippet
<Alert
  leftEl={<Icon>rocket</Icon>}
  primary
  rightEl={<button aria-label="Close" className="close" data-dismiss="alert" type="button"><Icon>close</Icon></button>}
>
  983 people started following you.
</Alert>
ReactHTML Snippet
<Alert
  leftEl={<Icon>rocket</Icon>}
  rightEl={<button aria-label="Close" className="close" data-dismiss="alert" type="button"><Icon>close</Icon></button>}
  success
>
  Yey, it's a success!
</Alert>
ReactHTML Snippet
<Alert
  danger
  leftEl={<Icon>rocket</Icon>}
  rightEl={<button aria-label="Close" className="close" data-dismiss="alert" type="button"><Icon>close</Icon></button>}
>
  Your dog needs some water!
</Alert>
ReactHTML Snippet
<Alert
  leftEl={<Icon>rocket</Icon>}
  rightEl={<button aria-label="Close" className="close" data-dismiss="alert" type="button"><Icon>close</Icon></button>}
  warning
>
  Your coffee might be too hot!
</Alert>
ReactHTML Snippet

Composing content

<Alert
  primary
  rightEl={<button aria-label="Close" className="close" data-dismiss="alert" type="button"><Icon>close</Icon></button>}
>
  <h4>
    Welcome to Dashboard UI Kit!
  </h4>
  <p>
    Super nice kit, easy to compose and build UIs with a beautiful design
  </p>
  <Button sm transparent>
    Explore Documentation
  </Button>
</Alert>
ReactHTML Snippet

Prop table

children

false

type: React.ReactNode
className

false

type: string
className, e.g. "my-custom-styling"
primary

false

type: boolean
Has blue color
danger

false

type: boolean
Has red color
success

false

type: boolean
Has green color
warning

false

type: boolean
Has orange color
leftEl

false

type: React.ReactNode
Renders node on the left side e.g. some icon
rightEl

false

type: React.ReactNode
Renders node on the right side, e.g. close button
...rest

false

type: any
Other properties are passed down to the wrapping element