List

Represents an unordered list of items grouped together, rendered as a bulleted list.

Used to present a grouping of simple, related information or break up related content into easily digestable chunks.

  • Important
  • Always
  • Item #1
  • Item #2
  • Amazing
  • Congrats
  • Do you know?
  • You can also do this
  • Be careful
  • Use with precautions
  • Drinking too much
  • Driving drunk
MDC
::list{type="primary"}
- **Important**
- Always
::

::list{type="secondary"}
- Item #1
- Item #2
::

::list{type="success"}
- Amazing
- Congrats
::

::list{type="info"}
- Do you know?
- You can also do this
::

::list{type="warning"}
- Be careful
- Use with precautions
::

::list{type="danger"}
- Drinking too much
- Driving drunk
::

Custom Icon

You can use any icon from Iconify or any emoji as a custom icon.

  • Amazing
  • Congrats
  • Be careful
  • Use with precautions
MDC
::list{type="success" icon="fe:star"}
- Amazing
- Congrats
::

::list{type="warning" icon="raphael:smile"}
- Be careful
- Use with precautions
::

Props

PropsTypeDefaultDescription
typeStringprimaryContextual type of Alert. Affects colors. Possible values are: success, info, warning, danger, primary, secondary, and neutral
iconStringnullIcon to be displayed on the left side of the List item. Any component name prefixed with Icon, icon name from Iconify or any emoji could be used.

Design Tokens

tokens.config.ts
import { defineTheme } from 'pinceau'

export default defineTheme({
  elements: {
    list: {
      item: {
        marginBottom: '{space.3}', 
        lastChild: {
          marginBottom: '0px',
        },
        icon: {
          marginInlineEnd: '{space.3}', 
          padding: '{space.1}', 
          borderRadius: '{radii.full}', 
          width: '{space.4}', 
          height: '{space.4}',
        },
      }
    }
  }
})