Sorry, but you either have no stories or none are selected somehow.
If the problem persists, check the browser console, or the terminal you've run Storybook from.
The component failed to render properly, likely due to a configuration issue in Storybook. Here are some common causes and how you can address them:
Generic card component
Filter data by query. This is useful if you are sharing the results from a different panel that has many queries and you want to only visualize a subset of that in this panel.
Name | Description | Default | Control |
---|---|---|---|
disabled | Indicates if the card and all its actions can be interacted with boolean | - | |
isSelected | Makes the card selectable, set to "true" to apply selected styles boolean | - | |
isCompact | If true, the padding of the Card will be smaller boolean | - |
A basic Card component expects at least a heading, used as a title.
Filter data by query. This is useful if you are sharing the results from a different panel that has many queries and you want to only visualize a subset of that in this panel.
For providing metadata elements, which can be any extra information for the card, Card.Meta component should be used. If metadata consists of multiple strings, each of them has to be escaped (wrapped in brackets {}) or better passed in as an array.
Metadata also accepts HTML elements, which could be links, for example.
For elements, that are not strings, a key
prop has to be manually specified.
The separator for multiple metadata elements defaults to a vertical line |
, but can be customised.
Card can be used as a clickable link item by specifying href
prop.
Clicking this card will redirect to grafana website
To render cards in a list, it is possible to nest them inside li
items.
Card that is rendered inside li element.
Card that is rendered inside li element.
Card that is rendered inside li element.
Card that is rendered inside li element.
Cards can also be rendered with media content such icons or images. Such elements need to be wrapped in Card.Figure
component.
Cards also accept primary and secondary actions. Usually the primary actions are displayed as buttons
while secondary actions are displayed as icon buttons. The actions need to be wrapped in Card.Actions
and Card.SecondaryActions
components respectively.
Card can have a disabled state, effectively making it and its actions non-clickable. If there are any actions, they will be disabled instead of the whole card.
This is a really great option, you will not regret it.
Description, body text. Greetings! Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.